Author Topic: Apache uses multiple cores but I have doubt will Nginx use multiple core  (Read 1984 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
I want to use Apache+Nginx configuration in CWP. I know that apache uses multiple cores but I have doubt will Nginx use multiple cores when configured as Apache+Nginx. Can you please clear my doubt, I want to know does CWP Nginx will use all the CPU cores by default when configured as Apache+Nginx in CWP. As my VPS has 4 cores. Just a simple explanation will be really helpful. Please. In the forum, I cannot find the answer I searched many forums.

Offline
**
Nginx is multethreaded webserver.

CWP sets "auto" for nginx "worker_processes":
https://nginx.org/en/docs/ngx_core_module.html#worker_processes
It will run as many nginx processes as many cores your server/vps has.

Additionally you can link each nginx process to specific core(s) using the directive worker_cpu_affinity:
https://nginx.org/en/docs/ngx_core_module.html#worker_cpu_affinity