New in CWP Edge-LatestFree with every CWPpro licenceWebsites up to 300x faster

CWP now includes LSPHP, LSAPI-Cache and CWP Cage at no extra cost with all CWPpro licences. The LSAPI-Cache plugin is integrated into our WordPress and other script installers, and CWP Cage gives every user complete isolation. Available now in the CWP Edge-Latest version.

Get CWPpro ›

Apache uses multiple cores but I have doubt will Nginx use multiple core

Started by sanjeevkumarsingh, July 22, 2022, 08:43:09 AM

Previous topic - Next topic

sanjeevkumarsingh

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.

cyberspace

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