Tuning BlueStore

Use this procedure for freshly deployed OSDs.

Before you begin

Before you begin, make sure that you have the following prerequisites in place:
  • Ceph Monitors and Managers are deployed in the cluster.
  • Servers that can be freshly provisioned as OSD nodes.
  • The admin keyring.
  • Check the value used to deploy the OSD by running the following command:
    ceph osd metadata OSD_ID | grep bluestore_min_alloc_size
    For example,
    [ceph: root@host01 /]# ceph osd metadata 11 | grep bluestore_min_alloc_size "bluestore_min_alloc_size": "4096",

About this task

In BlueStore, the raw underlying storage is allocated in chunks of bluestore_min_alloc_size. By default, bluestore_min_alloc_size is 4096, equivalent to 4 KiB for HDDs and SSDs. Starting with IBM Storage Ceph 9.9.0, erasure-coded pools no longer add zero padding to unwritten areas in chunks. To enable erasure coding optimization, also known as FastEC, see Enabling coding optimizations.

Important: Changing the value of bluestore_min_alloc_size is not recommended. For any assistance, contact IBM Support.
Note:
  • You can change specifically the SSD and HDD options with the bluestore_min_alloc_size parameter within the config set command. For more information, contact IBM Support.
  • For already deployed OSDs, you cannot modify the bluestore_min_alloc_size parameter. To modify, remove and then redeploy each affected OSD.
For OSD removal and additional information, see Managing OSDs.

Procedure

  1. From the cephadm shell, change the bluestore_min_alloc_size parameter value.
    Set the allocation size, in one of the following ways.
    Note: The selected bluestore_min_alloc_size values should be power of 2 aligned.
    • Set the allocation size per OSD.
      ceph config set osd.OSD_ID bluestore_min_alloc_size VALUE
      In the following example, bluestore_min_alloc_size is set to 8192 bytes, which is equivalent to 8 KiB.
      [ceph: root@host01 /]# ceph config set osd.4 bluestore_min_alloc_size 8192
    • Set the allocation size per CRUSH device class.
      ceph config set class:CLASS bluestore_min_alloc_size VALUE
      Replace CLASS with the CRUSH device class, usuallyhdd or ssd.
      In the following example, the CRUSH device class is hdd and the bluestore_min_alloc_size is set to 8192 bytes, which is equivalent to 8 KiB.
      [ceph: root@host01 /]# ceph config set class:hdd bluestore_min_alloc_size 
      8192
    ceph config set osd.OSD_ID bluestore_min_alloc_size VALUE
    For example,
    [ceph: root@host01 /]# ceph config set osd.4 bluestore_min_alloc_size 8192
  2. Redeploy the affected OSDs.
    For more information, see Managing OSDs.

What to do next

Verify the BlueStore tuning settings, by using the ceph osd metadata command.

For example,
[ceph: root@host01 /]# ceph osd metadata OSD.1 | grep bluestore_min_alloc_size "bluestore_min_alloc_size": "8192",