| Author |
Message |
|
| Guest |
Posted: Fri Jun 18, 2010 9:42 pm |
|
|
|
Guest
|
|
| Back to top |
|
| cstar |
Posted: Sun Jun 20, 2010 4:22 pm |
|
|
|
Joined: 05 Jan 2009
Posts: 4
|
Hi Karthik,
Several notes : |
|
|
| Back to top |
|
| Guest |
Posted: Tue Jun 22, 2010 7:34 pm |
|
|
|
Guest
|
|
| Back to top |
|
| cstar |
Posted: Tue Jun 22, 2010 7:46 pm |
|
|
|
Joined: 05 Jan 2009
Posts: 4
|
|
| Back to top |
|
| Guest |
Posted: Thu Jul 01, 2010 2:41 am |
|
|
|
Guest
|
I've been doing more load testing, this is what I've learned.
The bottlenecking in mod_muc is not actually a flaw in the mod_muc process itself, I was wrong to assume that, and the fprof analysis was misleading because fprof itself slowed the system down so much. |
|
|
| Back to top |
|
| Guest |
Posted: Thu Jul 01, 2010 3:55 am |
|
|
|
Guest
|
01.07.2010 12:40, Karthik Kailash wrote:
> *Finally I found the source of ejabberd_router:route's occasional extreme
> slowness is a single mnesia call in ejabberd_sm:do_route.* The line is:
> mnesia:dirty_index_read(session, USR, #session.usr). Sampling using
> timer:tc every few thousand messages, I found that 80-90% of the time, this
> call is fast (< 100 us), but the remaining 10-20% it takes tens of ms to
> complete. This is exactly the same as the ejabberd_router:route behavior.
>
> So I'm pretty certain I've narrowed the bottleneck problem down to this
> line. However, the session table is in RAM and there is an index on the usr
> field, so I can't figure out why this problem is happening!
>
> Any thoughts or ideas?
Hello, Karthik. First of all, your investigation is interesting
However, I cannot reproduce the issue. This is how I reproduce it:
1) Connect with 2 clients and join to some muc conference.
2) Start eprof on the room pid.
3) Route messages from one of the connected users to the room in erlang
shell:
> lists:foreach(fun(_) -> ejabberd_router:route(jlib:make_jid("user",
"domain.com", "resource"), jlib:make_jid("room",
"conference.domain.com", ""), {xmlelement, "message", [{"type",
"groupchat"}], [{xmlelement, "body", [], [{xmlcdata, "a"}]}]}) end,
lists:seq(1, 1000)).
4) Analyze eprof data.
According to your report, there should be
mod_muc_room:process_groupchat_message (and maybe some mnesia functions)
in the top of eprof output, but I don't see this.
On the other hand, according to your symptoms and looking into mnesia
sources I've found that dirty functions call to mnesia:do_dirty_rpc/5
function, which calls rpc:call, here is a snippet:
do_dirty_rpc(Tab, Node, M, F, Args) ->
case rpc:call(Node, M, F, Args) of
{badrpc, Reason} ->
timer:sleep(20), %% Do not be too eager, and can't use yield on SMP
...
do_dirty_rpc(Tab, NewNode, M, F, Args)
This might be a problem in your case. Try to add debug output there to
check if you don't get {badrpc, Reason} in this function.
--
Regards,
Evgeniy Khramtsov, ProcessOne.
xmpp:xram@jabber.ru.
_______________________________________________
ejabberd mailing list
ejabberd@jabber.ru
http://lists.jabber.ru/mailman/listinfo/ejabberd
Post received from mailinglist |
|
|
| Back to top |
|
| Guest |
Posted: Thu Jul 01, 2010 6:28 am |
|
|
|
Guest
|
Hi Evgeniy,
Quote: Hello, Karthik. First of all, your investigation is interesting  However, I cannot reproduce the issue. This is how I reproduce it:
Thanks!
|
|
|
| Back to top |
|
| Guest |
Posted: Thu Jul 01, 2010 6:37 am |
|
|
|
Guest
|
01.07.2010 16:27, Karthik Kailash wrote:
> Also I'm using the ejabberd 2.1.4 source, are you using the same?
Yes, more or less
> I'd be happy to share my Tsung script and my modified ejabberd source
> files.
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.
--
Regards,
Evgeniy Khramtsov, ProcessOne.
xmpp:xram@jabber.ru.
_______________________________________________
ejabberd mailing list
ejabberd@jabber.ru
http://lists.jabber.ru/mailman/listinfo/ejabberd
Post received from mailinglist |
|
|
| Back to top |
|
| Guest |
Posted: Thu Jul 01, 2010 6:49 am |
|
|
|
Guest
|
| Ejabberd 2.1.4 comes with mnesia 4.4.5, but Erlang R13B03 has mnesia 4.4.12. |
|
|
| Back to top |
|
| Guest |
Posted: Thu Jul 01, 2010 6:55 am |
|
|
|
Guest
|
01.07.2010 16:49, Karthik Kailash wrote:
> Ejabberd 2.1.4 comes with mnesia 4.4.5,
What do you mean? Ejabberd doesn't rely on mnesia version and doesn't
have mnesia sources. Or do you use binary installer?
> but Erlang R13B03 has mnesia 4.4.12.
> Is there a difference to use one or the other?
No idea.
--
Regards,
Evgeniy Khramtsov, ProcessOne.
xmpp:xram@jabber.ru.
_______________________________________________
ejabberd mailing list
ejabberd@jabber.ru
http://lists.jabber.ru/mailman/listinfo/ejabberd
Post received from mailinglist |
|
|
| Back to top |
|
| Guest |
Posted: Thu Jul 01, 2010 7:03 am |
|
|
|
Guest
|
On Wed, Jun 30, 2010 at 11:54 PM, Evgeniy Khramtsov <xramtsov@gmail.com (xramtsov@gmail.com)> wrote:
Quote: 01.07.2010 16:49, Karthik Kailash wrote:
Quote: Ejabberd 2.1.4 comes with mnesia 4.4.5,
What do you mean? Ejabberd doesn't rely on mnesia version and doesn't have mnesia sources. Or do you use binary installer?
I used the binary installer.
|
|
|
| Back to top |
|
| Guest |
Posted: Thu Jul 01, 2010 8:46 pm |
|
|
|
Guest
|
| On Wed, Jun 30, 2010 at 11:36 PM, Evgeniy Khramtsov |
|
|
| Back to top |
|
| Guest |
Posted: Wed Jul 07, 2010 4:15 am |
|
|
|
Guest
|
|
| Back to top |
|
| Guest |
Posted: Wed Jul 07, 2010 4:26 am |
|
|
|
Guest
|
Here’s the Tsung configuration file.
|
|
|
| Back to top |
|
| Guest |
Posted: Wed Jul 07, 2010 4:35 am |
|
|
|
Guest
|
|
| Back to top |
|
|
|
All times are GMT
Page 1 of 2
Goto page 1, 2 Next
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|
|