Persistent Connections

unjc email unjc.email at gmail.com
Thu Jul 4 13:33:59 UTC 2013


It works great after I comment out "open_conn_lmt ".   Thanks a lot Dmitry.





Cheers,
Jacky


On Wed, Jul 3, 2013 at 3:29 PM, Dmitry Kurochkin <
dmitry.kurochkin at measurement-factory.com> wrote:

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


More information about the Users mailing list