Hi All,<div><br></div><div>Few days back I was trying to evaluate the performance of upstream keepalive feature for a website when I noticed a rather unexpected behaviour. It would be help me understand what's going on in the test.</div>
<div><br></div><div>Here's what I did:</div><div>1. Setup httperf to run a session load. This basically means that a text file with different urls is supplied to httperf. httperf sends all the requests in bursts spaced by a sec towards nginx.</div>
<div><br></div><div>2. Tcpdump is run on the machine</div><div><br></div><div>3. Before the tests begin, cache is cleared and nginx restarted</div><div><br></div><div>4. Test is repeated with httperf "replaying" the requests 1 time first, and re-run with repeat count 4 to account for setup of connections/cache priming etc</div>
<div><br></div><div>5. All the steps are repeated once without keepalive and with keepalive 512;</div><div><br></div><div>Results:</div><div><table class="confluenceTable" style="font-size:13px;line-height:17px;color:rgb(51,51,51);clear:left;background-image:none;background-color:rgb(255,255,255);margin-top:5px;margin-right:0px;margin-bottom:5px;margin-left:0px;border-collapse:collapse;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;font-family:Arial,Helvetica,FreeSans,sans-serif;text-align:left">
<tbody><tr style="font-size:10pt;line-height:13pt;background-image:none;background-color:initial"><th class="confluenceTh" style="font-size:10pt;line-height:13pt;color:rgb(0,0,0);padding-top:5px;padding-right:5px;padding-bottom:5px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(221,221,221);border-right-color:rgb(221,221,221);border-bottom-color:rgb(221,221,221);border-left-color:rgb(221,221,221);background-color:rgb(240,240,240);vertical-align:top;min-width:0.6em">
Session</th><th class="confluenceTh" style="font-size:10pt;line-height:13pt;color:rgb(0,0,0);padding-top:5px;padding-right:5px;padding-bottom:5px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(221,221,221);border-right-color:rgb(221,221,221);border-bottom-color:rgb(221,221,221);border-left-color:rgb(221,221,221);background-color:rgb(240,240,240);vertical-align:top;min-width:0.6em">
Keep alive</th><th class="confluenceTh" style="font-size:10pt;line-height:13pt;color:rgb(0,0,0);padding-top:5px;padding-right:5px;padding-bottom:5px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(221,221,221);border-right-color:rgb(221,221,221);border-bottom-color:rgb(221,221,221);border-left-color:rgb(221,221,221);background-color:rgb(240,240,240);vertical-align:top;min-width:0.6em">
Conns upstream</th><th class="confluenceTh" style="font-size:10pt;line-height:13pt;color:rgb(0,0,0);padding-top:5px;padding-right:5px;padding-bottom:5px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(221,221,221);border-right-color:rgb(221,221,221);border-bottom-color:rgb(221,221,221);border-left-color:rgb(221,221,221);background-color:rgb(240,240,240);vertical-align:top;min-width:0.6em">
Conn Time</th><th class="confluenceTh" style="font-size:10pt;line-height:13pt;color:rgb(0,0,0);padding-top:5px;padding-right:5px;padding-bottom:5px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(221,221,221);border-right-color:rgb(221,221,221);border-bottom-color:rgb(221,221,221);border-left-color:rgb(221,221,221);background-color:rgb(240,240,240);vertical-align:top;min-width:0.6em">
Unique upstream hosts</th><th class="confluenceTh" style="font-size:10pt;line-height:13pt;color:rgb(0,0,0);padding-top:5px;padding-right:5px;padding-bottom:5px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(221,221,221);border-right-color:rgb(221,221,221);border-bottom-color:rgb(221,221,221);border-left-color:rgb(221,221,221);background-color:rgb(240,240,240);vertical-align:top;min-width:0.6em">
Reqs upstream</th><th class="confluenceTh" style="font-size:10pt;line-height:13pt;color:rgb(0,0,0);padding-top:5px;padding-right:5px;padding-bottom:5px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(221,221,221);border-right-color:rgb(221,221,221);border-bottom-color:rgb(221,221,221);border-left-color:rgb(221,221,221);background-color:rgb(240,240,240);vertical-align:top;min-width:0.6em">
Avg time to 1st byte</th><th class="confluenceTh" style="font-size:10pt;line-height:13pt;color:rgb(0,0,0);padding-top:5px;padding-right:5px;padding-bottom:5px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(221,221,221);border-right-color:rgb(221,221,221);border-bottom-color:rgb(221,221,221);border-left-color:rgb(221,221,221);background-color:rgb(240,240,240);vertical-align:top;min-width:0.6em">
Max upstream conn reuse</th><th class="confluenceTh" style="font-size:10pt;line-height:13pt;color:rgb(0,0,0);padding-top:5px;padding-right:5px;padding-bottom:5px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(221,221,221);border-right-color:rgb(221,221,221);border-bottom-color:rgb(221,221,221);border-left-color:rgb(221,221,221);background-color:rgb(240,240,240);vertical-align:top;min-width:0.6em">
Client conns (1)</th><th class="confluenceTh" style="font-size:10pt;line-height:13pt;color:rgb(0,0,0);padding-top:5px;padding-right:5px;padding-bottom:5px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(221,221,221);border-right-color:rgb(221,221,221);border-bottom-color:rgb(221,221,221);border-left-color:rgb(221,221,221);background-color:rgb(240,240,240);vertical-align:top;min-width:0.6em">
Client reqs (1)</th><th class="confluenceTh" style="font-size:10pt;line-height:13pt;color:rgb(0,0,0);padding-top:5px;padding-right:5px;padding-bottom:5px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(221,221,221);border-right-color:rgb(221,221,221);border-bottom-color:rgb(221,221,221);border-left-color:rgb(221,221,221);background-color:rgb(240,240,240);vertical-align:top;min-width:0.6em">
Client replies (1)</th><th class="confluenceTh" style="font-size:10pt;line-height:13pt;color:rgb(0,0,0);padding-top:5px;padding-right:5px;padding-bottom:5px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(221,221,221);border-right-color:rgb(221,221,221);border-bottom-color:rgb(221,221,221);border-left-color:rgb(221,221,221);background-color:rgb(240,240,240);vertical-align:top;min-width:0.6em">
Testdur (1)</th><th class="confluenceTh" style="font-size:10pt;line-height:13pt;color:rgb(0,0,0);padding-top:5px;padding-right:5px;padding-bottom:5px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(221,221,221);border-right-color:rgb(221,221,221);border-bottom-color:rgb(221,221,221);border-left-color:rgb(221,221,221);background-color:rgb(240,240,240);vertical-align:top;min-width:0.6em">
Client conns</th><th class="confluenceTh" style="font-size:10pt;line-height:13pt;color:rgb(0,0,0);padding-top:5px;padding-right:5px;padding-bottom:5px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(221,221,221);border-right-color:rgb(221,221,221);border-bottom-color:rgb(221,221,221);border-left-color:rgb(221,221,221);background-color:rgb(240,240,240);vertical-align:top;min-width:0.6em">
Client reqs</th><th class="confluenceTh" style="font-size:10pt;line-height:13pt;color:rgb(0,0,0);padding-top:5px;padding-right:5px;padding-bottom:5px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(221,221,221);border-right-color:rgb(221,221,221);border-bottom-color:rgb(221,221,221);border-left-color:rgb(221,221,221);background-color:rgb(240,240,240);vertical-align:top;min-width:0.6em">
Client replies</th><th class="confluenceTh" style="font-size:10pt;line-height:13pt;color:rgb(0,0,0);padding-top:5px;padding-right:5px;padding-bottom:5px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(221,221,221);border-right-color:rgb(221,221,221);border-bottom-color:rgb(221,221,221);border-left-color:rgb(221,221,221);background-color:rgb(240,240,240);vertical-align:top;min-width:0.6em">
Testdur</th></tr><tr style="font-size:10pt;line-height:13pt;background-image:none;background-color:initial"><td class="confluenceTd" style="font-size:10pt;line-height:13pt;background-image:none;background-color:initial;padding-top:5px;padding-right:5px;padding-bottom:5px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(221,221,221);border-right-color:rgb(221,221,221);border-bottom-color:rgb(221,221,221);border-left-color:rgb(221,221,221);vertical-align:top;min-width:0.6em">
my-site</td><td class="confluenceTd" style="font-size:10pt;line-height:13pt;background-image:none;background-color:initial;padding-top:5px;padding-right:5px;padding-bottom:5px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(221,221,221);border-right-color:rgb(221,221,221);border-bottom-color:rgb(221,221,221);border-left-color:rgb(221,221,221);vertical-align:top;min-width:0.6em">
1</td><td class="confluenceTd" style="font-size:10pt;line-height:13pt;background-image:none;background-color:initial;padding-top:5px;padding-right:5px;padding-bottom:5px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(221,221,221);border-right-color:rgb(221,221,221);border-bottom-color:rgb(221,221,221);border-left-color:rgb(221,221,221);vertical-align:top;min-width:0.6em">
48</td><td class="confluenceTd" style="font-size:10pt;line-height:13pt;background-image:none;background-color:initial;padding-top:5px;padding-right:5px;padding-bottom:5px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(221,221,221);border-right-color:rgb(221,221,221);border-bottom-color:rgb(221,221,221);border-left-color:rgb(221,221,221);vertical-align:top;min-width:0.6em">
8.30858</td><td class="confluenceTd" style="font-size:10pt;line-height:13pt;background-image:none;background-color:initial;padding-top:5px;padding-right:5px;padding-bottom:5px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(221,221,221);border-right-color:rgb(221,221,221);border-bottom-color:rgb(221,221,221);border-left-color:rgb(221,221,221);vertical-align:top;min-width:0.6em">
19</td><td class="confluenceTd" style="font-size:10pt;line-height:13pt;background-image:none;background-color:initial;padding-top:5px;padding-right:5px;padding-bottom:5px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(221,221,221);border-right-color:rgb(221,221,221);border-bottom-color:rgb(221,221,221);border-left-color:rgb(221,221,221);vertical-align:top;min-width:0.6em">
192</td><td class="confluenceTd" style="font-size:10pt;line-height:13pt;background-image:none;background-color:initial;padding-top:5px;padding-right:5px;padding-bottom:5px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(221,221,221);border-right-color:rgb(221,221,221);border-bottom-color:rgb(221,221,221);border-left-color:rgb(221,221,221);vertical-align:top;min-width:0.6em">
0.152623</td><td class="confluenceTd" style="font-size:10pt;line-height:13pt;background-image:none;background-color:initial;padding-top:5px;padding-right:5px;padding-bottom:5px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(221,221,221);border-right-color:rgb(221,221,221);border-bottom-color:rgb(221,221,221);border-left-color:rgb(221,221,221);vertical-align:top;min-width:0.6em">
31</td><td class="confluenceTd" style="font-size:10pt;line-height:13pt;background-image:none;background-color:initial;padding-top:5px;padding-right:5px;padding-bottom:5px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(221,221,221);border-right-color:rgb(221,221,221);border-bottom-color:rgb(221,221,221);border-left-color:rgb(221,221,221);vertical-align:top;min-width:0.6em">
2</td><td class="confluenceTd" style="font-size:10pt;line-height:13pt;background-image:none;background-color:initial;padding-top:5px;padding-right:5px;padding-bottom:5px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(221,221,221);border-right-color:rgb(221,221,221);border-bottom-color:rgb(221,221,221);border-left-color:rgb(221,221,221);vertical-align:top;min-width:0.6em">
130</td><td class="confluenceTd" style="font-size:10pt;line-height:13pt;background-image:none;background-color:initial;padding-top:5px;padding-right:5px;padding-bottom:5px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(221,221,221);border-right-color:rgb(221,221,221);border-bottom-color:rgb(221,221,221);border-left-color:rgb(221,221,221);vertical-align:top;min-width:0.6em">
130</td><td class="confluenceTd" style="font-size:10pt;line-height:13pt;background-image:none;background-color:initial;padding-top:5px;padding-right:5px;padding-bottom:5px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(221,221,221);border-right-color:rgb(221,221,221);border-bottom-color:rgb(221,221,221);border-left-color:rgb(221,221,221);vertical-align:top;min-width:0.6em">
31.219</td><td class="confluenceTd" style="font-size:10pt;line-height:13pt;background-image:none;background-color:initial;padding-top:5px;padding-right:5px;padding-bottom:5px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(221,221,221);border-right-color:rgb(221,221,221);border-bottom-color:rgb(221,221,221);border-left-color:rgb(221,221,221);vertical-align:top;min-width:0.6em">
8</td><td class="confluenceTd" style="font-size:10pt;line-height:13pt;background-image:none;background-color:initial;padding-top:5px;padding-right:5px;padding-bottom:5px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(221,221,221);border-right-color:rgb(221,221,221);border-bottom-color:rgb(221,221,221);border-left-color:rgb(221,221,221);vertical-align:top;min-width:0.6em">
520</td><td class="confluenceTd" style="font-size:10pt;line-height:13pt;background-image:none;background-color:initial;padding-top:5px;padding-right:5px;padding-bottom:5px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(221,221,221);border-right-color:rgb(221,221,221);border-bottom-color:rgb(221,221,221);border-left-color:rgb(221,221,221);vertical-align:top;min-width:0.6em">
520</td><td class="confluenceTd" style="font-size:10pt;line-height:13pt;background-image:none;background-color:initial;padding-top:5px;padding-right:5px;padding-bottom:5px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(221,221,221);border-right-color:rgb(221,221,221);border-bottom-color:rgb(221,221,221);border-left-color:rgb(221,221,221);vertical-align:top;min-width:0.6em">
78.064</td></tr><tr style="font-size:10pt;line-height:13pt;background-image:none;background-color:initial"><td class="confluenceTd" style="font-size:10pt;line-height:13pt;background-image:none;background-color:initial;padding-top:5px;padding-right:5px;padding-bottom:5px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(221,221,221);border-right-color:rgb(221,221,221);border-bottom-color:rgb(221,221,221);border-left-color:rgb(221,221,221);vertical-align:top;min-width:0.6em">
my-site</td><td class="confluenceTd" style="font-size:10pt;line-height:13pt;background-image:none;background-color:initial;padding-top:5px;padding-right:5px;padding-bottom:5px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(221,221,221);border-right-color:rgb(221,221,221);border-bottom-color:rgb(221,221,221);border-left-color:rgb(221,221,221);vertical-align:top;min-width:0.6em">
0</td><td class="confluenceTd" style="font-size:10pt;line-height:13pt;background-image:none;background-color:initial;padding-top:5px;padding-right:5px;padding-bottom:5px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(221,221,221);border-right-color:rgb(221,221,221);border-bottom-color:rgb(221,221,221);border-left-color:rgb(221,221,221);vertical-align:top;min-width:0.6em">
192</td><td class="confluenceTd" style="font-size:10pt;line-height:13pt;background-image:none;background-color:initial;padding-top:5px;padding-right:5px;padding-bottom:5px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(221,221,221);border-right-color:rgb(221,221,221);border-bottom-color:rgb(221,221,221);border-left-color:rgb(221,221,221);vertical-align:top;min-width:0.6em">
20.7169</td><td class="confluenceTd" style="font-size:10pt;line-height:13pt;background-image:none;background-color:initial;padding-top:5px;padding-right:5px;padding-bottom:5px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(221,221,221);border-right-color:rgb(221,221,221);border-bottom-color:rgb(221,221,221);border-left-color:rgb(221,221,221);vertical-align:top;min-width:0.6em">
19</td><td class="confluenceTd" style="font-size:10pt;line-height:13pt;background-image:none;background-color:initial;padding-top:5px;padding-right:5px;padding-bottom:5px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(221,221,221);border-right-color:rgb(221,221,221);border-bottom-color:rgb(221,221,221);border-left-color:rgb(221,221,221);vertical-align:top;min-width:0.6em">
192</td><td class="confluenceTd" style="font-size:10pt;line-height:13pt;background-image:none;background-color:initial;padding-top:5px;padding-right:5px;padding-bottom:5px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(221,221,221);border-right-color:rgb(221,221,221);border-bottom-color:rgb(221,221,221);border-left-color:rgb(221,221,221);vertical-align:top;min-width:0.6em">
0.167946</td><td class="confluenceTd" style="font-size:10pt;line-height:13pt;background-image:none;background-color:initial;padding-top:5px;padding-right:5px;padding-bottom:5px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(221,221,221);border-right-color:rgb(221,221,221);border-bottom-color:rgb(221,221,221);border-left-color:rgb(221,221,221);vertical-align:top;min-width:0.6em">
1</td><td class="confluenceTd" style="font-size:10pt;line-height:13pt;background-image:none;background-color:initial;padding-top:5px;padding-right:5px;padding-bottom:5px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(221,221,221);border-right-color:rgb(221,221,221);border-bottom-color:rgb(221,221,221);border-left-color:rgb(221,221,221);vertical-align:top;min-width:0.6em">
2</td><td class="confluenceTd" style="font-size:10pt;line-height:13pt;background-image:none;background-color:initial;padding-top:5px;padding-right:5px;padding-bottom:5px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(221,221,221);border-right-color:rgb(221,221,221);border-bottom-color:rgb(221,221,221);border-left-color:rgb(221,221,221);vertical-align:top;min-width:0.6em">
130</td><td class="confluenceTd" style="font-size:10pt;line-height:13pt;background-image:none;background-color:initial;padding-top:5px;padding-right:5px;padding-bottom:5px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(221,221,221);border-right-color:rgb(221,221,221);border-bottom-color:rgb(221,221,221);border-left-color:rgb(221,221,221);vertical-align:top;min-width:0.6em">
130</td><td class="confluenceTd" style="font-size:10pt;line-height:13pt;background-image:none;background-color:initial;padding-top:5px;padding-right:5px;padding-bottom:5px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(221,221,221);border-right-color:rgb(221,221,221);border-bottom-color:rgb(221,221,221);border-left-color:rgb(221,221,221);vertical-align:top;min-width:0.6em">
25.680</td><td class="confluenceTd" style="font-size:10pt;line-height:13pt;background-image:none;background-color:initial;padding-top:5px;padding-right:5px;padding-bottom:5px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(221,221,221);border-right-color:rgb(221,221,221);border-bottom-color:rgb(221,221,221);border-left-color:rgb(221,221,221);vertical-align:top;min-width:0.6em">
8</td><td class="confluenceTd" style="font-size:10pt;line-height:13pt;background-image:none;background-color:initial;padding-top:5px;padding-right:5px;padding-bottom:5px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(221,221,221);border-right-color:rgb(221,221,221);border-bottom-color:rgb(221,221,221);border-left-color:rgb(221,221,221);vertical-align:top;min-width:0.6em">
520</td><td class="confluenceTd" style="font-size:10pt;line-height:13pt;background-image:none;background-color:initial;padding-top:5px;padding-right:5px;padding-bottom:5px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(221,221,221);border-right-color:rgb(221,221,221);border-bottom-color:rgb(221,221,221);border-left-color:rgb(221,221,221);vertical-align:top;min-width:0.6em">
520</td><td class="confluenceTd" style="font-size:10pt;line-height:13pt;background-image:none;background-color:initial;padding-top:5px;padding-right:5px;padding-bottom:5px;padding-left:5px;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(221,221,221);border-right-color:rgb(221,221,221);border-bottom-color:rgb(221,221,221);border-left-color:rgb(221,221,221);vertical-align:top;min-width:0.6em">
71.781<br></td></tr></tbody></table></div><div style="text-align:left"><font color="#333333" face="Arial, Helvetica, FreeSans, sans-serif"><span style="line-height:17px"><br></span></font></div><div>Analysis:</div><div>* First row with keepalive, second row without keepalive.</div>
<div>* With keepalive, number of connections upstream (as seen in tcpdump) is 48. Note that my-site has multiple (19 - unique upstream hosts) subdomains, each of which is individually configured. Without keepalive 192 connections are made</div>
<div>* Total time spent establishing connections is 8.3 vs 20.7</div><div>* Latency is ~0.15secs</div><div>All these are as expected, test duration however goes from 78 -> 71 secs. An *increase* in the time for test to complete. </div>
<div><br></div><div>As the number of unique upstream increases, the time increases further. This wasnt something that I could explain. Please help me understand, is it a bug in the system?</div><div><br></div><div>Configuration:</div>
<div>nginx version: nginx/1.1.18</div><div><div>built by gcc 4.4.5 (Ubuntu/Linaro 4.4.4-14ubuntu5) </div><div>TLS SNI support enabled</div><div>configure arguments: --without-http_ssi_module --without-http_geo_module --without-http_uwsgi_module --without-http_scgi_module --without-http_memcached_module --without-mail_pop3_module --without-mail_imap_module --without-mail_smtp_module --with-http_ssl_module --with-debug --without-http_rewrite_module --prefix=/home/faskiri/Downloads/nginx-1.1.18/install</div>
</div><div><br></div><div>Cache config:</div><div><div>    proxy_cache_path  /tmp/cache levels=1:2 keys_zone=my-cache:8m max_size=1000m inactive=600m;</div></div><div><br></div><div>Highly appreciate any help on this.</div>
<div><br></div><div>Regards</div><div>+Fasih</div><div><br></div>