[ejabberd] Beam 100% CPU usage

Emmanuel Lacour elacour at easter-eggs.com
Fri Jan 8 12:29:50 MSK 2010


Dear ejabberd users/admins/hackers,

I run here a small jabberd 2.0.5 under Debian lenny (backport), with 86
users and an average of 40 users connected.
I use ldap for authentication and vcards.

hardware is a vserver (kvm migration planned) is almost alone on a
Celeron 2.36Ghz with 1G RAM.

We were using jabberd 1.4 and since we use ejabberd, jabber is slow and
the ejabberd beam process uses 100% cpu usage!

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
10445 ejabberd  20   0  360m 194m 2880 R 98.7 19.2   7122:44 beam 

strace shows continuous munmap/mmap2:

[pid 10445] clock_gettime(CLOCK_MONOTONIC, {32292946, 821375025}) = 0
[pid 10445] epoll_wait(3, {}, 256, 0)   = 0
[pid 10445] clock_gettime(CLOCK_MONOTONIC, {32292946, 823385568}) = 0
[pid 10445] clock_gettime(CLOCK_MONOTONIC, {32292946, 823480381}) = 0
[pid 10445] clock_gettime(CLOCK_MONOTONIC, {32292946, 823791380}) = 0
[pid 10445] munmap(0xa5306000, 4730880) = 0
[pid 10445] munmap(0xa3e75000, 8417280) = 0
[pid 10445] mmap2(NULL, 13148160, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xa3e75000
[pid 10445] epoll_wait(3, {}, 256, 0)   = 0
[pid 10445] clock_gettime(CLOCK_MONOTONIC, {32292946, 856476944}) = 0
[pid 10445] clock_gettime(CLOCK_MONOTONIC, {32292946, 856576491}) = 0
[pid 10445] clock_gettime(CLOCK_MONOTONIC, {32292946, 858482298}) = 0
[pid 10445] epoll_wait(3, {}, 256, 0)   = 0
[pid 10445] clock_gettime(CLOCK_MONOTONIC, {32292946, 859207587}) = 0
[pid 10445] munmap(0xa467c000, 4730880) = 0
[pid 10445] munmap(0xa4aff000, 8417280) = 0
[pid 10445] mmap2(NULL, 13148160, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xa4aff000
[pid 10445] clock_gettime(CLOCK_MONOTONIC, {32292946, 885227089}) = 0
[pid 10445] epoll_wait(3, {}, 256, 0)   = 0
[pid 10445] clock_gettime(CLOCK_MONOTONIC, {32292946, 887134193}) = 0
[pid 10445] clock_gettime(CLOCK_MONOTONIC, {32292946, 887225328}) = 0
[pid 10445] munmap(0xa5306000, 4730880) = 0
[pid 10445] munmap(0xa3e75000, 8417280) = 0



any idea to solve this problem?




More information about the ejabberd mailing list