www.LinuxHowtos.org howtos, tips&tricks and tutorials for linux | |
from small one page howto to huge articles all in one place
poll results Last additions: using iotop to find disk usage hogs using iotop to find disk usage hogs words:887 views:200513 userrating:average rating: 1.7 (102 votes) (1=very good 6=terrible) May 25th. 2007: Words why adblockers are bad 486 Views253189 Workaround and fixes for the current Core Dump Handling vulnerability affected kernels Workaround and fixes for the current Core Dump Handling vulnerability affected kernels words:161 views:142298 userrating:average rating: 1.4 (42 votes) (1=very good 6=terrible) April, 26th. 2006: Words New subdomain: toolsntoys.linuxhowtos.org 38 Views102122 You are here: System Switching IO Schedulers on runtimeThis manual explains how to change the IO-Scheduler used by your linux kernel without recompiling the kernel and without restart.First, find out which schedulers are compiled and loaded into the kernel bart:/sys/block/sda/queue # cat scheduler cfq is selected here. I built noop as a module here, if I load it: bart:/sys/block/sda/queue # modprobe noop-iosched bart:/sys/block/sda/queue # cat scheduler it shows up as well. Switching is just as simple, you simply echo the desired scheduler into that file: bart:/sys/block/sda/queue # echo anticipatory> scheduler OK, to know which scheduler does what, here an explaination of those schedulers This is just an executive summary. I don't know the details. Normally a disk scheduler tries to balance between these goals:
A scheduler gets as input the list of sectors that processes have recently requested and which haven't yet given. It knows where the disk head currently is, and whatever other data it "remembers" from the past requests. A typical scheduler is called cyclic elevator, where disk heads move from beginning of disk to the end of disk in one direction. Assume that you get some requests in a sorted queue, and you're going to satisfy them. So, you'll first filter the list of requests by deciding that you will not satisfy requests for sectors below your current head position. Then you'll simply go to the sector closest to your current position in your sorted list. So, crunch crunch crunch, you move from start of disk to the end of disk. When you reach the highest unsatisfied sector number, your cycle is over and you seek to the lowest unsatisfied sector. Rinse and repeat. Linux 2.2 at least used the cyclic elevator if I remember right. So, with these approximate goals in mind, we can look at the different schedulers available.
You want to use noop scheduler on devices where there are no seeking penalty, such as flash drives. That's why USB stick wants noop. Unfortunately, harddisks are very mechanial beasts and their performance is highly controlled by their seeking abilities. All these schedulers above are really trying to figure out how to extract maximum performance off the harddisk without causing bad behaviour in other cases. most parts from http://kerneltrap.org/node/3851 rate this article: current rating: average rating: 1.4 (204 votes) (1=very good 6=terrible) Your rating: back Support us on Content Nation |
|
- Powered by LeopardCMS - Running on Gentoo -
Copyright 2004-2020 Sascha Nitsch Unternehmensberatung GmbH
Valid XHTML1.1 : Valid CSS : buttonmaker
- Level Triple-A Conformance to Web Content Accessibility Guidelines 1.0 -
- Copyright and legal notices -
Time to create this page: 45.7 ms