Posted on 2012-08-10
Last Modified: 2012-08-15
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?
Question by:it-rex
    LVL 68

    Accepted Solution

    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.
    LVL 11

    Author Comment

    When using Ganglia ,
    how can I find the root cause of CPU wait?
    Is it a graphical representation of wa in vmstat?
    LVL 68

    Expert Comment

    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.
    LVL 11

    Author Closing Comment


    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Join & Write a Comment

    I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension ( This reminded me of questions tha…
    It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
    Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
    Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    23 Experts available now in Live!

    Get 1:1 Help Now