when doing Nginx stress test by running test cmd: wrk -t1 -c40 -d50s http://127.0.0.1:80, I find the worker process of Nginx is not using 100% CPU, it is only 70% (from top command). I have tried different wrk options like -t10 -c400, CPU usage can not pass 70%.
Do you have any suggestion to achieve 100% CPU usage under stressing test with wrk?
I also did a little bit more analysis. I was thinking the process was some how sheduled out due to some blocking call. But the bcc offcputime tool's offcpu time flame graph only has 1ms off cpu event for a 50 second record for the Nginx worker process. I expect there will be 30% * 50 sec = 15 sec offcput event. Am I missing something here?
when doing Nginx stress test by running test cmd:
wrk -t1 -c40 -d50s http://127.0.0.1:80
, I find the worker process of Nginx is not using 100% CPU, it is only 70% (fromtop
command). I have tried differentwrk
options like-t10 -c400
, CPU usage can not pass 70%.Do you have any suggestion to achieve 100% CPU usage under stressing test with
wrk
?I also did a little bit more analysis. I was thinking the process was some how sheduled out due to some blocking call. But the bcc offcputime tool's offcpu time flame graph only has 1ms off cpu event for a 50 second record for the Nginx worker process. I expect there will be 30% * 50 sec = 15 sec offcput event. Am I missing something here?