LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 02-25-2009, 06:01 AM   #1
ginda
Member
 
Registered: Mar 2004
Distribution: SUSE8.2, 9.2, Knoppix
Posts: 323

Rep: Reputation: 31
How can i check iowait


Hi

I have a Cent OS 5.2 (Database & Apache) Server running on vmware and sitting on a SAN.

We are getting high iowait (Please see below)

CPU %user %nice %system %iowait %steal %idle
08:40:02 AM all 4.20 1.95 10.61 78.23 0.00 5.02
08:50:01 AM all 6.23 2.05 9.67 37.82 0.00 44.23
09:00:04 AM all 9.18 2.07 11.37 59.49 0.00 17.88
09:10:01 AM all 11.93 1.91 10.64 74.21 0.00 1.31
09:20:01 AM all 3.94 1.91 9.84 81.47 0.00 2.84
09:30:01 AM all 3.85 2.07 11.03 80.34 0.00 2.71
09:40:01 AM all 3.77 1.68 9.24 82.46 0.00 2.84
09:50:01 AM all 6.97 1.46 9.35 81.31 0.00 0.92
10:00:03 AM all 3.58 2.24 10.14 66.39 0.00 17.65
10:10:01 AM all 3.61 1.79 9.51 84.12 0.00 0.96
10:20:01 AM all 3.34 1.86 9.39 82.98 0.00 2.44
10:30:01 AM all 3.38 1.52 8.79 85.01 0.00 1.29
10:40:01 AM all 3.40 2.08 9.76 82.50 0.00 2.26
10:50:02 AM all 3.45 1.43 8.12 85.73 0.00 1.28
11:00:02 AM all 3.35 1.32 7.76 86.43 0.00 1.15
11:10:01 AM all 3.27 1.97 9.16 78.55 0.00 7.04
Average: all 3.73 1.83 8.87 23.11 0.00 62.45

We did not get this problem when the server was on a physical server. Users complain that the web site is running slow.

I suspect it could be a bottleneck in the database or web code?? Is there a way i can test the iowait for the server?

Thanks in advance
 
Old 02-25-2009, 02:31 PM   #2
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,070

Rep: Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897
Quote:
Originally Posted by ginda View Post
Is there a way i can test the iowait for the server?
Oh, yes. You could try running your app and looking at the iowait numbers. Oh wait, that's just what you've done

You are getting high iowait numbers and the question is why the change from 'real' to 'virtual' has done this? If I were to take a couple of guesses, what about name resolution and access to the disk subsystem. So, what I think you ought to be looking at, in the first instance, is whether name look ups or the disk subsystem have suddenly become slow.

In particular if one of those used to be local and is now virtual (on the same phys machine, but having to go through the virtualisation layer) or distant (on different hardware), that could make sense.
 
Old 02-25-2009, 04:02 PM   #3
kuhazor
Member
 
Registered: Jul 2005
Posts: 36

Rep: Reputation: 15
Paravirtualization / real file system

IO delays could be caused by busy SAN. Check on that first. To improve IO on virtualized server consider running para-virtualized guest OS. RHEL5 and CentOS5 both do that. In addition mount a volume from the SAN and have virtualized OS use that directly as opposed to reading / writing to a image file. With these 2 steps the IO performance should be right on par with the physical system. I remember seeing some redhat benchmarks where system setup this way archive somewhat 95% of non virtualized IO performance.

Here is how to install:

https://www.redhat.com/docs/en-US/Re...t_from_a_shell

I just completed installing one system like this today and it is fast! I am running the system on XEN hypervisor, but VMWare should be able to do the same.

Last edited by kuhazor; 02-25-2009 at 04:04 PM. Reason: Forgot to include information.
 
Old 02-25-2009, 05:43 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
As mentioned, having all the I/O from the guest intercepted is death to (I/O) performance.
As to iowait, all it tells you is that the CPU(s) is/are idle, but there is I/O that hasn't completed. Doesn't tell you how much I/O, nor who is waiting.
You can get an idea of the latter by looking for tasks in state "D". I use the following
Code:
top -b -n 1 | awk '{if (NR <=7) print; else if ($8 == "D") {print; count++} } END {print "Total status D: "count}'
 
  


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
What is iowait? mynameisjohnny Linux - Newbie 2 07-27-2010 05:23 AM
What is iowait, exactly? exscape Linux - Server 2 02-24-2008 05:18 AM
Can anyone explain %iowait? terp4life2001 Linux - Newbie 10 04-20-2007 02:01 AM
Rhe:iowait mastermatics Linux - Enterprise 2 08-26-2006 06:18 AM
Iowait ashley75 Linux - General 25 02-11-2006 11:41 PM

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

All times are GMT -5. The time now is 02:45 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
Open Source Consulting | Domain Registration