Results 1 to 7 of 7

Thread: Trying to figure out my CPU limits

  1. #1
    Join Date
    Apr 2010
    Posts
    4

    Exclamation Trying to figure out my CPU limits

    Hello,

    I am running Link 3 on Xen (Ubuntu). I have some scripts running in the background interfering with local PostgreSQL database. My load average is always 1.0+. Figured I will use "top -S" to see what process is the bottleneck here, but all I can see for column "%CPU" is a value that never gets past 5-20%. That is, my VPS never use 100% CPU usage according to top command.

    Could someone explain the difference of load average values from top command output. Also, how do you know your plan CPU capabilities exactly? Can I assume that if I upgrade to Link 4 I will get twice the time for CPU computations?

    Simas

  2. #2
    Join Date
    Jul 2009
    Location
    New York
    Posts
    464

    Default

    what's the iowait?
    Happily on a Link3. Feel free to request a refferal code that takes a 10% lifetime discount off your hosting.
    Please open a SUPPORT TICKET AND CALL vpslink to resolve your vpslink problems FIRST
    I am a CUSTOMER Only. Any vpslink issues should be directed to Matt@VPSLink and/or Michael@VPSLink

  3. #3
    Join Date
    Apr 2010
    Posts
    4

    Default

    iowait is reported as value 12.34 - I am not sure I know exactly what it means. Is it somehow related to disk I/O? Also, I am adding some top/iostat command outputs. I would appreciate if someone could help shed some light on this.

    Code:
    Linux 2.6.18-128.7.1.el5xen (spold)     04/23/10        _i686_  (2 CPU)
    
    avg-cpu:  %user   %nice %system %iowait  %steal   %idle
               0.44    0.00    0.13   12.34    1.30   85.80
    
    Device:            tps   Blk_read/s   Blk_wrtn/s   Blk_read   Blk_wrtn
    sda1             21.99         7.62       297.50   48561362 1896069448
    sda2              0.00         0.00         0.00       2376       2592
    Code:
    top - 11:11:26 up 73 days, 18:23,  1 user,  load average: 1.64, 2.14, 2.52
    Tasks:  71 total,   3 running,  68 sleeping,   0 stopped,   0 zombie
    Cpu(s):  3.6%us,  0.2%sy,  0.0%ni, 49.3%id, 45.7%wa,  0.0%hi,  0.2%si,  1.0%st
    Mem:    262320k total,   205220k used,    57100k free,      976k buffers
    Swap:   524280k total,      124k used,   524156k free,   155416k cached
    
      PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
    19689 postgres  18   0 38712  33m  31m R    7 13.1   1:59.05 postmaster
    19687 root      15   0 16384 7820 4056 S    0  3.0   0:19.93 php
        1 root      15   0  2168  804  692 S    0  0.3 762:12.14 init
        2 root      RT  -5     0    0    0 S    0  0.0   0:09.96 migration/0
        3 root      34  19     0    0    0 S    0  0.0   0:00.04 ksoftirqd/0
        4 root      RT  -5     0    0    0 S    0  0.0   0:00.00 watchdog/0
        5 root      10  -5     0    0    0 S    0  0.0   0:00.17 events/0
        6 root      18  -5     0    0    0 S    0  0.0   0:00.00 khelper
        7 root      11  -5     0    0    0 S    0  0.0   0:00.00 kthread
        9 root      10  -5     0    0    0 S    0  0.0   0:00.00 xenwatch
       10 root      10  -5     0    0    0 S    0  0.0   0:00.00 xenbus
       15 root      RT  -5     0    0    0 S    0  0.0   0:08.72 migration/1
       16 root      39  19     0    0    0 S    0  0.0   0:00.04 ksoftirqd/1
       17 root      RT  -5     0    0    0 S    0  0.0   0:00.00 watchdog/1
       18 root      10  -5     0    0    0 S    0  0.0   0:00.00 events/1
       21 root      10  -5     0    0    0 S    0  0.0   0:00.00 kblockd/0
       22 root      12  -5     0    0    0 S    0  0.0   0:00.08 kblockd/1
       23 root      20  -5     0    0    0 S    0  0.0   0:00.00 cqueue/0
       24 root      10  -5     0    0    0 S    0  0.0   0:00.00 cqueue/1
       28 root      20  -5     0    0    0 S    0  0.0   0:00.00 khubd
       30 root      10  -5     0    0    0 S    0  0.0   0:00.00 kseriod
       93 root      10  -5     0    0    0 S    0  0.0   0:07.16 kswapd0
       94 root      12  -5     0    0    0 S    0  0.0   0:00.00 aio/0
       95 root      12  -5     0    0    0 S    0  0.0   0:00.00 aio/1
      236 root      20  -5     0    0    0 S    0  0.0   0:00.00 kpsmoused
      270 root      20  -5     0    0    0 S    0  0.0   0:00.00 ata/0
      271 root      20  -5     0    0    0 S    0  0.0   0:00.00 ata/1
      272 root      20  -5     0    0    0 S    0  0.0   0:00.00 ata_aux
      279 root      20  -5     0    0    0 S    0  0.0   0:00.00 kstriped
      292 root      20  -5     0    0    0 S    0  0.0   0:00.00 ksnapd
      310 root      10  -5     0    0    0 S    0  0.0   0:52.04 kjournald
      361 root      17  -4  2240  488  300 S    0  0.2   0:00.16 udevd
      913 syslog    18   0  2056  696  540 S    0  0.3   0:46.78 syslogd

  4. #4
    Join Date
    Jul 2009
    Location
    New York
    Posts
    464

    Default

    well a value of just 2.2 can cause cpu to jump to 1. It's probably database swap otherwise open a support ticket. They will generally say you are using excessive swap and tell you to upgrade to more memory.
    Happily on a Link3. Feel free to request a refferal code that takes a 10% lifetime discount off your hosting.
    Please open a SUPPORT TICKET AND CALL vpslink to resolve your vpslink problems FIRST
    I am a CUSTOMER Only. Any vpslink issues should be directed to Matt@VPSLink and/or Michael@VPSLink

  5. #5
    Join Date
    Jun 2008
    Location
    California
    Posts
    338

    Default

    That is a lot of iowait. Are you running something thats very disk intensive?
    Note: my views are my own and do not reflect those of VPSLink

  6. #6
    Join Date
    Apr 2010
    Posts
    4

    Default

    Yep,

    I was running a lot of update/insert operations. But there must be more to it than that. I spent some time optimizing my code and added some throttling to make sure it will not bring my server down. I set it up to keep my load at 0.5 - 0.9 on average. Then I got a notice that my VPS will be migrated to new data-center. And guess what? Once that was done my load went to 0.1 - 0.2. Considering that I did not change my plan there must have been some issues with hardware.

  7. #7
    Join Date
    Jul 2009
    Location
    New York
    Posts
    464

    Default

    they seem to have changed the access of cores in the link packages and probably raid configuration so i'm not surprised your performance has changed.
    Happily on a Link3. Feel free to request a refferal code that takes a 10% lifetime discount off your hosting.
    Please open a SUPPORT TICKET AND CALL vpslink to resolve your vpslink problems FIRST
    I am a CUSTOMER Only. Any vpslink issues should be directed to Matt@VPSLink and/or Michael@VPSLink

Tags for this Thread

Bookmarks

Posting Permissions

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