<div dir="ltr">Hi.<div><br></div><div>I tested this on <a href="http://repo.varnish-cache.org" target="_blank">repo.varnish-cache.org</a>:</div><div><br></div><div>$ time wget --limit-rate=100k <a href="http://repo.varnish-cache.org/debian/pool/varnish-4.0/v/varnish/varnish_4.0.0.orig.tar.gz" target="_blank">http://repo.varnish-cache.org/debian/pool/varnish-4.0/v/varnish/varnish_4.0.0.orig.tar.gz</a><br>


</div><div>...</div><div><br></div><div>real<span style="white-space:pre-wrap">       </span>0m23.472s<br></div><div><br></div><div>Then from Varnishlog:</div><div>..</div><div>   22 ReqEnd       c 315341679 1407768801.649216652 1407768818.704510689 0.000195265 0.037013054 <b>17.018280983</b><br>


</div><div>..</div><div><br></div><div>So. Your findings make sense. I think, but I'm not 100% certain, that the difference in time is due to buffering, especially on the server end. The kernel will swallow up a lot of writes that Varnish do and the thread then thinks it is actually done. Since the thread doesn't close the connection it won't block the worker. </div>

<div><br></div><div>I think the kernel will block on connection close to make sure the client has gotten all the data but at that point the connection has been handed back to the pool.</div><div><br></div><div>As I said, I'm not 100% that this is the correct explanation. But I'm pretty certain it works like this and if I'm right it is not a bug, strictly speaking.</div>

<div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Aug 11, 2014 at 3:19 PM, César Sepúlveda <span dir="ltr"><<a href="mailto:csepulveda@mediastre.am" target="_blank">csepulveda@mediastre.am</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi guys.<div><br></div><div>Anyone can help me, or has the same issue?</div><div><br></div><div>Thanks!!.</div>

<div class="gmail_extra"><div class=""><br clear="all"><div><div dir="ltr">--<br>César Sepúlveda<br>Jefe de Plataforma<div>


Mediastream Chile<br><br>Email: <a href="mailto:csepulveda@mediastre.am" target="_blank">csepulveda@mediastre.am</a><br><span style="font-family:arial;font-size:small">Teléfono: +56 2 </span><span style="font-family:arial;font-size:small"><a href="tel:24029750" value="+4724029750" target="_blank">24029750</a></span><br>




</div></div></div>
<br><br></div><div class="gmail_quote">2014-08-08 10:31 GMT-04:00 César Sepúlveda <span dir="ltr"><<a href="mailto:csepulveda@mediastre.am" target="_blank">csepulveda@mediastre.am</a>></span>:<div><div class="h5"><br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div dir="ltr">a video... my english is not too good.<div><br></div><div><a href="https://copy.com/uaaM3nMGVAuZ8ntk" target="_blank">https://copy.com/uaaM3nMGVAuZ8ntk</a><br></div></div><div class="gmail_extra"><div>
<br clear="all"><div><div dir="ltr">
--<br>César Sepúlveda<br>Jefe de Plataforma<div>Mediastream Chile<br><br>Email: <a href="mailto:csepulveda@mediastre.am" target="_blank">csepulveda@mediastre.am</a><br><span style="font-family:arial;font-size:small">Teléfono: +56 2 </span><span style="font-family:arial;font-size:small"><a href="tel:24029750" value="+4724029750" target="_blank">24029750</a></span><br>





</div></div></div>
<br><br></div><div class="gmail_quote">2014-08-08 10:21 GMT-04:00 César Sepúlveda <span dir="ltr"><<a href="mailto:csepulveda@mediastre.am" target="_blank">csepulveda@mediastre.am</a>></span>:<div><div><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Hi guys!.<div><br></div><div>we are using varnish 3.0.5 and have an issue with Time taken to serve the request parameter (%D)</div><div><br></div><div>we realized that the varnishncsa log is written before the download is complete: example</div>






<div><br></div><div><br></div><div>the download:</div><div><div><font face="courier new, monospace">imac-de-cesar:~ csepulveda$ wget --limit-rate=100k <a href="http://xxx.xxx.com/assets/img/promo-win.jpg" target="_blank">http://xxx.xxx.com/assets/img/promo-win.jpg</a></font></div>






<div><font face="courier new, monospace">--2014-08-08 09:55:27--  <a href="http://xxxx.xxxx.com/assets/img/promo-win.jpg" target="_blank">http://xxxx.xxxx.com/assets/img/promo-win.jpg</a></font></div><div><font face="courier new, monospace">Resolving xxx.xxx.com... xx.xx.xx.xx.</font></div>






