number of CPU cores on a VPS nginx configuration
I am setting up a configuration file for nginx and there is the directive worker_processes. I understand that it is best to set it to the number of cpu cores. FOr instance for a dual-core to 2 and for a quad-core to 4.
(1) how do I know how may cores my linode is running on?
(2) does it make sense to apply the above rule of thumb on a linode?
Thanks
4 Replies
@jcr:
Hello,
I am setting up a configuration file for nginx and there is the directive worker_processes. I understand that it is best to set it to the number of cpu cores. FOr instance for a dual-core to 2 and for a quad-core to 4.
(1) how do I know how may cores my linode is running on?
(2) does it make sense to apply the above rule of thumb on a linode?
Thanks
In short:
(1) grep processor /proc/cpuinfo | wc -l
(2) yes
You should also check out the the workerconnections directive for nginx (
~JW