Find the answer to your Linux question:
Results 1 to 6 of 6
Please help! I'm fairly new to server admin. I'm running an application on an Ubuntu (Jaunty) Linux box. Recently it's been getting very slow. I read that this could be ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2011
    Posts
    4

    Help with vmstat and apache processes


    Please help! I'm fairly new to server admin. I'm running an application on an Ubuntu (Jaunty) Linux box. Recently it's been getting very slow. I read that this could be due to problems with memory and/or I/O. I've run vmstat -S M 2 and have got this output (see attached image).

    The problem is I've no idea how to interpret what's going on... The wa column seems really high and bi shoots up whenever someone searches the site. What's this telling me about my system??

    Thanks
    Attached Images Attached Images

  2. #2
    Linux Guru coopstah13's Avatar
    Join Date
    Nov 2007
    Location
    NH, USA
    Posts
    3,149
    if you read the man page for vmstat, it says that the WA column under CPU is time spent waiting for IO, at 95% that means that 95% of your CPU time is being spent waiting for IO operations to complete, which is really bad, BI and BO are the blocks/s received and sent

  3. #3
    Just Joined!
    Join Date
    Jun 2011
    Posts
    4
    coopstah13 thanks for replying so quickly. I'd kind of got that far but I'm not sure what "waiting for IO operations to complete" means. i.e. What's causing there to be so much waiting time - (or the likely cause, or common causes)? What do I need to adjust in order to reduce the waiting time?

    As I said I'm pretty new to all this so please forgive newbie questions...

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Jun 2011
    Posts
    4
    can anyone else help? I'm really rather stuck... thanks

  6. #5
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,422
    to get a more detailed view, install the sysstat package.

    This command will reveal, which blockdevice is busy and with what:
    Code:
    iostat -mx 1
    Look for %util. 100% is bad.
    Then determine, what makes it busy. read, write or read and write?


    After the device is clear, match it to the mountpoint.
    Code:
    cat /etc/fstab
    With the mountpoint, look for applications accessing it
    Code:
    lsof |grep "<mountpoint>"
    In general:
    If you have multiple daemons using the same disk: bad
    Even one daemon with multiple files open on the same disk (DB files, db temp files, logfiles, dumpfiles) is bad and could be splitted to multiple spindles.

    Another point is to analyse your applications:
    What are they reading/writing and how often?

    etc, etc
    But I hope you find a starting point here


    Up to now, everything is possible:
    - the app could be badly designed
    - maybe simply the hardware limit of the disk is reached
    - a degraded raid may also lead to reduced performance
    - etc
    You must always face the curtain with a bow.

  7. #6
    Just Joined!
    Join Date
    Jun 2011
    Posts
    4
    Thank you Irithori. I'll dig around and see what I can find! Much appreciated

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •