average cpu load = 3% is that high?

Discussion in 'Server Operation' started by adam, Oct 4, 2006.

  1. adam

    adam New Member

    i am running the perfect debian setup (pretty much from the guide). The only differences is vhcs2 is running my virtual hosting. I don't have anything too funky running so i am wondering if this average of 3% all the time is quite high for a pentium 2.4ghz with 1gb of ram?

    ps aux tells me that

    root 4261 3.4 0.1 7300 1912 ? R Sep12 1114:16 /usr/sbin/saslauthd -m /var/spool/postfix/var/run/saslauthd -r -a rimap -O 127.0.0.1
    root 4262 3.4 0.1 7300 1920 ? R Sep12 1119:30 /usr/sbin/saslauthd -m /var/spool/postfix/var/run/saslauthd -r -a rimap -O 127.0.0.1

    www-data 15880 0.4 1.4 27680 15228 ? S 23:31 0:06 /usr/sbin/apache2 -k start -DSSL
    www-data 15916 0.3 1.5 28100 15680 ? S 23:31 0:05 /usr/sbin/apache2 -k start -DSSL
    www-data 16003 0.3 1.4 27656 15148 ? S 23:31 0:04 /usr/sbin/apache2 -k start -DSSL
    amavis 16056 0.0 3.0 34248 31644 ? S 23:35 0:00 amavisd (child)
    www-data 16661 0.5 1.4 27172 14680 ? S 23:46 0:03 /usr/sbin/apache2 -k start -DSSL
    www-data 16663 0.3 1.2 25576 12876 ? S 23:46 0:02 /usr/sbin/apache2 -k start -DSSL
    www-data 16686 0.3 1.2 25648 13136 ? S 23:48 0:01 /usr/sbin/apache2 -k start -DSSL
    www-data 16820 0.3 1.2 25608 13004 ? S 23:51 0:01 /usr/sbin/apache2 -k start -DSSL
    www-data 16821 0.3 1.1 24740 12308 ? S 23:51 0:00 /usr/sbin/apache2 -k start -DSSL
    www-data 16822 0.4 1.2 25600 13044 ? S 23:51 0:01 /usr/sbin/apache2 -k start -DSSL
    www-data 16945 0.4 1.1 24732 12064 ? S 23:54 0:00 /usr/sbin/apache2 -k start -DSSL
    www-data 16976 0.6 1.3 26032 13384 ? S 23:55 0:00 /usr/sbin/apache2 -k start -DSSL
    www-data 16991 0.5 1.1 24540 11860 ? S 23:55 0:00 /usr/sbin/apache2 -k start -DSSL


    these are the main processes.


    Also, my system ram only ever has about 20mb free? Is this efficient use of ram , i.e using ALL the ram or is it quite high too?

    the server seems to be running ok though.
     
  2. Ben

    Ben HowtoForge Supporter

    Linux tries to allocate as much as making sense and buffers many things. For you it looks like the ram is completely used...
    (more: cat /proc/meminfo)
     
  3. falko

    falko Super Moderator

    As Ben said, Linux caches lots of things, so your memory usage is ok.
     
  4. adam

    adam New Member

    what about the cpu use though?
     
  5. Ben

    Ben HowtoForge Supporter

    in my eyes 3% is not very high, but you have to distinguish load from cpuusage.
    Next thing is, what applications are running on your server and the intensity they are used... so you can't say a cpu usage of x percent is high or low without knowing what really happens on that machine (even saying there are some webpages doing some "simple" DB-requests is too imprecise...)
     
  6. adam

    adam New Member

    yeah thats why i pasted the output of ps aux and listed the things that seemed to be taking up the most processing time. You can see ther that saslauthd is taking up 3.4% all the time .
     
  7. falko

    falko Super Moderator

    I think your system is running fine. Nothing unusual here. :)
     
  8. adam

    adam New Member

    if i do a top command i get 3 processes for saslauthd

    under %cpu all 3 processes are over 30.

    the Cpu(s): reads 95-99% most of the time.

    IS this defintely ok?
     
  9. falko

    falko Super Moderator

    Can you post your top output?
     
  10. adam

    adam New Member

    Code:
    top - 17:57:23 up 26 days,  3:36,  1 user,  load average: 3.54, 3.46, 3.38
    Tasks:  78 total,   5 running,  73 sleeping,   0 stopped,   0 zombie
    Cpu(s): 95.4% us,  3.7% sy,  0.0% ni,  0.0% id,  0.0% wa,  0.5% hi,  0.5% si Mem:   1027912k total,  1014788k used,    13124k free,    72776k buffers
    Swap:  2096472k total,        0k used,  2096472k free,   695556k cached
     Unknown command - try 'h' for help
      PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
     4264 root      25   0  7300 1916 6908 R 26.5  0.2   2797:44 saslauthd
     4261 root      25   0  7300 1912 6908 R 23.8  0.2   2793:09 saslauthd
     4262 root      25   0  7300 1920 6908 R 23.3  0.2   2798:22 saslauthd
    19070 www-data  16   0 25800  12m  19m S  4.6  1.2   0:00.10 apache2
    18998 www-data  15   0 25752  12m  19m S  4.1  1.3   0:00.36 apache2
    18414 www-data  15   0 25680  12m  19m S  2.7  1.3   0:02.17 apache2
    18500 www-data  15   0 25648  12m  19m S  2.7  1.3   0:01.60 apache2 18880 www-data  15   0 25688  12m  19m S  2.3  1.3   0:00.32 apache2
    18833 www-data  15   0 25948  13m  19m S  1.8  1.3   0:00.53 apache2
    18956 www-data  15   0 24816  11m  19m S  1.8  1.2   0:00.28 apache2
    19043 www-data  15   0 24792  11m  19m S  1.8  1.2   0:00.10 apache2
    17241 www-data  15   0 25840  12m  19m S  1.4  1.3   0:05.08 apache2
    17986 www-data  15   0 25564  12m  19m S  1.4  1.3   0:02.68 apache2
    28587 root      16   0 23608  10m  19m S  0.5  1.0   0:03.13 apache2
    19057 root      16   0  2064 1056 1852 R  0.5  0.1   0:00.01 top
        1 root      16   0  1504  512 1352 S  0.0  0.0   0:01.19 init
        2 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 migration/0
        3 root      34  19     0    0    0 S  0.0  0.0   0:00.02 ksoftirqd/0
        4 root       5 -10     0    0    0 S  0.0  0.0   0:02.84 events/0
        5 root       6 -10     0    0    0 S  0.0  0.0   0:00.00 khelper
        6 root      15 -10     0    0    0 S  0.0  0.0   0:00.00 kacpid
       37 root       5 -10     0    0    0 S  0.0  0.0   0:01.16 kblockd/0
       49 root      15   0     0    0    0 S  0.0  0.0   0:10.96 kswapd0
       50 root       5 -10     0    0    0 S  0.0  0.0   0:00.00 aio/0
      186 root      25   0     0    0    0 S  0.0  0.0   0:00.00 kseriod
      315 root      16   0     0    0    0 S  0.0  0.0   1:44.50 kjournald
     1286 root      15   0     0    0    0 S  0.0  0.0   0:00.00 khubd
     3946 root      16   0  2260  796 2092 S  0.0  0.1   0:30.36 syslogd
     3949 root      16   0  2384 1492 1344 S  0.0  0.1   0:00.54 klogd
     3967 amavis    16   0 33852  30m 5220 S  0.0  3.0   0:05.55 amavisd-new
     3976 clamav    16   0 51504  31m 3812 S  0.0  3.1   3:11.42 clamd
     4017 clamav    15   0  4244 1628 3888 S  0.0  0.2   0:02.77 freshclam
     4051 root      19   0  1496  444 1344 S  0.0  0.0   0:00.00 inetd
     4260 root      16   0  7300 1920 6908 S  0.0  0.2   0:00.01 saslauthd
     4263 root      15   0  7300 1920 6908 S  0.0  0.2   0:00.01 saslauthd
     4298 daemon    16   0  1684  628 1520 S  0.0  0.1   0:00.00 atd
     4310 root      16   0  1492  468 1336 S  0.0  0.0   0:00.00 vhcs2_daemon
     4341 root      16   0  1500  484 1336 S  0.0  0.0   0:00.00 getty
     4347 root      16   0  1500  484 1336 S  0.0  0.0   0:00.00 getty
     4348 root      16   0  1500  484 1336 S  0.0  0.0   0:00.00 getty
     4349 root      16   0  1500  484 1336 S  0.0  0.0   0:00.00 getty
     4350 root      16   0  1500  484 1336 S  0.0  0.0   0:00.00 getty
     4356 root      16   0  1500  484 1336 S  0.0  0.0   0:00.00 getty
     5192 root      15   0  2476  732 2164 S  0.0  0.1   0:00.04 couriertcpd
     5194 root      15   0  1672  464 1360 S  0.0  0.0   0:00.03 courierlogger
     5205 root      16   0  2476  732 2164 S  0.0  0.1   0:02.99 couriertcpd
     5207 root      15   0  1672  464 1360 S  0.0  0.0   0:03.28 courierlogger
    14981 root      25   0  3800 1332 3556 S  0.0  0.1   0:00.01 mysqld_safe
    
    here it is :)
     
  11. falko

    falko Super Moderator

    Ok, your system load is not 3%, but more than 300%!

    95.4% is too much. I guess there's a problem with your saslauthd. What's in your mail log?
     
  12. adam

    adam New Member

    Code:
    Oct  9 15:13:41 viking courierpop3login: Connection, ip=[::ffff:81.234.251.174]
    Oct  9 15:13:41 viking courierpop3login: LOGIN: DEBUG: ip=[::ffff:81.234.251.174], command=USER
    Oct  9 15:13:41 viking courierpop3login: LOGIN: DEBUG: ip=[::ffff:81.234.251.174], command=PASS
    Oct  9 15:13:41 viking courierpop3login: LOGIN: DEBUG: ip=[::ffff:81.234.251.174], username=info@todiefor.nu
    Oct  9 15:13:41 viking courierpop3login: authdaemon: starting client module
    Oct  9 15:13:41 viking courierpop3login: authdaemon: ACCEPT, username info@todiefor.nu
    Oct  9 15:13:41 viking courierpop3login: LOGIN, user=info@todiefor.nu, ip=[::ffff:81.234.251.174]
    Oct  9 15:13:41 viking courierpop3login: LOGOUT, user=info@todiefor.nu, ip=[::ffff:81.234.251.174], top=0, retr=0, time=0
    Oct  9 15:13:41 viking courierpop3login: Connection, ip=[::ffff:81.234.251.174]
    Oct  9 15:13:41 viking courierpop3login: LOGIN: DEBUG: ip=[::ffff:81.234.251.174], command=USER
    Oct  9 15:13:41 viking courierpop3login: LOGIN: DEBUG: ip=[::ffff:81.234.251.174], command=PASS
    Oct  9 15:13:41 viking courierpop3login: LOGIN: DEBUG: ip=[::ffff:81.234.251.174], username=info@todiefor.se
    
    i get alot of this. but other than that its just the general log of what goes in and out the mail system.

    urgh help!

    i've stopped the service and CPU went down to 0% and the load decreased.

    I've restarted it and will monitor it and see what happens.


    OK - 20 odd minutes later and it seems to have settled down. Even some ram has freed up. The cpu fluctuates depending on the apache2 load.

    Code:
    top - 15:44:46 up 27 days,  1:24,  1 user,  load average: 0.08, 0.11, 0.66
    Tasks:  79 total,   2 running,  77 sleeping,   0 stopped,   0 zombie
    Cpu(s): 15.2% us,  4.0% sy,  0.0% ni, 79.8% id,  0.7% wa,  0.0% hi,  0.3% si
    Mem:   1027912k total,   886476k used,   141436k free,    67696k buffers
    Swap:  2096472k total,        0k used,  2096472k free,   593604k cached
    
     
    Last edited: Oct 9, 2006
  13. falko

    falko Super Moderator

    That looks much better now. :)
     

Share This Page