Linux - NewbieThis 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!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
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?
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).