Virtual Domains

mike mike503 at gmail.com
Thu Sep 4 03:42:33 MSD 2008


you basically need one fastcgi engine per concurrent request. but it
seems like it can handle multiple requests per second though; the
great thing about php-fpm is soon it will support adaptive/apache
style process spawning. currently it does not, so you're stuck with a
fixed amount of engines.

15 mins * 60 seconds = 900 seconds
500 users / 900 seconds = .55556 users per second, if my math is right.

i'd say start out with 10 engines. you can look at the php-fpm log and
see how often it is recycling engines, and see if nginx is being
denied due to engines being busy. then bump up as needed. i've got a
site doing over a million php requests per day running 20 engines x 3
servers and i think it's more than enough. i can't wait for php-fpm to
do apache spawning so i can start it at a lower number and let it
adapt so i'm not wasting resources.

On Wed, Sep 3, 2008 at 3:49 PM, David <mishy.cth at gmail.com> wrote:
> Hello,
>
> I have 5 sites that will all be sharing the same IP, and 2 that will have their
> own IP addresses.
>
> I have a series of conf files that I include that contain server {} sections.
> Each conf looks like this:
>
> server {
>        listen          xxx.xxx.xxx.xxx;
>        server_name     domain.com www.domain.com;
>        access_log      /var/log/nginx/domain.access.log main;
>
>        location / {
>                index   index.php index.html;
>                root    /home/domain/public_html/domain;
>        }
>
> }
>
> For the sites with unique IP addresses I have put their unique IP address in the
> listen statement.
>
> For the sites that are sharing an IP address I have put the same IP address in
> each domains conf file for the listen statement.
>
> Is this setup correctly ?
>
> Additionally, for a site that receives 700K PVs/month on a Dual 2.8Ghz Xeon 4Gb
> RAM with pretty heavy MySQL usage, how many workers should I be starting would
> you think ? I have something in the region of 500 users loading pages every 15
> minutes.
>
> Whilst here, if anyone has had any experience with a site setup/volume like
> that, what PHP-FPM settings do you use ?
>
> max_children
> StartServers
> MinSpareServers
> MaxSpareServers
> rlimit_files
> rlimit_core
> max_requests
>
> Thanks for any help.
>
>
>





More information about the nginx mailing list