Control Web Panel
WebPanel => Information => Topic started by: sanjeevkumarsingh on July 22, 2022, 08:43:09 AM
-
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.
-
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