number of CPU cores on a VPS nginx configuration

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

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

I'm pretty sure all linodes have 4 xeon cores which I imagine comes from two dual core processors.

You should also check out the the workerconnections directive for nginx (http://wiki.nginx.org/NginxHttpEventsModule) it allows you to calculate your maxclients, I have 4 nginx workers with 1024 connections in a reverse proxy situation which will allow 1024 clients at one time.

The host has 2 Quad core processors, each node has access to 4 virtual cores.

~JW

Oo even more than I thought, no wonder these things are so darn quick ;)

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct