Welcome! Log In Create A New Profile

Advanced

Re: timer_resolution / $request_time

Maxim Dounin
August 26, 2010 07:06PM
Hello!

On Thu, Aug 26, 2010 at 11:23:47PM +0200, Xavier Martin wrote:

> Hello,
>
> I've been using this settings for a while:
> timer_resolution 100ms;
> log_format combined_time '$remote_addr - $remote_user [$time_local] '
> '"$request" $status $body_bytes_sent '
> '"$http_referer" "$http_user_agent"'
> ' $request_time';
> access_log /var/log/access.log combined_time;
>
> Right now i'm needing more precise timestamp in logs
> => finding requests that took less than 50ms to complete.
>
> I would like to know what are the drawbacks of using a lower number
> (i.e 10ms, 0ms or not setting at all timer_resolution) and overhead that would cause (if any).

With timer_resolution unset (set to 0, default) nginx will call
gettimeofday() on every event loop iteration. With
timer_resolution set nginx will schedule
gettimeofday() calls at specified interval.

Obviously changing it from 100ms to 10ms would cause 10 times
more gettimeofday() calls. But most likely you won't notice.

But actually I would recommend using the default (i.e. unset).
It's not really different from 10ms on loaded servers and wouldn't
cause extra work on otherwise idle servers.

Maxim Dounin

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

timer_resolution / $request_time

Xavier Martin August 26, 2010 05:28PM

Re: timer_resolution / $request_time

Maxim Dounin August 26, 2010 07:06PM

Re: timer_resolution / $request_time

Arthur Blake August 27, 2010 02:46PM

Re: timer_resolution / $request_time

Arthur Blake August 27, 2010 03:20PM

Re: timer_resolution / $request_time

Maxim Dounin August 28, 2010 05:38PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 143
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready