# Server performance issue

**URL:** <https://www.ruby-forum.com/t/server-performance-issue/198087>\
**Category:** NGINX\
**Created:** [October 26, 2010, 8:43am UTC](https://www.ruby-forum.com/t/server-performance-issue/198087 "2010-10-26T08:43:36Z")\
**Posts on this page:** 2\
**Page:** 2

<div class="post-metadata">

**Author:** ![Xin\_L](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/x/3be4f8/32.png) [@Xin\_L](https://www.ruby-forum.com/u/Xin_L)\
**Post date:** [October 26, 2010, 6:01pm UTC](https://www.ruby-forum.com/t/server-performance-issue/198087/21 "2010-10-26T18:01:28Z")

</div>

Thank you very much for your reply.

After checked system log, I found that there are some errors about disk  
sdb.  
It seems that one disk is broken(I have 2 disks with Raid1.)

Im wondering maybe my problem is caused by disk error. Tomorrow I will  
rebuild the Raid, Ill keep on monitoring

: Ilan B. [[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)]  
ʱ: 20101026 22:21  
ռ: removed\_email\_address@domain.invalid  
: Re: : server performance issue

You’re issue is probably not with php-fpm. Without knowing more about  
your  
architecture, these are key points you should look at:

1. What is your PHP code doing? What is it waiting for? Tools: xdebug  
([http://www.xdebug.org/](http://www.xdebug.org/)) and you could even try tracking it via the  
php-fpm  
slow log configuration option:

request\_slowlog\_timeout - The timeout (in seconds) for serving of  
single  
request after which a php backtrace will be dumped to slow.log file.  
Default: “5s”. Note: ‘0s’ means ‘off’

slowlog - The log file for slow requests.

1. How is your database performing? Are there issues with queries?  
again,  
look at the slow log query output of mysql. Look at connection issues  
and  
name resolution with mysql (its notoriously bad at host name  
resolution).

2. If your site is really busy, you may need to add more PHP application  
servers to handle the load.

Again, this is not a Nginx or PHP-FPM problem per se.

2010/10/26 Xin L. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

Even I set the pm.max\_children=50, I still got lots of errors…

Oct 26 22:09:36.354159 [WARNING] [pool www] seems busy (you may need to  
increase start\_servers, or min/max\_spare\_servers), spawning 8 children,  
there are 0 idle, and 12 total children

Oct 26 22:09:37.354215 [WARNING] [pool www] seems busy (you may need to  
increase start\_servers, or min/max\_spare\_servers), spawning 16 children,  
there are 0 idle, and 17 total children

Oct 26 22:11:20.650232 [WARNING] [pool www] seems busy (you may need to  
increase start\_servers, or min/max\_spare\_servers), spawning 8 children,  
there are 1 idle, and 17 total children

Oct 26 22:11:41.246244 [WARNING] [pool www] seems busy (you may need to  
increase start\_servers, or min/max\_spare\_servers), spawning 16 children,  
there are 0 idle, and 21 total children

: Phil B. [[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)]  
ʱ: 20101026 19:07  
ռ: removed\_email\_address@domain.invalid  
: Re: server performance issue

Your formulas look interesting, will give them a try next time I’m doing  
some optimising.

Normally I would just make a rough guess based off req/sec, execution  
times  
etc and fine tune with ab.

On 26 October 2010 11:58, SplitIce [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

ive found that if you have no blocking functions in php, aka its CPU  
bound  
then number of CPU cores+1 is the most efficient. If it has mysql (most  
likely does) and other IO bound operations then \*2 or \*3 is fine. values  
between 20-30 are common in decent scale web servers, in fact on my i7  
8gb  
ram I run 20, on my amd x2 4gb ram I run 15.

On Tue, Oct 26, 2010 at 9:52 PM, Phil B.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

Sorry didn’t read you config before posting, you already have this. 🙂

You probably need to reduce the number of child processes, more is not  
better.

On intensive PHP applications I’ve found lower is better.

For example, if you have 100 concurrent connections, this doesn’t mean  
you  
necessarily need 100 PHP-FPM children.

* * *

nginx mailing list  
removed\_email\_address@domain.invalid  
[http://nginx.org/mailman/listinfo/nginx](http://nginx.org/mailman/listinfo/nginx)

–  
Warez Scene [http://thewarezscene.org](http://thewarezscene.org) Free Rapidshare Downloads  
[http://www.nexusddl.com](http://www.nexusddl.com)

* * *

nginx mailing list  
removed\_email\_address@domain.invalid  
[http://nginx.org/mailman/listinfo/nginx](http://nginx.org/mailman/listinfo/nginx)

---

<div class="post-metadata">

**Author:** ![Xin\_L](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/x/3be4f8/32.png) [@Xin\_L](https://www.ruby-forum.com/u/Xin_L)\
**Post date:** [October 26, 2010, 11:18pm UTC](https://www.ruby-forum.com/t/server-performance-issue/198087/22 "2010-10-26T23:18:11Z")

</div>

Those message only occur with pm dynamic

Sent from my iPod

[Previous page](https://www.ruby-forum.com/t/server-performance-issue/198087.md?page=1)
