[ejabberd] mod_announce serious performance impact?

Badlop badlop at gmail.com
Mon May 19 02:31:57 MSD 2008


On Thu, May 15, 2008 at 9:03 PM, Zbyszek Żółkiewski <zbyszek at toliman.pl> wrote:
> I have noticed (twice in a row) that sending admin messages via mod_announce
> (to all users) is performance killer for server. After hitting "send" button
> server is irresponsible for couple of minutes, and users are unable to
> logon, then server
> (one of nodes) is crashing (i am working in clustered setup). Anyone have
> simlar problems?

So you have 14.000 registered accounts and you use mod_announce to
send a message to all the registered accounts. This means ejabberd
will try to send 14.000 messages.

I imagine that just a small fraction of those accounts have a session
online, let's say 10%. Which means that ejabberd sends 1.400 messages
over C2S, and stores 12.600 messages in the offline_msg table.

I created 15.000 accounts in my test server, logged with an admin
account and sent a message to all them. ejabberd went to 80% CPU for 2
minutes, no RAM increase, I could login correctly during that time.

If you have an ejabberd cluster with 2 nodes, and the offline_msg
Mnesia table replicated, when all those offline messages are stored in
the table of a node, Mnesia must replicate the content to the other
replica.


More information about the ejabberd mailing list