<div dir="ltr">Already found the problem. There was timer_resolution set to 100ms, which distorted these latencies.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Nov 14, 2015 at 12:09 PM, Donatas Abraitis <span dir="ltr"><<a href="mailto:donatas.abraitis@gmail.com" target="_blank">donatas.abraitis@gmail.com</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 there!<br><br>I want to know when $msec is used in proxy_set_header directive? I set:<br><br>location / {<br> proxy_set_header X-Queue-Start $msec;<br>}<br><br>But it's set with the same value as $r->start_sec + $r->start_msec. Is it true, that $msec == ("%d.%d", $r->start_sec, $r->start_msec)? Or it's really generated separately on demand?<br><br>As I see in backtrace (hooked on ngx_http_variable_msec()), it should be generated normally, but it isn't (I'm getting $msec == $r...):<br><br>~$ stap -e 'probe process("/usr/sbin/nginx").function("ngx_http_variable_msec") { print_ubacktrace(); }'<br> 0x446c74 : ngx_http_variable_msec+0x4/0x80 [/usr/sbin/nginx]<br> 0x4464f8 : ngx_http_get_indexed_variable+0x78/0x100 [/usr/sbin/nginx]<br> 0x449381 : ngx_http_script_copy_var_len_code+0x21/0x60 [/usr/sbin/nginx]<br> 0x47a005 : ngx_http_proxy_create_request+0x1b5/0xa60 [/usr/sbin/nginx]<br><br>The problem is, that we are getting very high latency when using proxy_pass for example:<br>X-Queue-Start: 1447494119.609 (Nginx X-Queue-Start header $msec value)<br>X-Queue-Start: 1447494119.678595 (Ruby Time.now.to_f)<br>X-Queue-Start: 1447494121.709 (The same as above)<br>X-Queue-Start: 1447494121.7741442 (The same as above)<br><br>An this information distort real situation calculating request queuing (NewRelic).<br><br>Thank you very much!<span class="HOEnZb"><font color="#888888"><br clear="all"><br>-- <br><div>Donatas<br></div>
</font></span></div>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature">Donatas<br></div>
</div>