LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-28-2012, 06:04 PM   #1
trist007
Senior Member
 
Registered: May 2008
Distribution: Slackware
Posts: 1,033

Rep: Reputation: 69
I have a few questions about IO...


I know on CPU time you can regulate priority using nice and renice.

I now see ionice which can also regulate priority on IO for a process.

However, I'd like to know more on how IO works in Linux.

Can two processes wait for IO from the same device, say the primary NIC of the server, at the same time? Meaning can the two processes receive the IO from the primary NIC concurrently? or is it one first then the other based on IO priority of ionice? Or in reality like in CPU(single core) CPU only does one process at a time?

So in today's multi-core servers, several processes can be in the CPU at a time because of the multi-cores.

So in dealing with IO

1. Can two separate processes wait for IO from the same device, primary NIC, at the same time? Or does one process get the IO first, then the 2nd?

2. Wait if two processes are waiting for IO from two separate NICs, does the IO get received concurrently or one then the other?

2. What about when dealing with separate devices, say one process is waiting for IO from one hard disk, and another process is waiting for IO from another hard disk. Those happen simultaneously?

3. What if two processes are waiting for IO on the same hard disk? Do they receive the IO concurrently or one then the other?

4. What if two processes are waiting for IO from the same hard disk but different partitions? Do they receive IO at the same time or one then the other?

5. Same conditions as above but using a SCSI controller but the same hard disk?

6. How does the output from "iostat" break this down?

Last edited by trist007; 02-28-2012 at 06:06 PM.
 
Old 02-28-2012, 10:59 PM   #2
trist007
Senior Member
 
Registered: May 2008
Distribution: Slackware
Posts: 1,033

Original Poster
Rep: Reputation: 69
Also, in case some of you are wondering this is not a homework assignment. You can take a look at my topic history to get an idea of what I do.
 
Old 02-29-2012, 03:18 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,721

Rep: Reputation: 2120Reputation: 2120Reputation: 2120Reputation: 2120Reputation: 2120Reputation: 2120Reputation: 2120Reputation: 2120Reputation: 2120Reputation: 2120Reputation: 2120
O.k., let's try some general answers:

Any number of requestors can wait concurrently; being trite, they all wait at the same speed. Interrupts are generally handled as FIFO within priority order.
Where there are multiple CPUs enabled for interrupt handling for a particular interrupt, then concurrency is possible.
I don't know about NICs, but for block devices I believe there is one interrupt handler per device. I/O's for disk are consolidated and handled as a block - when that block is handled requestors are serviced as above. Regardless of (maybe) I/O order or partitions.

From userland you can't tell, and neither can iostat. If you're interested, have a look at blktrace (for disk - as I said, I don't know about TCP).
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Make questions and ARCH questions for gentoo/calculate linus72 Calculate 5 04-09-2010 12:53 AM
basic questions on hostname and domain name + related postfix questions Moebius Linux - Newbie 7 09-04-2007 11:50 AM
LXer: Questions Answered, Questions Posed - What Happened? LXer Syndicated Linux News 0 05-14-2007 02:46 PM
Solaris - Questions! Questions! Questions! qs_tahmeed Solaris / OpenSolaris 2 07-16-2005 05:27 AM
window manager questions and/or theme questions t3gah Linux - Software 2 02-27-2005 04:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:47 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration