Skip to content
This repository has been archived by the owner on Apr 17, 2024. It is now read-only.

Commit

Permalink
docs: add basic osd scrubbing schedule docs
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Trost <galexrt@googlemail.com>
  • Loading branch information
galexrt committed Jul 27, 2023
1 parent 6254530 commit c87a6dd
Show file tree
Hide file tree
Showing 2 changed files with 116 additions and 0 deletions.
84 changes: 84 additions & 0 deletions docs/knowledge/koor/osd-scrubbing-schedule.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
---
title: "OSD Scrubbing Schedule"
---

!!! hint
This is a paid Koor Storage Distribution feature.

The Koor Storage Distribution has added a feature to it's customized Rook version that allows for simple configuration of the Ceph OSD Scrubbing schedule.

This is an example of the OSD scrubbing config in your CephCluster object:

```yaml
spec:
# [...]
storage:
# [...]
scrubbing:
# Whether the scrubbing schedule specified should be applied to the cluster.
applySchedule: true
# Max scrubbing operations happening at the same time. Default: `3`.
maxScrubOps: 3
# Begin hour of scrubbing schedule. Default `0`. Setting both `BeginHour` and `EndHour` to `0`, will allow scrubbing the entire day.
beginHour: 8
# End hour of scrubbing schedule. Default `0`.
endHour: 17
# Begin week day of scrubbing schedule. `0` = Sunday, `1` = Monday, etc. Default: `0`.
beginWeekDay: 1
# End week day of scrubbing schedule. `0` = Sunday, `1` = Monday, etc. Default: `0`.
endWeekDay: 5
# Minimum interval to wait before scrubbing again. Default: `24h` (1 day).
minScrubInterval: 24h
# Maximum interval to wait before scrubbing is forced. Default: `168h` (7 days).
maxScrubInterval: 168h
# Interval at which to do deeb scrubbing instead of a "light" scrubbing. Default: `168h` (7 days).
deepScrubInterval: 168h
# Set the scrub sleep as a duration. Default: `0ms`, if you are impacted by scrubbing causing performance issues, it is recommended to set it to at least `100ms`.
scrubSleepSeconds: 100ms
```
## Specifications
These options can be used to set a custom OSD scrubbing schedule easily instead of having to use the Ceph config override:
* `applySchedule`: Whether the scrubbing schedule specified should be applied to the cluster.
* `maxScrubOps`: Max scrubbing operations happening at the same time. Default: `3`.
* `beginHour`: Begin hour of scrubbing schedule. Default `0`. Setting both `BeginHour` and `EndHour` to `0`, will allow scrubbing the entire day.
* `endHour`: End hour of scrubbing schedule. Default `0`.
* `beginWeekDay`: Begin week day of scrubbing schedule. `0` = Sunday, `1` = Monday, etc. Default: `0`.
* `endWeekDay`: End week day of scrubbing schedule. `0` = Sunday, `1` = Monday, etc. Default: `0`.
* `minScrubInterval`: Minimum interval to wait before scrubbing again. Default: `24h` (1 day).
* `maxScrubInterval`: Maximum interval to wait before scrubbing is forced. Default: `168h` (7 days).
* `deepScrubInterval`: Interval at which to do deeb scrubbing instead of a "light" scrubbing. Default: `168h` (7 days).
* `scrubSleepSeconds`: Set the scrub sleep as a duration. Default: `0ms`, if you are impacted by scrubbing causing performance issues, it is recommended to set it to at least `100ms`.

For more information about Ceph OSD scrubbing checkout [OSD Config Reference - Scrubbing - Ceph Documentation](https://docs.ceph.com/en/latest/rados/configuration/osd-config-ref/#scrubbing).

## Examples

### Whole week, during late/night Hours

Starts at 21:00/ 9:00pm and goes till 06:00/ 6:00am on all days of the week.
In comparison to Ceph's default config, the min/ max scrubbing intervals to give slightly "more time" in typical production clusters.

```yaml
spec:
# [...]
storage:
# [...]
scrubbing:
applySchedule: true
maxScrubOps: 3
beginHour: 7
endHour: 20
beginWeekDay: 0
endWeekDay: 0
# 3 days
minScrubInterval: 72h
# 10 days
maxScrubInterval: 240h
# 10 days
deepScrubInterval: 240h
# Set the scrub sleep as a duration. Default: `0ms`, if you are impacted by scrubbing causing performance issues, it is recommended to set it to at least `100ms`.
scrubSleepSeconds: 100ms
```
32 changes: 32 additions & 0 deletions docs/knowledge/rook/tasks/osd-scrubbing-schedule.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,38 @@
title: "OSD: Configure Scrubbing Schedule"
---

!!! hint
The paid Koor Storage Distribution has a [feature](../../koor/osd-scrubbing-schedule.md) to allow this configuration on the go via the `CephCluster` CRD.

Currently you need to add your Ceph OSD scrubbing schedule config options to the [`rook-config-override` ConfigMap of your Rook Ceph cluster](https://rook.io/docs/rook/v1.11/Storage-Configuration/Advanced/ceph-configuration/#custom-cephconf-settings).

For more information on OSD Scrubbing and scheduling, see [Ceph OSD Scrubbing](../../ceph/osds/scrubbing.md).

## Examples

### Whole week, during late/night Hours

Starts at 21:00/ 9:00pm and goes till 06:00/ 6:00am on all days of the week.
In comparison to Ceph's default config, the min/ max scrubbing intervals to give slightly "more time" in typical production clusters.

```ini
[osd]
; Allow cluster to start scrubbing at 8pm
osd_scrub_begin_hour = 20
; Restrict scrubbing to the hour earlier than this
osd_scrub_end_hour = 7
; Sunday
osd_scrub_begin_week_day = 0
; Sunday
osd_scrub_end_week_day = 0
; Decrease to faster stop when more load is applied to the systems
osd_scrub_load_threshold = 0.4
; 3 days
osd_scrub_min_interval = 259200
; 10 days
osd_scrub_max_interval = 864000
; Add slight sleep to reduce load on OSDs
osd_scrub_sleep = 0.1
; 10 days
osd_deep_scrub_interval = 864000
```

0 comments on commit c87a6dd

Please sign in to comment.