Bookmark this page

Guided Exercise: Tuning Object Storage Cluster Performance

In this exercise, you will tune the recovery and backfill processes to preserve cluster performance.

Outcomes

You should be able to:

  • Inspect your OSDs for BlueStore fragmentation.

  • Preserve cluster performance under heavy loads.

  • Adapt how backfill requests are processed for placement group migration to deal with added or removed OSDs.

  • Adjust recovery requests to synchronize a recovered OSD with the OSD's peers following an OSD crash.

As the student user on the workstation machine, use the lab command to prepare your system for this exercise.

[student@workstation ~]$ lab start tuning-perf

Procedure 12.2. Instructions

  • The clienta node is the admin node and is a client of the Ceph cluster.

  • The serverc, serverd, and servere nodes are an operational 3-node Ceph cluster. All three nodes operate as a MON, a MGR, and an OSD host with three 10 GB collocated OSDs.

Warning

The parameters used in this exercise are appropriate for this lab environment. In production, these parameters should only be modified by qualified Ceph administrators, or as directed by Red Hat Support.

  1. Log in to clienta as the admin user. Inspect OSD 0 for BlueStore fragmentation.

    1. Connect to clienta as the admin user and use sudo to run the cephadm shell.

      [student@workstation ~]$ ssh admin@clienta
      [admin@clienta ~]$ sudo cephadm shell
      [ceph: root@clienta /]#
    2. Retrieve information about OSD 0 fragmentation. The value should be low because the number of operations in the cluster is low and the cluster is new.

      [ceph: root@clienta /]# ceph tell osd.0 bluestore allocator score block
      {
          "fragmentation_rating": 0.0016764709285897418
      }
  2. By default, Red Hat Ceph Storage allows one PG backfill at a time, to or from an OSD. Modify this parameter to 2 on a per-OSD basis. Configure PG backfilling on an OSD.

    1. Select one OSD running on the serverc node and obtain its IDs. In the following example, the options are the osd.0, osd.1 and osd.2 OSDs. Yours might be different.

      [ceph: root@clienta /]# ceph osd tree
      ID  CLASS  WEIGHT   TYPE NAME         STATUS  REWEIGHT  PRI-AFF
      -1         0.08817  root default
      -3         0.02939      host serverc
       0    hdd  0.00980          osd.0         up   1.00000  1.00000
       1    hdd  0.00980          osd.1         up   1.00000  1.00000
       2    hdd  0.00980          osd.2         up   1.00000  1.00000
      -7         0.02939      host serverd
       3    hdd  0.00980          osd.3         up   1.00000  1.00000
       5    hdd  0.00980          osd.5         up   1.00000  1.00000
       7    hdd  0.00980          osd.7         up   1.00000  1.00000
      -5         0.02939      host servere
       4    hdd  0.00980          osd.4         up   1.00000  1.00000
       6    hdd  0.00980          osd.6         up   1.00000  1.00000
       8    hdd  0.00980          osd.8         up   1.00000  1.00000
    2. On your selected OSD on host serverc, retrieve the value for the osd_max_backfills parameter. In this example, the selected OSD is osd.0.

      [ceph: root@clienta /]# ceph tell osd.0 config get osd_max_backfills
      {
          "osd_max_backfills": "1"
      }
    3. Modify the current runtime value for the osd_max_backfills parameter to 2.

      [ceph: root@clienta /]# ceph tell osd.0 config set osd_max_backfills 2
      {
          "success": "osd_max_backfills = '2' "
      }
  3. By default, Red Hat Ceph Storage allows three simultaneous recovery operations for HDDs and ten for SSDs. Modify the maximum number of data recovery operations to 1 per OSD.

    1. Verify the value of the osd_recovery_max_active parameter on the OSD of your choice. The default value for the osd_recovery_max_active is 0, meaning that the values in osd_recovery_max_active_hdd and osd_recovery_max_active_ssd are used instead.

      [ceph: root@clienta /]# ceph tell osd.0 config get osd_recovery_max_active
      {
          "osd_recovery_max_active": "0"
      }
      [ceph: root@clienta /]# ceph tell osd.0 config get osd_recovery_max_active_hdd
      {
          "osd_recovery_max_active_hdd": "3"
      }
      [ceph: root@clienta /]# ceph tell osd.0 config get osd_recovery_max_active_ssd
      {
          "osd_recovery_max_active_ssd": "10"
      }
    2. Set the current runtime for the osd_recovery_max_active parameter to 1 on the OSD of your choice. Verify that the changes are applied.

      [ceph: root@clienta /]# ceph tell osd.0 config set osd_recovery_max_active 1
      {
          "success": "osd_recovery_max_active = '1' "
      }
      [ceph: root@clienta /]# ceph tell osd.0 config get osd_recovery_max_active
      {
          "osd_recovery_max_active": "1"
      }
  4. Return to workstation as the student user.

    [ceph: root@clienta /]# exit
    [admin@clienta ~]$ exit
    [student@workstation ~]$

Finish

On the workstation machine, use the lab command to complete this exercise. This is important to ensure that resources from previous exercises do not impact upcoming exercises.

[student@workstation ~]$ lab finish tuning-perf

This concludes the guided exercise.

Revision: cl260-5.0-29d2128