<div><font face="courier new, monospace">Connecting to </font><span style="font-family:'courier new',monospace">xxx</span><font face="courier new, monospace">.</font><span style="font-family:'courier new',monospace"> xxx</span><font face="courier new, monospace">.com|xx.xx.xx.xx|:80... connected.</font></div>






<div><font face="courier new, monospace">HTTP request sent, awaiting response... 200 OK</font></div><div><font face="courier new, monospace">Length: 383810 (375K) [image/jpeg]</font></div><div><font face="courier new, monospace">Saving to: ‘promo-win.jpg.2’</font></div>






<div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace">100%[=========================================================================>] 383,810      101KB/s   in 3.7s</font></div>






<div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace">2014-08-08 09:55:31 (101 KB/s) - ‘promo-win.jpg.2’ saved [383810/383810]</font></div></div><div><br></div><div><br></div>





<div>
The log:</div><div><font face="courier new, monospace">xx.xx.xx.xx "xx.xx.xx.xx" - [08/Aug/2014:13:55:33 +0000] "GET <a href="http://xxx.xxxx.com/assets/img/promo-win.jpg" target="_blank">http://xxx.xxxx.com/assets/img/promo-win.jpg</a> HTTP/1.0" 200 383810 "-" "Wget/UNKNOWN (darwin12.2.0)" 0.401839018 miss 0.785520</font></div>






<div><font face="courier new, monospace"><br></font></div><div>The download take 3.7 seconds but varnishncsa show <span style="font-family:'courier new',monospace">0.785520.</span>watching this with tail -f we see the log is writen when the download go on 5 or 8 percent.</div>






<div><span style="font-family:'courier new',monospace"><br></span></div>The varnishncsa format is this:<div><font face="courier new, monospace">FORMAT="%h \"%{X-Forwarded-For}i\" %u %t \"%r\" %s %b \"%{Referer}i\" \"%{User-agent}i\" %{Varnish:time_firstbyte}x %{Varnish:handling}x %D"</font><br>






</div><div><span style="font-family:'courier new',monospace"><br></span></div>what we are doing wrong?<br>can you help us?<br><br>Thanks!.<div><br clear="all"><div><div dir="ltr">--<br>César Sepúlveda<br>Jefe de Plataforma<div>






Mediastream Chile<br><br>Email: <a href="mailto:csepulveda@mediastre.am" target="_blank">csepulveda@mediastre.am</a><br><span style="font-family:arial;font-size:small">Teléfono: +56 2 </span><span style="font-family:arial;font-size:small"><a href="tel:24029750" value="+4724029750" target="_blank">24029750</a></span><br>






</div></div></div>
</div></div>
</blockquote></div></div></div><br></div>
</blockquote></div></div></div><br></div></div>
<br>_______________________________________________<br>
varnish-misc mailing list<br>
<a href="mailto:varnish-misc@varnish-cache.org">varnish-misc@varnish-cache.org</a><br>
<a href="https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc" target="_blank">https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br>

<div dir="ltr"><div style="font-size:12.727272033691406px;margin:5px 15px 0px 0px;padding-bottom:5px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)"><table border="0" cellpadding="0" cellspacing="0" style="text-align:start;font-size:12px;line-height:1.5em;font-family:'Helvetica Neue',Arial,sans-serif;color:rgb(102,102,102);width:550px;border-top-width:1px;border-top-style:solid;border-top-color:rgb(238,238,238);border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(238,238,238);margin-top:20px;padding-top:5px;padding-bottom:5px">

<tbody><tr><td width="100" style="font-family:arial,sans-serif;margin:0px"><a href="http://www.varnish-software.com/" style="color:rgb(17,85,204)" target="_blank"><img src="http://www.varnish-software.com/static/media/logo-email.png" style="float:left;margin-left:10px"></a></td>

<td style="font-family:arial,sans-serif;margin:0px"><b style="font-size:14px;color:rgb(34,34,34)">Per Buer</b><br>CTO | Varnish Software<br>Phone: +47 958 39 117 | Skype: per.buer<br><span style="font-weight:bold">We Make Websites Fly!<br>

<br></span><span style="font-family:'Helvetica Neue',Arial,sans-serif;font-size:14px;font-weight:bold">Winner of the Red Herring Top 100 Global Award 2013<br></span><p style="margin:0px;line-height:normal;font-family:Helvetica">

<img src="https://www.varnish-software.com/sites/default/files/redherring_2013_winner_sml.jpg"></p><span style="font-weight:bold"><br></span></td></tr></tbody></table><div></div></div><div style="font-size:12.727272033691406px;margin:15px 0px;clear:both;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)">

</div></div>
</div>