How to tune Ceph storage on Linux?

How to tune Ceph storage on Linux?

Tuning Ceph storage on Linux typically involves adjusting various configuration settings to optimize performance and scalability based on the specific needs and workload of your Ceph cluster. Here are some general steps to follow:

  1. Review the Ceph documentation: Before making any changes to your Ceph cluster configuration, it's important to understand the various components, services, and features of Ceph, as well as the best practices and recommendations for tuning performance. You can start by reviewing the Ceph documentation and relevant resources.
  2. Identify your workload requirements: Each Ceph cluster has unique workload requirements, such as the number and type of client applications, data access patterns, read and write operations, and network bandwidth. You should identify these requirements and assess their impact on Ceph performance.
  3. Adjust OSD and network settings: The OSD (Object Storage Device) daemons and network settings play a critical role in Ceph performance. You can adjust settings such as osd_pool_default_size, osd_max_backfills, osd_scrub_max_concurrent_ops, osd_pg_max_per_osd, osd_recovery_max_active, osd_recovery_max_chunk, osd_journal_size, rados_max_write_size, rados_min_alloc_size, network_buf_size, ms_tcp_read_timeout, and ms_tcp_write_timeout to optimize OSD and network performance.
  4. Tune CRUSH map: The CRUSH map is a Ceph feature that determines the data placement and replication across the OSDs. You can tune the CRUSH map settings, such as osd_crush_chooseleaf_type, osd_crush_initial_weight, and osd_crush_update_on_start to balance data distribution and reduce data hotspots.
  5. Monitor and test performance: After making changes to the Ceph configuration, you should monitor and test the performance of the cluster to ensure that it meets your workload requirements and performance goals. You can use tools such as ceph-disk, ceph-ansible, cephadm, ceph status, ceph health, ceph tell osd.* bench, and ceph tell mon.* version to monitor and test performance.


Changing the Linux kernel parameters can help optimize the performance of a Ceph storage cluster. Here are the general steps to change kernel parameters in Linux:

  1. Identify the kernel parameters to change: There are several kernel parameters that can impact Ceph performance, including vm.dirty_ratio, vm.dirty_background_ratio, vm.max_map_count, net.core.rmem_max, net.core.wmem_max, net.ipv4.tcp_rmem, net.ipv4.tcp_wmem, and net.ipv4.tcp_timestamps. You should identify the parameters that need to be adjusted based on your specific workload and performance goals.
  2. Modify the kernel parameters: You can modify the kernel parameters by editing the /etc/sysctl.conf file or creating a new file in the /etc/sysctl.d/ directory. For example, to modify the vm.dirty_ratio parameter, you can add the following line to the sysctl.conf file:



vm.dirty_ratio = 10        

This sets the dirty ratio to 10% of available memory.

  1. Apply the changes: After modifying the kernel parameters, you need to apply the changes by running the sysctl command with the -p option. For example:



sudo sysctl -p        

This applies the changes to the running system.

  1. Test the performance: Once the changes are applied, you should test the performance of your Ceph storage cluster to see if the changes have had a positive impact. You can use tools such as ceph status, ceph osd perf, and ceph tell osd.* bench to monitor the performance and identify any bottlenecks.

Keep in mind that changing kernel parameters can have significant effects on the system, and it's important to test and monitor the performance to ensure that the changes have the desired effect. It's also recommended to consult the Ceph documentation and relevant resources for more specific recommendations on tuning kernel parameters for Ceph storage.

Md Abu Sayed

CEH Master | RHCSA | RHCE | AWS | CCNA | MTCNA | CyberOps | Virtualization | SDS | System Administration | Data Center Management | Disaster Recovery |

1 年

Hi Sir...Inwnat to contract you..if you dont mind,please give me your Email

Farshad Asadpour

Platform Engineer @ Asa Co

1 年

Reza, I am immensely grateful to you for sharing your knowledge and broadening my perspective. Thank you a million times!

要查看或添加评论,请登录

Reza Bojnordi的更多文章

社区洞察

其他会员也浏览了