-
Notifications
You must be signed in to change notification settings - Fork 40
PR 1: Detect undersized BlueStore DB devices #1120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -179,6 +179,9 @@ class CephInstallInfo(InstallInfoBase): | |
|
|
||
| class CephChecks(StorageBase): | ||
| """ Ceph Checks. """ | ||
| # A 1 GiB BlueStore DB is the ceph-volume default and is generally too | ||
| # small for production OSDs. | ||
| BLUESTORE_DB_SIZE_MIN = 5 * 1024 * 1024 * 1024 | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. wy 5 GiB? The typical recommendation is 4% of the block dev size. So it's possible that a DB dev is > 5GiB but still be "small" for that OSD. |
||
| # Threshold above which an OSD's bluefs log is considered oversized. | ||
| # Healthy OSDs keep this well under 50 GiB; sustained growth past this | ||
| # point indicates that bluefs log compaction has failed and the log is | ||
|
|
@@ -444,6 +447,29 @@ def local_osds_with_oversized_bluefs_log(self): | |
|
|
||
| return sorted(bad) | ||
|
|
||
| @cached_property | ||
| def local_osds_with_small_bluestore_db(self): | ||
| """Return local OSDs with a BlueStore DB device at most 5 GiB.""" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use |
||
| bad = [] | ||
| for osd in self.local_osds: | ||
| try: | ||
| bluefs = CephDaemonPerfDump(osd_id=osd.id).bluefs | ||
| except Exception: # pylint: disable=broad-except | ||
| continue | ||
|
|
||
| try: | ||
| db_size = int(bluefs['db_total_bytes']) | ||
| except (KeyError, TypeError, ValueError): | ||
| continue | ||
|
|
||
| if db_size <= 0: | ||
| continue | ||
|
|
||
| if db_size <= self.BLUESTORE_DB_SIZE_MIN: | ||
| bad.append(f'osd.{osd.id}') | ||
|
|
||
| return sorted(set(bad)) | ||
|
|
||
| @cached_property | ||
| def bluestore_enabled(self): | ||
| """ | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| checks: | ||
| osds_with_small_bluestore_db: | ||
| property: | ||
| path: hotsos.core.plugins.storage.ceph.CephChecks.local_osds_with_small_bluestore_db | ||
| ops: [[length_hint], [gt, 0]] | ||
| conclusions: | ||
| osds-have-small-bluestore-db: | ||
| decision: osds_with_small_bluestore_db | ||
| raises: | ||
| type: CephOSDWarning | ||
| message: >- | ||
| Found OSD(s) {bad_osds} with a BlueStore DB device of 5 GiB or smaller. A small | ||
| DB device can cause metadata to spill over to the main OSD device and degrade | ||
| performance. Review the OSD device layout and provision a larger fast DB device. | ||
| format-dict: | ||
| bad_osds: '@checks.osds_with_small_bluestore_db.requires.value_actual:comma_join' |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| mock: | ||
| patch: | ||
| hotsos.core.plugins.storage.ceph.CephChecks.local_osds_with_small_bluestore_db: | ||
| kwargs: | ||
| new: ['osd.0'] | ||
| raised-issues: | ||
| CephOSDWarning: >- | ||
| Found OSD(s) osd.0 with a BlueStore DB device of 5 GiB or smaller. A small | ||
| DB device can cause metadata to spill over to the main OSD device and | ||
| degrade performance. Review the OSD device layout and provision a larger | ||
| fast DB device. |
Uh oh!
There was an error while loading. Please reload this page.