<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-CA link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Check your ec2 network settings.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>OS and varnish settings look okay, your varnishstat shows that varnish is coasting along fine.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>It’s not threads. You have 800 available, according to the varnishstat; it’s running with 800 threads, handling 12,000+ connections, and there is no thread creation failure. Therefore it does not need to add threads.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>What does something like firebug show when you request during the load test? The delay may be anything from DNS to the ec2 network.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Stefan Caunter <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Operations<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Torstar Digital<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>m: (416) 561-4871<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> varnish-misc-bounces@varnish-cache.org [mailto:varnish-misc-bounces@varnish-cache.org] <b>On Behalf Of </b>Tejaswi Nadahalli<br><b>Sent:</b> March-04-11 1:09 AM<br><b>To:</b> varnish-misc@varnish-cache.org<br><b>Subject:</b> Under Load: Server Unavailable/Connection Dropped/Delayed Reponse<o:p></o:p></span></p></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Hi Everyone,<br><br>I am seeing a situation similar to : <br><br><a href="http://www.varnish-cache.org/lists/pipermail/varnish-misc/2011-January/005351.html">http://www.varnish-cache.org/lists/pipermail/varnish-misc/2011-January/005351.html</a> (Connections Dropped Under Load)<br><a href="http://www.varnish-cache.org/lists/pipermail/varnish-misc/2010-December/005258.html">http://www.varnish-cache.org/lists/pipermail/varnish-misc/2010-December/005258.html</a> (Hanging Connections)<br><br>I have httperf loading a varnish cache with never-expire content. While the load is on, other browser/wget requests to the varnish server get delayed to 10+ seconds. Any ideas what could be happening? ssh doesn't seem to be impacted. So, is it some kind of thread problem?<br><br>In production, I see a similar situation with around 1000 req/second load. <br><br>I am running varnishd with the following command line options (as per <a href="http://kristianlyng.wordpress.com/2009/10/19/high-end-varnish-tuning/">http://kristianlyng.wordpress.com/2009/10/19/high-end-varnish-tuning/</a>):<br><br>sudo varnishd -f /etc/varnish/default.vcl -s malloc,5G -T <a href="http://127.0.0.1:2000">127.0.0.1:2000</a> -a <a href="http://0.0.0.0:80">0.0.0.0:80</a> -p thread_pools=8 -p thread_pool_min=100 -p thread_pool_max=5000 -p thread_pool_add_delay=2 -p cli_timeout=25 -p session_linger=100 -p lru_interval=20 -t 31536000<br><br>I am on Ubuntu Lucid 64 bit Amazon EC2 C1.XLarge with 8 processing units.<br><br>My network sysctl parameters are tuned according to: <a href="http://varnish-cache.org/trac/wiki/Performance">http://varnish-cache.org/trac/wiki/Performance</a><br>fs.file-max = 360000<br>net.ipv4.ip_local_port_range = 1024 65536<br>net.core.rmem_max = 16777216<br>net.core.wmem_max = 16777216<br>net.ipv4.tcp_rmem = 4096 87380 16777216<br>net.ipv4.tcp_wmem = 4096 65536 16777216<br>net.ipv4.tcp_fin_timeout = 3<br>net.core.netdev_max_backlog = 30000<br>net.ipv4.tcp_no_metrics_save = 1<br>net.core.somaxconn = 262144<br>net.ipv4.tcp_syncookies = 0<br>net.ipv4.tcp_max_orphans = 262144<br>net.ipv4.tcp_max_syn_backlog = 262144<br>net.ipv4.tcp_synack_retries = 2<br>net.ipv4.tcp_syn_retries = 2<br><br><br>Any help would be greatly appreciated<o:p></o:p></p></div></body></html>