Hi Trustin,<div><br></div><div>So I checked the number of sockets in *_WAIT state on both client and server machines, using the following commands</div><div><br></div><div><font class="Apple-style-span" face="'courier new', monospace">server> watch -n1 'lsof -nl | egrep "TCP|UDP" | grep "java" | wc -l '<br>
client> watch -n1 'lsof -nl | grep WAIT | wc -l'</font></div><div><br></div><div>the number of opened sockets on the server oscillates between 0 and 500, while the number of *WAIT sockets on the client is always 0, so I doubt it's related to an overflow of TIME_WAIT or CLOSE_WAIT.</div>
<div><br></div><div>I'll prepare more detailed tests with the HttpCore/NIO version.</div><div><br></div><div> -- Sébastien</div><div><br><div class="gmail_quote">2010/1/6 "Trustin Lee (이희승)" <span dir="ltr"><<a href="mailto:trustin@gmail.com">trustin@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi Sébastien,<br>
<br>
You might be running out of available ports due to many TIME_WAIT either<br>
on the client or server side. Could you confirm it? If so, you need to<br>
wait until the TIME_WAIT state is cleared between each run.<br>
<br>
If HttpCore/NIO version works fine when Netty fails, I'd like to compare<br>
the two to see what the differences are. Please paste or attach the<br>
source code.<br>
<br>
Thanks,<br>
Trustin<br>
<div><div></div><div class="h5"><br>
Sébastien Pierre wrote:<br>
> Hi there !<br>
><br>
> I just moved a test HTTP service from HttpCore/NIO to Netty based on the<br>
> HTTP snoop example. I experienced (despite good performance at first) that<br>
> the server is dropping connections when the load is heavy. To reproduce<br>
> this, simply start the snoop example:<br>
><br>
> java -cp ./src/main/java/:./jar/netty-3.2.0.ALPHA2.jar<br>
> org.jboss.netty.example.http.snoop.HttpServer<br>
><br>
> and then do<br>
><br>
> python -c'for r in range(500,10500,500): import os ; os.system("httperf<br>
> --hog --timeout=60 --client=0/1 --server=127.0.0.1 --port=8080 --uri=/<br>
> --rate=%s --send-buffer=4096 --recv-buffer=16384 --num-conns=10000<br>
> --num-calls=1" % (r))'<br>
><br>
> which is the same as running this command with --rate growing from 500 to<br>
> 10000 with 500 increases.<br>
><br>
> httperf --hog --timeout=60 --client=0/1 --server=127.0.0.1 --port=8080<br>
> --uri=/ --rate=500 --send-buffer=4096 --recv-buffer=16384 --num-conns=10000<br>
> --num-calls=1<br>
><br>
> so in this example, Netty often drops connections between rates of 3000 and<br>
> 5000, which you'll see in httpperf's log with the following lines:<br>
><br>
> httperf: connection failed with unexpected error 98<br>
> ...<br>
> Errors: total 2236 client-timo 0 socket-timo 0 connrefused 0 connreset 0<br>
> Errors: fd-unavail 0 addrunavail 0 ftab-full 0 other 2236<br>
><br>
> I attached a graph where you'll see that for the rate=4000 and rate=45000<br>
> the server just dropped all the connections (from httperf's perspective at<br>
> least). So do you know any way to prevent or at least detect that ?<br>
><br>
> Thanks !<br>
><br>
> -- Sébastien<br>
><br>
> PS: I should add that I've run the test a couple of times, and quite often<br>
> have trouble in the rate=3000-5000 range<br>
><br>
><br>
><br>
</div></div>> ------------------------------------------------------------------------<br>
><br>
> _______________________________________________<br>
> netty-users mailing list<br>
> <a href="mailto:netty-users@lists.jboss.org">netty-users@lists.jboss.org</a><br>
> <a href="https://lists.jboss.org/mailman/listinfo/netty-users" target="_blank">https://lists.jboss.org/mailman/listinfo/netty-users</a><br>
<font color="#888888"><br>
--<br>
what we call human nature in actuality is human habit<br>
<a href="http://gleamynode.net/" target="_blank">http://gleamynode.net/</a><br>
<br>
<br>
</font><br>_______________________________________________<br>
netty-users mailing list<br>
<a href="mailto:netty-users@lists.jboss.org">netty-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/netty-users" target="_blank">https://lists.jboss.org/mailman/listinfo/netty-users</a><br>
<br></blockquote></div><br></div>