Koozali.org: home of the SME Server

cpu usage too high

Offline sandoz

  • ***
  • 47
  • +0/-0
cpu usage too high
« on: September 03, 2007, 01:37:59 PM »
since a month or so i noticed my cpu usage is constantly at around 0.60-0.90.
to me it seems no processes are killing the cpu:
Code: [Select]
top - 13:35:30 up  3:29,  1 user,  load average: 1.67, 1.22, 1.02
Tasks: 178 total,   1 running, 168 sleeping,   9 stopped,   0 zombie
Cpu(s): 35.6% us,  3.0% sy,  0.0% ni, 61.4% id,  0.0% wa,  0.0% hi,  0.0% si
Mem:    483428k total,   337944k used,   145484k free,    26664k buffers
Swap:   983032k total,     1384k used,   981648k free,   108012k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 1812 root      17   0  3268 1028  760 R  1.3  0.2   0:09.69 top
 5027 root      16   0  6084 1744 1428 S  0.7  0.4   0:00.02 sshd
 5030 sshd      15   0  6084 1216  888 S  0.7  0.3   0:00.02 sshd
 2539 root      15   0  1880  216  172 S  0.3  0.0   0:07.60 runsv
 5245 root      16   0  7920 1944 1572 S  0.3  0.4   0:08.06 sshd
    1 root      16   0  3072  624  540 S  0.0  0.1   0:01.76 init
    2 root      34  19     0    0    0 S  0.0  0.0   0:00.07 ksoftirqd/0
    3 root       5 -10     0    0    0 S  0.0  0.0   0:00.12 events/0
    4 root       5 -10     0    0    0 S  0.0  0.0   0:00.02 khelper
    5 root      15 -10     0    0    0 S  0.0  0.0   0:00.00 kacpid
   21 root       5 -10     0    0    0 S  0.0  0.0   0:00.00 kblockd/0
   22 root      15   0     0    0    0 S  0.0  0.0   0:00.00 khubd
   39 root      15   0     0    0    0 S  0.0  0.0   0:00.66 pdflush
   40 root      15   0     0    0    0 S  0.0  0.0   0:01.92 pdflush
   42 root       7 -10     0    0    0 S  0.0  0.0   0:00.00 aio/0
   41 root      16   0     0    0    0 S  0.0  0.0   0:08.21 kswapd0
  188 root      25   0     0    0    0 S  0.0  0.0   0:00.00 kseriod
  303 root       6 -10     0    0    0 S  0.0  0.0   0:00.00 kmirrord
  309 root      15   0     0    0    0 S  0.0  0.0   0:00.09 md2_raid1
  311 root      15   0     0    0    0 S  0.0  0.0   0:00.00 md1_raid1
  316 root      15   0     0    0    0 S  0.0  0.0   0:06.26 kjournald
 1284 root       6 -10  2408  444  372 S  0.0  0.1   0:00.02 udevd
 1715 root       6 -10     0    0    0 S  0.0  0.0   0:00.00 kauditd
 1771 root      15   0     0    0    0 S  0.0  0.0   0:00.00 kjournald
 1772 root      19   0     0    0    0 S  0.0  0.0   0:00.00 kjournald
 2243 root      18   0  3468  412  356 S  0.0  0.1   0:00.00 mingetty
 2287 root      18   0  2740  412  356 S  0.0  0.1   0:00.00 mingetty
 2288 root      16   0  2688  300  244 S  0.0  0.1   0:00.04 runsvdir
 2533 root      16   0  1840  216  172 S  0.0  0.0   0:00.00 runsv
 2534 root      16   0  2464  216  172 S  0.0  0.0   0:00.00 runsv
 2538 root      16   0  1464  216  172 S  0.0  0.0   0:00.00 runsv
 2540 root      16   0  3224  216  172 S  0.0  0.0   0:00.00 runsv
 2541 root      16   0  2028  216  172 S  0.0  0.0   0:00.00 runsv
 2542 root      16   0  2368  216  172 S  0.0  0.0   0:00.00 runsv
 2543 root      16   0  2880  216  172 S  0.0  0.0   0:00.00 runsv
 2544 root      16   0  2208  216  172 S  0.0  0.0   0:00.00 runsv
 2545 root      16   0  1808  216  172 S  0.0  0.0   0:00.00 runsv
 2546 root      16   0  2616  216  172 S  0.0  0.0   0:00.00 runsv


what could cause this?

Offline chris burnat

  • *****
  • 1,135
  • +2/-0
    • http://www.burnat.com
