Tuning considerations for IBM Storage Ceph
Production IBM Storage Ceph clusters benefit from tuning operating system and BIOS / BMC settings. BMC refers to an embedded service processor used to configure and manage servers independently of the operating system, for example Dell iDRAC or HPE iLO.
When adjusting settings, be sure to apply the adjustments consistently across all hosts in the storage cluster. For more information, contact IBM Support.
There are various optimizations to help improve performance and reliability for many IBM Storage Ceph deployments. Coordinate with networking and infrastructure teams to align with fleet management. You can use TuneD or the sysctl utility for operation system tuning.
- TuneD
- TuneD manages performance profiles that adjust system settings for specific use cases.
- sysctl
- The sysctl utility manages Linux kernel tunables. The following settings have shown performance and reliability benefits. Evaluate these settings against your environment and automation.
BIOS and BMC settings
- Thermal and performance profiles
- Many modern server chassis include performance and thermal profile settings that affect CPU core management. By default, these are set to
Balanced. Select thePerformanceor equivalent profile to improve throughput and reduce latency. This change may increase power consumption. - Cooling
- Server chassis BMCs often adjust fan speeds dynamically based on detected hardware. The default settings may not provide optimal cooling. Select Enhanced Cooling or a medium fan offset for more effective cooling of storage devices, with the tradeoff of increased noise.
- Hyper-Threading
- IBM Storage Ceph is an integer workload that benefits from Hyper-Threading. Each physical CPU core appears to the operating system as two virtual cores (vcores) or threads. Keep Hyper-Threading enabled for most deployments.
Operating system tuning with TuneD
TuneD manages performance profiles that adjust system settings for specific use cases.- Install TuneD.
# dnf install -y tuned # tuned-adm active Current active profile: balanced - Activate the
network-latencyprofile.The network-latency profile prevents deep CPU C-state transitions. These transitions are slow and can cause performance degradation or packet loss.
# tuned-adm profile network-latency # tuned-adm active Current active profile: network-latency - Verify the system C-states.
On the idle stats tab, CPUs should report being in the following states most of the time: C0 , C1, or C1E. The CPU should never be in the C6 state. This improves throughput and latency, but may increase power consumption and heat generation.
- After verifying that TuneD is running with the correct profile, install the
powertoputility to verify that TuneD is running correctly.# dnf install -y powertop # powertop
Operating system tuning with sysctl
The sysctl utility manages Linux kernel tunables. The following settings have shown performance and reliability benefits. Evaluate these settings against your environment and automation.
- Create the /etc/sysctl.d/90-ibm-storage-ceph.conf file with the following contents:
# Memory tuning vm.min_free_kbytes = 4194304 vm.vfs_cache_pressure = 10 vm.swappiness = 1 vm.zone_reclaim_mode = 0 vm.dirty_ratio = 80 vm.dirty_background_ratio = 3 # I/O performance fs.aio-max-nr = 50000000 # Network performance net.ipv4.tcp_timestamps = 0 net.ipv4.tcp_sack = 1 net.ipv4.tcp_dsack = 0 net.ipv4.tcp_fack = 0 net.ipv4.tcp_congestion_control = bbr net.core.default_qdisc = fq net.ipv4.tcp_mtu_probing = 1 net.ipv4.tcp_syncookies = 1 net.core.somaxconn = 5000 net.ipv4.conf.all.send_redirects = 0 net.ipv4.conf.all.accept_source_route = 0 net.ipv4.tcp_fin_timeout = 20 net.ipv4.tcp_tw_reuse = 1 net.ipv4.tcp_window_scaling = 1 net.ipv4.tcp_low_latency = 1 net.ipv4.tcp_adv_win_scale = 1 net.ipv4.tcp_slow_start_after_idle = 0 # High-impact memory and backlog tuning net.core.netdev_max_backlog = 250000 net.ipv4.tcp_max_tw_buckets = 2000000 net.ipv4.tcp_max_syn_backlog = 100000 net.ipv4.udp_mem = 4096 87380 33554432 net.ipv4.tcp_rmem = 4096 87380 33554432 net.ipv4.tcp_wmem = 4096 65536 33554432 net.core.rmem_max = 67108864 net.core.wmem_max = 67108864 # Connection tracking net.netfilter.nf_conntrack_max = 1048576 net.nf_conntrack_max = 1048576 - Complete the
nf_conntracktable expansion by running the following commands:
Ensure that your fleet automation persists these files by using Ansible, or a similar fleet configuration management tool.echo 131072 > /sys/module/nf_conntrack/parameters/hashsize echo "options nf_conntrack hashsize=131072" >/etc/modprobe.d/nf_conntrack.conf
Volatile HDD cache
Modern hard drives include up to 256 MB of cache. This cache is volatile and lacks Power Loss Protection (PLP). If power is lost, unwritten data may be corrupted. When volatile write cache is enabled, the Linux kernel flushes every write synchronously to media. This prevents data loss but often reduces OSD performance, especially average and tail write latencies.
You can improve performance by disabling the volatile cache. This cache is different from controller-level caches, such as those on RAID HBAs. The impact varies by drive and controller. Test changes in a lab or pre-GA environment before production deployment. Monitor hdparm and sdparm latency before and after changes by using your cluster dashboard.
hdparm and sdparm commands for live testing of cache settings.
- Example commands for disabling the volatile cache
-
hdparm -W 0 /dev/sdXX # SATA drives sdparm --clear=WCE /dev/sdXX # SAS drives - Example commands for enabling the volatile cache
-
hdparm -W 1 /dev/sdXX # SATA drives sdparm --set=WCE /dev/sdXX # SAS drives
To disable volatile write cache reliably at boot, create a udev rule.
cat <<EOF >/etc/udev/rules.d/90-wce.rules SUBSYSTEM=="block", ENV{SCSI_VENDOR}=="SPINNERSRUS", ACTION=="add|change", RUN+="/usr/bin/sdparm --clear=WCE /dev/%k" EOF
To apply the changes immediately, reload udev.
udevadm control --reload