High CPU Usage and NGINX Hangup

Yichun Zhang (agentzh) agentzh at gmail.com
Wed Mar 5 05:16:10 UTC 2014


Hello!

On Mon, Mar 3, 2014 at 9:07 PM, loki wrote:
> I am seeing my NGINX server randomly hangup. Multiple worker processes
> utilizing 100% CPU.

100% CPU occupancy usually happen on the userland code, so strace is
usually not help by providing info on the syscall level.

It'll be ideal if you can take a C-land on-CPU flame graph for your
worker processes spining at 100% CPU time, which will give the whole
picture about how CPU time is distributed among all the code paths:

    https://github.com/agentzh/nginx-systemtap-toolkit#sample-bt

We've been using this to analyse and optimize CPU hogs in our
production environment, and not just for NGINX but for everything that
we can get proper backtraces :)

Best regards,
-agentzh



More information about the nginx mailing list