
Linux I / O Scheduler. Choose the best
We want to read from the screw faster? It's time to pick up the I / O Scheduler.
What do we need to achieve the goal?
Firstly, installed hdparm:
Secondly, a small script:
If the drive is not sda, then we appropriately edit the piece of code with the declaration:
Run and get a similar result:
The first line is purely informational, in it we just see the scheduler that is currently in use and can always return to it.
Attention! The script iterates through the shedulers during testing and does not restore the originally installed one.
Then follow the testing section. We select the most optimal result manually, it corresponds to the highest reading speed of megabytes per second. In short, we are doing rounding :)
A new value can be set directly in grub by changing the value of elevator = ...
Next:
Related links:
www.redhat.com/magazine/008jun05/features/schedulers
www.redhat.com/promo/summit/2008/downloads/pdf/Thursday/Sanjay_Rao.pdf
sfdoccentral.symantec.com/sf/5.0/linux/ html / sf_rac_install / sfrac_prep_install27.html
What do we need to achieve the goal?
Firstly, installed hdparm:
# aptitude install hdparm
Secondly, a small script:
# DISC = "sda"; \ cat / sys / block / $ DISC / queue / scheduler; \ for T in noop anticipatory deadline cfq; do \ echo $ T> / sys / block / $ DISC / queue / scheduler; \ cat / sys / block / $ DISC / queue / scheduler; \ sync && / sbin / hdparm -tT / dev / $ DISC && echo "----"; \ sleep 15; \ done
If the drive is not sda, then we appropriately edit the piece of code with the declaration:
DISC = "sda";
Run and get a similar result:
noop anticipatory deadline [cfq] [noop] anticipatory deadline cfq / dev / sda: Timing cached reads: 1690 MB in 2.00 seconds = 844.83 MB / sec Timing buffered disk reads: 216 MB in 3.00 seconds = 71.91 MB / sec ---- noop [anticipatory] deadline cfq / dev / sda: Timing cached reads: 1612 MB in 2.00 seconds = 805.98 MB / sec Timing buffered disk reads: 208 MB in 3.03 seconds = 68.67 MB / sec ---- noop anticipatory [deadline] cfq / dev / sda: Timing cached reads: 1644 MB in 2.00 seconds = 822.10 MB / sec Timing buffered disk reads: 206 MB in 3.02 seconds = 68.20 MB / sec ---- noop anticipatory deadline [cfq] / dev / sda: Timing cached reads: 1728 MB in 2.00 seconds = 864.06 MB / sec Timing buffered disk reads: 214 MB in 3.01 seconds = 71.05 MB / sec ----
The first line is purely informational, in it we just see the scheduler that is currently in use and can always return to it.
Attention! The script iterates through the shedulers during testing and does not restore the originally installed one.
Then follow the testing section. We select the most optimal result manually, it corresponds to the highest reading speed of megabytes per second. In short, we are doing rounding :)
A new value can be set directly in grub by changing the value of elevator = ...
Next:
# update-grub # reboot
Related links:
www.redhat.com/magazine/008jun05/features/schedulers
www.redhat.com/promo/summit/2008/downloads/pdf/Thursday/Sanjay_Rao.pdf
sfdoccentral.symantec.com/sf/5.0/linux/ html / sf_rac_install / sfrac_prep_install27.html