LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 08-18-2008, 12:00 AM   #1
bichonfrise74
LQ Newbie
 
Registered: Jul 2008
Posts: 24

Rep: Reputation: 15
iostat question


Iostat shows that the Blk_read/s and Blk_wrtn/s is around 500 blocks / seconds and yet the %iowait is at 10% only.

Shouldn't the %iowait being huge if there is constant reading and writing to the disk???

Thanks.
 
Old 08-18-2008, 12:21 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,537

Rep: Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041
The I/O schedulers don't issue the physical I/Os immediately.
The are delayed, sorted (by block), and queued. That way multiple blocks (from multiple issued I/Os) that are "close" will be transferred together. There are various schemes to (attempt) to ensure no process gets blocked or starved - hence the existence of multiple I/O schedulers that you can choose to use.
 
Old 08-18-2008, 05:21 PM   #3
bichonfrise74
LQ Newbie
 
Registered: Jul 2008
Posts: 24

Original Poster
Rep: Reputation: 15
If you say that it IO scheduler and the Physical IO are not happening at the same time, then how long show I wait? Because I've been monitoring the box for half an hour, and %iowait still shows the box being at 10% only.
 
Old 08-18-2008, 09:30 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,537

Rep: Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041
I don't understand what you are asking.
The scheduler(s) manage the I/O for you, delaying the physical I/O variously from some few milliseconds to a few seconds. You shouldn't be able to discern this in a normal environment with mixed I/O and CPU consumption.
 
Old 08-20-2008, 08:11 PM   #5
bichonfrise74
LQ Newbie
 
Registered: Jul 2008
Posts: 24

Original Poster
Rep: Reputation: 15
I'm just confused because I know there is a lot of activity based on result of iostat (unless I am not interpreting the result of iostat correctly) but somehow top does not show any activity in %iowait.
 
Old 08-20-2008, 08:31 PM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,537

Rep: Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041
What you are seeing looking at is "activity" from the application(s) point of view. Those I/Os get buffered up and issued at the discretion of various components - chiefly the scheduler. This optimises the usage of the disk - things like head movement. As you've noticed, this (usually) works a treat.
Developers (and users) being protected from themselves ....
 
Old 08-20-2008, 11:36 PM   #7
cyclepathology
LQ Newbie
 
Registered: Sep 2007
Location: Seattle, WA
Distribution: Red Hat, Ubuntu, PCLinuxOS, Fedora, Vector Linux, CentOS, HP-UX, Solaris, AIX, FreeBSD
Posts: 28

Rep: Reputation: 15
Quote:
Originally Posted by bichonfrise74 View Post
Iostat shows that the Blk_read/s and Blk_wrtn/s is around 500 blocks / seconds and yet the %iowait is at 10% only.

Shouldn't the %iowait being huge if there is constant reading and writing to the disk???

Thanks.
These questions are easier to answer if you've got some sort of baseline to compare it to. I've got some Oracle servers that normally run about 10 times that much I/O. But I know that's normal, so it's OK. Big iron hardware, EMC Symmetrix disk array. On my desktop system, 500 blocks/sec would be unusual, and I'd expect the SATA drive to be a bottleneck.

It depends.
 
Old 08-21-2008, 11:52 AM   #8
bichonfrise74
LQ Newbie
 
Registered: Jul 2008
Posts: 24

Original Poster
Rep: Reputation: 15
That makes a lot of sense! Without a baseline to compare, I am not sure if the %iowait is high or not. Thanks!
 
  


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
dm0 in iostat??? your_shadow03 Linux - Newbie 6 08-28-2009 02:44 PM
iostat question mokku Linux - Newbie 3 06-26-2008 09:04 PM
iostat question hcclnoodles Solaris / OpenSolaris 4 10-16-2006 02:14 PM
iostat Volcano Linux - Newbie 3 10-04-2005 09:28 AM
iostat FragInHell Solaris / OpenSolaris 2 07-02-2004 05:02 AM


All times are GMT -5. The time now is 01:51 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration