<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:o =
"urn:schemas-microsoft-com:office:office" xmlns:w =
"urn:schemas-microsoft-com:office:word"><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2802" name=GENERATOR>
<STYLE>@page Section1 {size: 8.5in 11.0in; margin: 1.0in 1.25in 1.0in 1.25in; }
P.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
LI.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
DIV.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
A:link {
        COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
        COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
        COLOR: purple; TEXT-DECORATION: underline
}
P.MsoPlainText {
        FONT-SIZE: 10pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Courier New"
}
LI.MsoPlainText {
        FONT-SIZE: 10pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Courier New"
}
DIV.MsoPlainText {
        FONT-SIZE: 10pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Courier New"
}
SPAN.EmailStyle17 {
        COLOR: windowtext; FONT-FAMILY: Arial; mso-style-type: personal-compose
}
DIV.Section1 {
        page: Section1
}
</STYLE>
</HEAD>
<BODY lang=EN-US vLink=purple link=blue>
<DIV dir=ltr align=left><SPAN class=493563718-06022006><FONT face=Arial
color=#0000ff size=2>That basically matches my experience. </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=493563718-06022006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=493563718-06022006><FONT face=Arial
color=#0000ff size=2>Everything goes fine until the server starts to swap. So,
;-), try to not bring it into swapping. </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=493563718-06022006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=493563718-06022006><FONT face=Arial
color=#0000ff size=2>We have had 20k users with 1 message per 1 user in 1 minute
-> 20k messages/minute on a 1GB machine for days. No problems so far.
</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=493563718-06022006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=493563718-06022006><FONT face=Arial
color=#0000ff size=2>The restriction that i found is the memory consumption
- it goes linear up through the ceiling. With 1GB of Ram, 22k is the max
for our linux machine. .</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=493563718-06022006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=493563718-06022006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=493563718-06022006><FONT face=Arial
color=#0000ff size=2>Cheers,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=493563718-06022006><FONT face=Arial
color=#0000ff size=2>Ulrich</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=493563718-06022006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV><BR>
<DIV class=OutlookMessageHeader lang=de dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>Von:</B> ejabberd-bounces@jabber.ru
[mailto:ejabberd-bounces@jabber.ru] <B>Im Auftrag von </B>Bryan
Barnes<BR><B>Gesendet:</B> Montag, 6. Februar 2006 19:36<BR><B>An:</B>
ejabberd@jabber.ru<BR><B>Betreff:</B> [ejabberd] Jab_simul crashing ejabberd
service<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV class=Section1>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">Hello,<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">I am running Ejabberd 1.0.0 with Erlang 10B-8. I am
using Jab_simul to benchmark the system, and am using
http://tkabber.jabber.ru/files/badlop/jab_simul.xml.chat60 as a baseline for my
testing. I have modified it for my server, and turned off rostering. I can run
the test successfully, and as I lower the message frequency my performance
degrades as I expected it to. However, I notice that during these tests my
server occasionally spikes in memory usage and begins using swap space, then the
jabber service refuses all further connections.<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">The test will run with no errors for about an hour with
message frequency of 500 ms, then in the space of 5 minutes the memory usage
will spike from 400MB to 2GB and the swap space usage will jump from 0MB to 1GB.
Then all current connections are dumped and all further connections are refused.
Even if I restart the ejabberd service I am unable to log in, and have to
restart the server before I can connect again.<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">I am running Gentoo 2.6.14-r5 with 2GB of memory and a
1GB NIC. I have ejabberd starting as a service with the following command
line:<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">ulimit -n 15000;/usr/local/bin/erl -pa
/var/lib/ejabberd/ebin -sname ejabberd -s ejabberd -env ERL_MAX_PORTS 5000 -env
ERL_MAX_ETS_TABLES 20000 -ejabberd config \"/etc/ejabberd/ejabberd.cfg\"
log-path \"/var/log/ejabberd.log\" -sasl sasl_error_logger
\{file,\"var/log/ejabberd/sasl.log\"\} -mnesia dir \"var/lib/ejabberd/spool\" +P
250000 +K true -detached<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" color=black size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: black"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoPlainText><B><FONT face="Courier New" color=black size=2><SPAN
style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; COLOR: black">After
troubleshooting:<o:p></o:p></SPAN></FONT></B></P>
<P class=MsoPlainText><FONT face="Courier New" color=black size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: black"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" color=black size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: black">No error messages appear on the ejabberd
server, I checked the ejabberd.log, sasl.log, and the server logs. All of the
errors appeared on the Jab_simul server.<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" color=black size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: black"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" color=black size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: black">I figured out that every time the server
crashed the ejabberd server, the jab_simul server had run out of disk space. I
assumed this was unrelated, but setup a cron job to delete the tmp log files.
This did make the error go away, and I was able to run a simulation for 70 hours
this weekend with no errors. I had 500 users with a message frequency of 100 ms
using 160MB of memory.<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" color=black size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: black"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" color=black size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: black">I was able to recreate the error even with
these settings by adding an additional 300 users, bringing me to 800 total. The
job runs for 5 minutes, then I start getting Kolejka za dluga, pakiet anulowany!
errors. Shortly after that I get POLLERR: Connection terminated and POLLERR:
Connection refused errors. All of these errors occur on the Jab_simul
server.<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" color=black size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: black"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" color=black size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: black">Checking my ejabberd server, my beam
service has become a zombie process, and is still running, but refuses all
connections. The memory usage on the server spiked and then came back down after
the beam service crashed.<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" color=black size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: black"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" color=black size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: black">If I dial the message frequency back to
500 ms with 800 users, it runs.<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" color=black size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: black"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" color=black size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: black">I don't understand the interaction between
ejabberd and jab_simul enough to understand why this is happening, but I am
concerned that the POLLERR errors are causing my ejabberd server to crash. I was
unable to find any mention of this problem, has anything like it occurred
before?<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" color=black size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: black"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoPlainText><B><FONT face="Courier New" color=black size=2><SPAN
style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; COLOR: black">After even more
troubleshooting:<o:p></o:p></SPAN></FONT></B></P>
<P class=MsoPlainText><FONT face="Courier New" color=black size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: black"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" color=black size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: black">I have discovered that if I restart the
ejabberd service, then I am still unable to connect using a Jabber client, but
that if I restart the server I am able to connect
again.<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" color=black size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: black"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" color=black size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: black">If I leave the Jab_simul simulation
running, it will reconnect to Jabber after a server restart, but not a service
restart. For all of the test data above I was using the default message in
the .xml file.<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" color=black size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: black"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" color=black size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: black">Any assistance with this would be greatly
appreciated. Thank you.<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Bryan
Barnes</SPAN></FONT> <o:p></o:p></P>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"><o:p> </o:p></SPAN></FONT></P></DIV></BODY></HTML>