I have a confusion about the (CPU WAIT)

1-Is CPU wait always a wait on I/O?

2-will Memory and Virtual memory have anything to do with CPU wait?

3-if a system has lots of CPU wait will adding more CPU or cores fix this problem?

4-what is the best OS tool to report CPU wait other than VMSTAT?
LVL 11
Who is Participating?
1 - CPU WAIT is basically the time a CPU has to wait for an outstanding I/O operation to complete. %WAIT is the time (expressed as a percentage) a CPU has been found waiting for I/O during a given interval.
The system will schedule other processes to run during the time a process is blocked waiting for I/O, so a high overall WAIT means that there are either no more processes to schedule or that the whole I/O system is overloaded (or both).

2 - Low real memory can lead to high paging I/O, which will adversely influence the response time of process I/O (I/O contention).
Further, there might be too few memory available for caching disk data which in turn leads to more frequent, maybe expensive read operations.

Virtual memory (sum of real memory and paging space) can come into play when the paging space gets full, but that's another story.

3 - More CPU will not help. Depending on the root cause of the high WAIT provide for faster disks (shorter I/O operation time) or more memory to avoid paging and to supply cache space.

4 - If we're talking AIX here:

topas, nmon, lparstat, iostat (disk troughput) , mpstat (wait per cpu), sar (disk service time)

Please note that in a virtual shared processor environment (LPAR) the WAIT % does not express the wait percentage of a real CPU but the wait percentage of the CPU share made available to the LPAR by the hypervisor.

nmon provides the option to query the PURR (Processor Utilized Resource Register) to show the values pertaining to real CPU.
Start nmon, hit "c", then "#" untill you see "PURR Stats" in the 3rd line. The lines below show real processor values, one line per real SMT thread useable by the LPAR.

So nmon might indeed be the best tool in an LPAR environment.
it-rexAuthor Commented:
When using Ganglia ,
how can I find the root cause of CPU wait?
Is it a graphical representation of wa in vmstat?
Ganglia's gmond uses lots of OS calls/tools to gather its stats.

As far as I know, CPU WAIT is determined by standard perflib calls which are also used by vmstat, mpstat or topas. I'm not aware of a gmond extension or feature using the PURR.
it-rexAuthor Commented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.