The Linux I/O scheduler is a process that accesses storage volumes with block I/O, sometimes called the disk scheduler. The working mechanism of the Linux I/O scheduler is to control the request queue of the block device: determine which I/Os in the queue have higher priority and when to issue the I/O to the block device, so as to reduce the disk seek time, thereby reducing the disk seek time. Improve system throughput.
At present, there are several I/O scheduling algorithms on Linux as follows:
1. noop - a device typically used for memory storage.
2. cfq - Fully Fair Scheduler. Processes use IO bandwidth on average.
3. Deadline - For the delay scheduler, each I/O has a latest execution time.
4. Anticipatory - Heuristic scheduling, similar to Deadline algorithm, but introducing prediction mechanism to improve performance.
View the device's current I/O scheduler:
# cat /sys/block//queue/scheduler
Assuming the disk name is /dev/sdc:
# cat /sys/block/sdc/queue/schedulernoop anticipatory deadline [cfq]
How to Change the Hard Disk Device I/O Scheduler
Use the following command:
# echo {SCHEDULER-NAME} > /sys/block//queue/scheduler
For example to set the noop scheduler:
# echo noop > /sys/block/sdc/queue/scheduler
The above settings will be invalid after restarting. If the configuration still takes effect after restarting, you need to write elevator=noop into /boot/grub/menu.lst in the kernel boot parameters:
1. Backup the menu.lst file
cp -p /boot/grub/menu.lst /boot/grub/menu.lst-backup
2. Update /boot/grub/menu.lst
Add elevator=noop to the end of the file, for example:
kernel /vmlinuz-2.6.16.60-0.91.1-smp root=/dev/sysvg/root splash=silent splash=off showopts elevator=noop
Linux cloud computing free courses are hotly launched, 5-day free courses are first to listen, operation and maintenance dry goods content is free to listen, click "read the original text" at the end of the article to listen to the operation and maintenance courses for free ! Hurry up ~~~~
PS: Remember to check the free gift package that Xiaobian sent you~
▼▼Click [ read the original text ] to listen to the 5-day Linux operation and maintenance dry goods sharing class for free . The lecture is in full swing, come and grab it!