$request_time is 0.000 with gzip/chunked?
mdounin at mdounin.ru
Sun Feb 2 23:50:41 UTC 2014
On Sat, Feb 01, 2014 at 08:43:19AM +1300, Robert Coup wrote:
> Hi Maxim,
> On Saturday, 1 February 2014, Maxim Dounin <mdounin at mdounin.ru> wrote:
> > If you just care about precision of a time measured, on Linux you may try
> > using timer_resolution with some reasonable value like 10ms. On
> > Linux time is updated using signals in this case, and time logged
> > will be more accurate regardless of how long event loop iteration
> > takes.
> Aha, so timer_resolution will "fix" it on Linux? (Our production boxes are
> Linux, my current testing was OSX). On OSX it looked like timer-resolution
> never ran while the gzipping was happening, I just assumed it would be
> similar cross-platform (though I did test I could replicate the original issue
> on both).
The timer_resolution directive documentation contains various
details on how it works. Source code may help, too - you are
writing to nginx-devel@ list after all.
> > The really bad thing is actually that this can easily introduce
> > potentially huge latency spikes. If this is often happens in
> > practice, it might be a good idea to introduce something similar
> > to sendfile_max_chunk we already have to resolve similar problems
> > with sendfile(), see http://nginx.org/r/sendfile_max_chunk.
> So where could/would the max chunk limit sit? At the socket-write end of
> the process?
Likely in ngx_output_chain().
More information about the nginx-devel