[Server-devel] ejabberd eating lots of CPU time - how to diagnose?

Daniel Drake dsd at laptop.org
Mon May 25 09:45:04 EDT 2009


Running XS-0.5.2 at a school. top shows that ejabberd ("beam.smp") is
using lots of CPU time, in irregular spikes. It has used 43 hours of
CPU time since I last restarted it 3 days ago (restarting did not
change anything). It is a big school but even at times when there are
as few as 33 users connected the situation is the same (and much of
the 43 hours of CPU time will have happened over the weekend when
there were probably even fewer users).

There is nothing in the logs except for the usual lines such as
unset_presence and user_available messages.

strace shows:
1 thread blocked on select(0, NULL, NULL, NULL, NULL
1 thread blocked on read(5,
1 thread blocked on futex(0x8227fc4, FUTEX_WAIT_PRIVATE, 25, NULL
1 thread blocked on futex(0x8250ee4, FUTEX_WAIT_PRIVATE, 3, NULL
1 thread doing lots of reading from
/var/lib/ejabberd/spool/pubsub_item.DAT (2.6mb in size, what is
this?), occasional 1-character reads/writes from pipes, various calls
to futex(), clock_gettime(), and large poll() sets
another thread doing the same things as the one above

The last 2 threads are the ones eating CPU time, unsurprisingly.

Any suggestions for how to diagnose further?

Daniel


More information about the Server-devel mailing list