LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-20-2012, 09:14 AM   #1
zQUEz
Member
 
Registered: Jun 2007
Distribution: Fedora, RHEL, Centos
Posts: 294

Rep: Reputation: 54
Am I understanding the output of `top` correctly?


I would like to get opinions on whether my interpretation below is accurate;

Assume the following scenario:

Intel server, RHEL5, 4 core cpu with hyperthreading turned on, thus, /proc/cpuinfo represents 8 CPU's.
Aside from standard Linux background processes, assume a single user process is running - say MySQL or other.
With 8 CPU's, the default header in `top` will represent a single threaded user space process using 100% CPU utlization as 12.5%us. (100% / 8 cores = 12.5)
But, in the process list, that same process will show 100% CPU because it is using it's full CPU thread.

If that same process is completely waiting on disk I/O, then the header of `top` will show a 12.5%wa and basically nothing on the CPU usage for us or sy. If this true, does this represent an application issue that it doesn't use multiple CPU's to satisfy disk I/O? Or is this behaviour normal?

My understanding is that, disk i/o is handled by kswapd, and if the requested blocks aren't already in file cache, then it is ultimatley a single threaded process to retrieve the block from disk, and if that is true, doesn't this mean in this example you would never seen wait's higher than 12.5%?

It seems to me difficult to see if you are disk bound from this aspect, because if your server usage basically comes does to a single thread that is I/O hungry, you won't ever seen high %wa in any sar reports or other.

Have I completely missed the mark on understanding this?
 
Old 01-22-2012, 01:05 AM   #2
Nomad-71
LQ Newbie
 
Registered: Jan 2012
Location: Russia
Distribution: Fedora
Posts: 15

Rep: Reputation: 0
Hi, as i think:
Code:
wa  --  iowait  Amount of time the CPU has been waiting for I/O to complete.
Quote:
If this true, does this represent an application issue that it doesn't use multiple CPU's to satisfy disk I/O?
It represents that your disk is not fast enough to satisfy your demands.
 
Old 01-23-2012, 10:04 AM   #3
zQUEz
Member
 
Registered: Jun 2007
Distribution: Fedora, RHEL, Centos
Posts: 294

Original Poster
Rep: Reputation: 54
Quote:
It represents that your disk is not fast enough to satisfy your demands.
While I agree with that, I would have expected wa to to show closer to 100% because 100% of that thread is waiting for disk. If I had say 4 threads running, but 3 were not io bound and only 1 was, I would still show 12.5% wa, but would really have no idea whether it was 1 thread causing all that io or that was generated by the 4 threads.

However, thanks for your answer because it tells me I must at least be interpreting the output of `top` correctly. I guess that is why you can't use any one tool in isolation.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Tutorial for understanding TOP Command. Raghu140 Linux - General 18 08-01-2010 02:58 PM
understanding top gianh Linux - Software 4 07-25-2007 08:30 PM
understanding netstat output namradi Linux - General 10 01-22-2007 01:04 AM
understanding lm_sensors output Pete Dogg Linux - Software 7 10-15-2003 01:28 AM
Understanding CRON output lhoff Linux - General 1 05-19-2003 01:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:59 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