LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-25-2009, 02:22 AM   #1
aznium
Member
 
Registered: Jun 2005
Posts: 36

Rep: Reputation: 15
Linux Disk IO Scheduler


suppose i have 10 IO tasks outstanding - each are reads and each space out evenly on the hard drive .... how does the kernel rotate between the IO tasks? how often does it switch from 1 IO to another?
 
Old 03-25-2009, 08:41 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,140

Rep: Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123
That would be 10 I/O requests, not tasks. In simple terms, the I/Os are queued, in sector address order to minimise head thrashing. Normally if new I/Os come in they are inserted in order unless this causes some of the pending I/Os to get delayed too long in which case they will get preferential scheduling.
How all this is handled depends on the scheduler - as I said that's the 10,000 foot view.
 
Old 03-26-2009, 11:10 AM   #3
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
There are many different strategies:
http://en.wikipedia.org/wiki/I/O_scheduler

But, the only way to know which is best for you is to try it out. You can do so dynamically (while the system is running, in fact, right this very moment) by echoing the name into /sys/block/sda/queue/scheduler where sda is whatever block device you want...

Code:
bash-3.1$ cat /sys/block/sda/queue/scheduler
noop anticipatory [deadline] cfq 
bash-3.1$ echo cfq > /sys/block/sda/queue/scheduler
bash-3.1$ cat /sys/block/sda/queue/scheduler
noop anticipatory deadline [cfq]
 
Old 03-27-2009, 07:40 AM   #4
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,671
Blog Entries: 4

Rep: Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945
The I/O scheduler determines the order in which physical requests are carried out, but there are also many buffers and caches that become involved ... on the hardware and the software level.

Under high and persistent I/O request loads, a difference in scheduler algorithms may become noticeable.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux Scheduler tbui57 Linux - Kernel 3 02-04-2007 12:37 PM
Linux Scheduler Scarlett_987 Linux - Kernel 1 01-23-2007 08:54 PM
linux 2.6 scheduler panandsapphire Linux - Kernel 1 08-26-2006 09:01 PM
Modification Linux 2.6 Scheduler aerofloat Programming 1 07-26-2006 11:51 PM
something on Linux like Scheduler Tasks on NT ashley75 Linux - General 4 09-26-2003 11:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:41 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration