<div dir="ltr">It works great after I comment out "<span style="font-family:arial,sans-serif;font-size:13px">open_conn_lmt </span>". Thanks a lot Dmitry. <div><br></div><div><br></div><div><br></div><div><br></div>
<div style>Cheers, </div><div style>Jacky</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jul 3, 2013 at 3:29 PM, Dmitry Kurochkin <span dir="ltr"><<a href="mailto:dmitry.kurochkin@measurement-factory.com" target="_blank">dmitry.kurochkin@measurement-factory.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Jacky.<br>
<div><div class="h5"><br>
unjc email <<a href="mailto:unjc.email@gmail.com">unjc.email@gmail.com</a>> writes:<br>
<br>
> Hello there,<br>
><br>
> I have a question about enabling persistent connections in workload. The<br>
> following is how I setup the server and robot in the pg file; as shown,<br>
> pconn_use_lmt is set to 1000.<br>
><br>
><br>
> Server S1 = {<br>
> kind = "S101";<br>
> contents = [ JpgContent: 73.73%, HtmlContent: 11.45%, SwfContent:<br>
> 13.05%, FlvContent: 0.06%, Mp3Content: 0.01%, cntOther ];<br>
> direct_access = contents;<br>
> addresses = [ '<a href="http://25.57.0.10:9090" target="_blank">25.57.0.10:9090</a>', '<a href="http://25.57.0.11:9090" target="_blank">25.57.0.11:9090</a>' ]; // where to<br>
> create these server agents<br>
> http_versions = [ "1.0" ]; // newer agents use HTTP/1.1 by default<br>
> pconn_use_lmt = const(1000); // Persistent connections - should tune<br>
> this value<br>
> };<br>
><br>
><br>
> // Note that this Robot has an undefined request-rate in order to enable a<br>
> // best-effort workload.<br>
> Robot R = {<br>
><br>
> kind = "R101";<br>
> pop_model = { pop_distr = popUnif(); };<br>
> recurrence = 50%;<br>
> req_rate = undef();<br>
> origins = S1.addresses; // where the origin servers are<br>
><br>
> addresses = robotAddrs(authAddrScheme, theBench);<br>
> pconn_use_lmt = const(1000); // Persistent connections - should tune<br>
> this value<br>
> open_conn_lmt = 1; // maximum concurrent connections<br>
> http_versions = [ "1.0" ]; // newer agents use HTTP/1.1 by default<br>
> };<br>
><br>
><br>
> I examine the tcp streams of tcpdump output from the client machine, in a<br>
> single-robot test; although "connection: keep-alive" are found in both<br>
> request and respond headers, I see client issue [FIN, ACK]'s every few<br>
> (<10) requests, that is way before 1000 requests they make.<br>
><br>
><br>
> GET /w1b7335ec.2b642c95:00000008/t03/_0000413f.jpg HTTP/1.0<br>
> Accept: */*<br>
> Host: <a href="http://25.57.0.10:9090" target="_blank">25.57.0.10:9090</a><br>
> X-Xact: 1b7335ec.2b642c95:00000002 1b7335ec.2b642c95:00020522 0<br>
> X-Loc-World: 1b7335ec.2b642c95:00000008 -1/16703 8351<br>
> X-Rem-World: 1b7335ec.2b642c95:00000008 -1/16703 8351<br>
> X-Target: <a href="http://25.57.0.10:9090" target="_blank">25.57.0.10:9090</a><br>
> X-Abort: -324104509 -1205953971<br>
> X-Phase-Sync-Pos: 0<br>
> Connection: keep-alive<br>
><br>
> HTTP/1.0 200 OK<br>
> Cache-Control: private,no-cache<br>
> Pragma: no-cache<br>
> Date: Wed, 03 Jul 2013 19:50:22 GMT<br>
> Connection: keep-alive<br>
> Content-Length: 9479<br>
> Content-Type: image/jpeg<br>
> X-Target: <a href="http://25.57.0.10:9090" target="_blank">25.57.0.10:9090</a><br>
> X-Xact: 1b7335e7.5e615116:00000002 1b7335ec.2b642c95:7ffdfadd 0<br>
> X-Rem-World: 1b7335ef.4e10652d:00000008 -1/15998 7999<br>
> X-Abort: 2013317368 2072661844<br>
> X-Phase-Sync-Pos: 0<br>
><br>
<br>
</div></div>You set the maximum number of open connections per Robot to 1. This<br>
means that every time a Robot needs to make a request to a server<br>
different from the previous request, it has to close the existing<br>
idle persistent connection. The persistent connection can only be<br>
reused if the next request happens to target the same server as the<br>
previous one. Otherwise the existing connection has to be closed to<br>
honor the open_conn_lmt setting.<br>
<br>
This would work in case there is just one origin server or a proxy is<br>
used. For two servers and no proxy you should set open_conn_lmt to 2 at<br>
least. Or just leave it unset, a Robot should not use more than 2<br>
connections anyway.<br>
<div class="im"><br>
><br>
> I also found the robot machine runs out of ephemeral ports shortly after<br>
> the starrt of the single-robot test. The ulimit value of the machine<br>
> is 65536. I am surprised to see this if the persistent connections are<br>
> being used. FYI, this is non-proxy test.<br>
><br>
<br>
</div>As described above, persistent connections are effectively disabled<br>
(i.e. rarely reused) in your workload. Clients have to close<br>
connections and open new ones at a high rate. Hence ephemeral ports run<br>
out.<br>
<div class="im"><br>
> 003.04| EphPortMgr.cc:23: error: 4096/8191 (s98) Address already in use<br>
> 003.04| OS probably ran out of ephemeral ports at <a href="http://25.57.100.2:0" target="_blank">25.57.100.2:0</a><br>
> 003.04| Client.cc:347: error: 4096/8192 (c63) failed to establish a<br>
> connection<br>
> 003.04| 25.57.100.2 failed to connect to <a href="http://25.57.0.11:9090" target="_blank">25.57.0.11:9090</a><br>
><br>
><br>
><br>
> Would you please kindly advise what I might configure wrong?<br>
><br>
<br>
</div>I hope the above helps.<br>
<br>
Regards,<br>
Dmitry<br>
<br>
><br>
><br>
> Thanks,<br>
> Jacky<br>
> _______________________________________________<br>
> Users mailing list<br>
> <a href="mailto:Users@web-polygraph.org">Users@web-polygraph.org</a><br>
> <a href="http://www.web-polygraph.org/mailman/listinfo/users" target="_blank">http://www.web-polygraph.org/mailman/listinfo/users</a><br>
</blockquote></div><br></div>