First you should know the different types of IO schedulers:
CFQ [cfq] (Completely Fair Queuing) is an I/O scheduler for the Linux kernel and default under many Linux distributions.
Noop scheduler (noop) is the simplest I/O scheduler for the Linux kernel based upon FIFO queue concept.
Anticipatory scheduler (anticipatory) is an algorithm for scheduling hard disk input/output as well as old scheduler which is replaced by CFQ
Deadline scheduler (deadline) - it attempt to guarantecho noop > /sys/block/hda/queue/scheduler
ee a start service time for a request.
You can check and modify the scheduler anytime using the following command:
# cat /sys/block/sda/queue/sc
noop anticipatory deadline [cfq]
The scheduler for this machine is CFQ
#echo noop > /sys/block/hda/queue/scheduler
This change the scheduler to noop
Changing the queue size
# cat /sys/block/sda/queue/nr_requests
128
# echo 100000 > /sys/block/sda/queue/nr_requests
According to http://yoshinorimatsunobu.blogspot.com/ increasing the size of the queue
can improve dramatically the performance.
Isn't 100000 too high?
ReplyDeleteIt appears that in the past there were issues with 8192:
https://bugzilla.redhat.com/show_bug.cgi?id=234278
Not really... nr_requests set the maximun number of request on the queues (read and write queues). nr_requests values depends on the type of load that you have on the server. The actual 128 is considered an average value of requests, however some databases with high inserts with few reads or the other way around high reads and few writes can experience better performance with very high values since the seek time and rotational delay will be reduced.
ReplyDelete