Welcome! Log In Create A New Profile

Advanced

Number of worker processes

Posted by wminside 
Number of worker processes
March 01, 2010 07:08AM
Hello,

I'm about to give NGINX a try. I've done some testing on a local CentOS box but nothing too heavy yet.

The website I'll be migrating to NGINX is fairly big -over 150k uniques per day. I run mysqld on another server.

My box CPU: 2x INTEL XEON NEHALEM E5504. Ram: 4GB.

I was wondering how many worker processes / worker connections should I set the configuration file to.



Edited 2 time(s). Last edit at 03/01/2010 07:10AM by wminside.
Re: Number of worker processes
March 05, 2010 04:51PM
Eight cores, no hyperthreading = eight workers as a rule of thumb.

As for connections, I'd start with 4096 per worker. Make sure that you have max open file descriptors adjusted properly. Default in CentOS is 1024 I believe.

--
Jim Ohlstein
Re: Number of worker processes
March 05, 2010 06:03PM
Hi Jim,

I had already set up 8 workers after much reading yesterday. But I didn't set the number of worker_connections so that was helpful.

You are right about the max open file descriptors in CentOS. Yesterday I changed it to 8192 but after setting nginx's connections to 4096 just now I updated it to ulimit -n 32768 (4096*8). Is this right?

Also how do I know that I have set the right number of connections for my server? I mean, what should I be looking for?
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 302
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready