White Papers
Performance tuning
45 Dell EMC SC Series: Red Hat Enterprise Linux Best Practices | CML1031
The new scheduler is in effect only for the current running instance of the OS. A script could be used to make
this change persistent on all required SCSI (sd) devices (on a device-dependent basis) during boot time.
Alternatively, this change can also be applied system-wide during boot time by appending the elevator= key
value option to the end of the kernel string reflected in the /boot/grub/grub.conf (RHEL 6 and older) or
/boot/grub2/grub.cfg (RHEL 7 and newer) configuration file as shown. Make sure to use the appropriate
methods to update the files based on the version of the RHEL.
linux16 /vmlinuz-3.10.0-957.el7.x86_64 root=/dev/mapper/rhel-root ro
crashkernel=auto rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap rhgb quiet
LANG=en_US.UTF-8 elevator=deadline
4.5.2 read_ahead_kb
This parameter is used when the kernel detects it is sequentially reading from a block device and defines how
many kilobytes of I/O the Linux kernel will read. Increasing this value can have a noticeable effect on
performance in heavy sequential read workloads. The parameter defaults to 128 for RHEL 6, and 4096 for
RHEL 7 and newer.
Dynamically change the read_ahead_kb setting by writing to the device’s read_ahead_kb sysfs file:
The change does not persist after system reboots.
• Change a single sd device:
# echo 4096 > /sys/block/sda/queue/read_ahead_kb
• Change all sd devices:
# ls -1 /sys/block/sd[a-z]/queue/read_ahead_kb |xargs -I % echo echo 4096
">" %|bash
• Change a single dm-multipath device and the associated sd devices:
# multipath -ll $MPATH_NAME | sed -rn 's/.*(dm-
[[:digit:]]+|sd[[:alpha:]]+).*/\1/p' | xargs -I % echo echo 4096 ">"
/sys/block/%/queue/read_ahead_kb | bash
• Change all dm-multipath devices and the associated sd devices:
This command is the same as the single dm-multipath command above except the $MPATH_NAME
argument is removed.
Change the read_ahead_kb setting using a udev rule:
• Create a udev rule in /etc/udev/rules.d/50-compelnt.rules with the following entry:
ACTION=="add|change", KERNEL=="sd[a-z]", ATTRS{vendor}=="COMPELNT*",
ATTRS{model}=="Compellent Vol*", ATTR{queue/read_ahead_kb}="4096"
• Activate the udev rule:
# udevadm trigger && sleep 3 && systemctl reload multipathd.service >
/dev/null