Welcome! Log In Create A New Profile

Advanced

Re: NGINX module reporting 0 time to access.log

Yichun Zhang (agentzh)
December 02, 2014 05:18PM
Hello!

On Tue, Dec 2, 2014 at 12:57 PM, chase.holland wrote:
> Thank you for your quick response! Could you be more specific on what is
> blocking the worker process?

Just FYI: you can always find the blocking IO calls via tools like the
off-CPU flame graphs:

https://github.com/openresty/nginx-systemtap-toolkit#sample-bt-off-cpu

> Does an instance of an nginx module only get
> one context per process (thus we need to do our own threading), or is each
> instance of the module thread-based to match nginx's threads?
>

Nginx worker processes are single-threaded. For any I/O operations,
you should use nonblocking IO mode and solely rely on the nginx event
loop to dispatch any IO events for your fd's. Otherwise your nginx
will just degrade to the Apache's prefork mpm.

(BTW, use of your own OS threads to work around such things will just
degrade your nginx's performance to Apache's worker mpm.)

Regards,
-agentzh

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

NGINX module reporting 0 time to access.log

chase.holland December 01, 2014 10:09PM

Re: NGINX module reporting 0 time to access.log

Valentin V. Bartenev December 02, 2014 08:16AM

Re: NGINX module reporting 0 time to access.log

chase.holland December 02, 2014 03:57PM

Re: NGINX module reporting 0 time to access.log

Yichun Zhang (agentzh) December 02, 2014 05:18PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 243
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