[ejabberd] ejabberd mod_muc bottleneck

Karthik Kailash karthik at socialvisioninc.com
Tue Jun 22 23:34:18 MSD 2010


Hi Eric,

 

Thanks for your insight.  I have attached my Tsung configuration file.

 

So do you think that optimizing mod_muc to use multiple worker processes to
handle messages is valid?

 

Regarding mochiglobal, would the usage of that be to read in all the mnesia
values into memory at the beginning, and then access them from there?

 

Cheers,

Karthik

 

Karthik Kailash | Product

SocialVision, Online Television Becomes a Social Experience

CELL . 408.768.7704  | WEB . www.socialvisioninc.com | FACEBOOK .
<http://www.facebook.com/socialvision> facebook.com/socialvision | TWITTER .
<http://twitter.com/socialvision> twitter.com/socialvision

 

From: ejabberd-bounces at jabber.ru [mailto:ejabberd-bounces at jabber.ru] On
Behalf Of Eric Cestari
Sent: Sunday, June 20, 2010 9:22 AM
To: ejabberd at jabber.ru
Subject: Re: [ejabberd] ejabberd mod_muc bottleneck

 

Hi Karthik,

Several notes : 

- having a single process receiving events and delegating to another process
is an erlang design pattern. It's a bit different here, because it's routing
XMPP stanzas and not just erlang terms.

- however this single process should only route messages to achieve good
throughput. In the case of mod_muc it's also doing synchronous stuff like
creating the rooms, so I can understand it might get behind in processing
its message queue.

 

I've looked at the profile output file. I don't see weird things. 

I note that ACL matching is in the critical path and could be optimized by
using Bob Ippolito's mochiglobal
(http://code.google.com/p/mochiweb/source/browse/trunk/src/mochiglobal.erl?r
=15). It's a pretty neat piece of code that could replace mnesia in
ejabberd_config (and in ejabberd_router if necessary). Writes are pretty
expensive, but it's rarely done and usually on startup.

 

I might write a patch.

Can you link your tsung scenario somewhere ?

 

Best regards,

            Eric

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.jabber.ru/pipermail/ejabberd/attachments/20100622/acbe1d65/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: muc.xml
Type: text/xml
Size: 13517 bytes
Desc: not available
URL: <http://lists.jabber.ru/pipermail/ejabberd/attachments/20100622/acbe1d65/attachment.xml>


More information about the ejabberd mailing list