[ejabberd] ejabberd mod_muc bottleneck
karthik at socialvisioninc.com
Fri Jul 2 00:45:26 MSD 2010
On Wed, Jun 30, 2010 at 11:36 PM, Evgeniy Khramtsov <xramtsov at gmail.com>
> I'd be happy to share my Tsung script and my modified ejabberd source
> That would be great. If the problem is not in do_dirty_rpc/5, then just
> post the script here, so I can borrow it and try in spare time.
Unfortunately I don't think the problem lies in the badrpc case of
do_dirty_rpc. I added an error_logger statement there but did not see
anything in ejabberd.log.
I decided to profile the functions being called in mnesia. The control flow
that I traced was mnesia:dirty_index_read -> mnesia_index:dirty_read ->
mnesia:dirty_rpc -> rpc:call -> mnesia_index:dirty_read2 ...
However my results are inconclusive and inconsistent. There were 42 sample
calls to mnesia:dirty_index_read from ejabberd_sm:do_route that took over
10ms. In these mnesia:dirty_index_read calls, only 16 of them had a call to
mnesia_index:dirty_read that took over 10ms. And of these 16, only 9 had a
call to mnesia:dirty_rpc that took over 10ms. (NOTE: 10ms is just a point
of comparison here. In reality they were all over 30us. All the samples
follow a similar pattern, they are either < 100us or close to 30000 us).
I'm really lost now -- it seems like the times just aren't adding up and I
can't find a single place in mnesia to look for the bottleneck. Soon I will
upload all the files I'm using -- the Tsung configuration file as well as
all modified ejabberd and mnesia source files. The modifications are made
from ejabberd source taken from the 2.1.4 source download, and from mnesia
source in Erlang R13B03. I tried attaching them to this e-mail last night,
but I think the overall attachment size exceeded the list limits.
"Online Television Becomes a Social Experience"
Phone: (408) 768-7704
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ejabberd