Posts

Showing posts from May, 2015

Specify I/O Scheduler with udev rules

Since the advent of systemd the use of /etc/rc* startup-scripts has been discouraged and phased out. However, systemd still supports the use of certain local startup scripts for compatibility purposes. Nevertheless, to ensure full current- and future compatibility with systemd , administrators are encouraged to create own systemd service files or udev rules to run scripts during boot.  This post will briefly outline the use of a udev rule to assign a specific I/O scheduler to a specific HDD. NOTE To see an example using the phased-out rc-startup scripts, take a look at my previous post . Create a custom rules-file, e.g. 99-custom.rules , in the /etc/udev/rules.d/ directory with your editor of choice.  The following example will instruct udev to assign the deadline I/O scheduler to the /dev/sdb device: # vim /etc/udev/rules.d/99-custom.rules ACTION=="add|change", SUBSYSTEM=="block" , KERNEL=="sdb*", RUN+="/bin/sh -c 'echo dead

Specify I/O Scheduler per Device

Since the advent of systemd the use of /etc/rc* startup-scripts has been discouraged and phased out. However, systemd still supports the use of certain local startup scripts for compatibility purposes. This post will briefly outline the use of the /etc/rc.local file to assign a specific I/O scheduler to a specific HDD. At the moment, I have an SSD drive (primary /dev/sda) and an "old-fashioned" HDD (/dev/sdb) in use on my RHEL7 system.  I'd like to be able to use the deadline I/O scheduler as the default and assign the cfq scheduler to the HDD device.  In RHEL7 the default I/O scheduler can change based on the selected tuned profile, which adds an additional layer of uncertainty if you're unaware of "tuned".  The default tuned profile is throughput-performance , which enables the deadline scheduler by default among other performance-related system settings.  However, if the default profile is changed to , e.g. virtual-host , the scheduler of choice