Re: cpu usage too high
« Reply #1 on: September 03, 2007, 02:17:27 PM »
When running top you can press "1" (one) to expand the Cpu(s) line.
This should show the culprit.
- chris
If it does not work out of the box, please fill in a Bug Report @ Bugzilla (http://bugs.contribs.org)  - check: http://wiki.contribs.org/Bugzilla_Help .  Thanks.

Offline Daniel B.

  • *
  • 1,700
  • +0/-0
    • Firewall Services, la sécurité des réseaux
Re: cpu usage too high
« Reply #2 on: September 03, 2007, 02:22:38 PM »
You can use htop instead of top, by default it short by CPU usage (maybe so does top, I never use it). I usually find which process eats up ressources with it
C'est la fin du monde !!! :lol:

Offline sandoz

  • ***
  • 47
  • +0/-0
Re: cpu usage too high
« Reply #3 on: September 03, 2007, 05:23:37 PM »
Code: [Select]
  CPU[|||||||||||||||||||                                   29.8%]     Tasks: 158 total, 2 running
  Mem[||||||||||||||||||||||||||||||||||||||||          137/472MB]     Load average: 0.45 0.54 0.47
  Swp[                                                    0/959MB]     Uptime: 03:37:27

Send signal:     PID USER     PRI  NI  VIRT   RES   SHR S CPU% MEM%   TIME+  Command
 0 Cancel      29869 root      17   0  4180  1048   924 S 100.  0.2  0:00.00 /bin/sh ./run
 1 SIGHUP      27065 root      17   0  3040  1100   836 R  1.6  0.2  0:39.12 htop
 2 SIGINT      29870 root      19   0  5724  1832  1296 R  0.8  0.3  0:00.03 /usr/bin/perl -w /sbin/e-smith/db configuration getprop smb st
   16   0  2336   216   172 S  0.0  0.0  0:00.00 runsv cvm-unix-local

it takes up 100% cpu

Offline Daniel B.

  • *
  • 1,700
  • +0/-0
    • Firewall Services, la sécurité des réseaux
Re: cpu usage too high
« Reply #4 on: September 03, 2007, 05:26:35 PM »
It could be a supervised process which have a problem. Maybe a tail -f /var/log/messages can help you
C'est la fin du monde !!! :lol:

Offline judgej

  • *
  • 375
  • +0/-0
Re: cpu usage too high
« Reply #5 on: September 04, 2007, 01:28:51 AM »
A month ago, I found processes within the sme7admin contrib itself was hitting the processor at 100% for much of the time. The problem went away after uninstalling sme7admin.

-- JJ
-- Jason

Offline chris burnat

  • *****
  • 1,135
  • +2/-0
    • http://www.burnat.com
Re: cpu usage too high
« Reply #6 on: September 04, 2007, 01:43:42 AM »
A month ago, I found processes within the sme7admin contrib itself was hitting the processor at 100% for much of the time. The problem went away after uninstalling sme7admin.

-- JJ


Yep, this can happen for example if you enable Activate du -s: in settings.  There is a warning:
"You can choose to activate the computing of the main directories' size of SME. (maybe long and resource-consuming on large disks)"
Disabling this feature is best.
- chris
If it does not work out of the box, please fill in a Bug Report @ Bugzilla (http://bugs.contribs.org)  - check: http://wiki.contribs.org/Bugzilla_Help .  Thanks.

Offline sandoz

  • ***
  • 47
  • +0/-0
Re: cpu usage too high
« Reply #7 on: September 04, 2007, 09:27:21 AM »
looks like samba is eating up resources...What could cause that?
If i stop smb, cpu usage goes down to 0% again

Offline byte

  • *
  • 2,183
  • +2/-0
Re: cpu usage too high
« Reply #8 on: September 04, 2007, 11:06:36 AM »
You haven't said what hardware your running ?
--[byte]--

Have you filled in a Bug Report over @ http://bugs.contribs.org ? Please don't wait to be told this way you help us to help you/others - Thanks!

Offline sandoz

  • ***
  • 47
  • +0/-0
Re: cpu usage too high
« Reply #9 on: September 04, 2007, 11:44:23 AM »
Via Epia MB, 512 Mb ram, 1x40Gb HD(OS), 1x120Gb HD(backup etc), extra ethernet card
actually what is eating the cpu seems to be nmbd

when i do: service smb stop, cpu usage goes down immediately
« Last Edit: September 04, 2007, 11:46:15 AM by sandoz »

Offline judgej

  • *
  • 375
  • +0/-0
Re: cpu usage too high
« Reply #10 on: September 04, 2007, 01:12:26 PM »
Yep, this can happen for example if you enable Activate du -s: in settings.  There is a warning:
"You can choose to activate the computing of the main directories' size of SME. (maybe long and resource-consuming on large disks)"
Disabling this feature is best.

Thanks - I never spotted that. Also not sure about the 'maybe' ;-)
-- Jason

Offline sandoz

  • ***
  • 47
  • +0/-0
Re: cpu usage too high
« Reply #11 on: September 04, 2007, 04:32:59 PM »
problem solved: there was a non exisiting ip adres in the smb.conf
now its ok again