ispCP - Board - Support
very bad fcgi performance - Printable Version

+- ispCP - Board - Support (http://www.isp-control.net/forum)
+-- Forum: ispCP Omega Support Area (/forum-30.html)
+--- Forum: Usage (/forum-34.html)
+--- Thread: very bad fcgi performance (/thread-9997.html)

Pages: 1 2


very bad fcgi performance - nils - 03-14-2010 02:21 AM

A php-driven websites loads a very long time, while the php-cgi5 process uses 0% and mysql too. phpinfo() says i use
Code:
Server API    CGI/FastCGI
a2enmod -l says
Code:
[...]fcgid[...]
both apache2-mod_fcgid and apache2-mod_fastcgi/php5-fastcgi are installed..is that correct?
Reducing php-cgi5 processes count or apache worker count has no effect...
It's an openSuse 11.1 system with ispcp 1.0.4


RE: very bad fcgi performance - kilburn - 03-14-2010 04:42 AM

Does "top" show a high % in the CPU WAIT time? It looks like an I/O problem...


RE: very bad fcgi performance - nils - 03-14-2010 08:32 AM

All CPUs stay idle during almost the whole request
It's like this:
Code:
top - 23:20:49 up  6:39,  1 user,  load average: 0.05, 0.05, 0.01
Tasks: 152 total,   1 running, 150 sleeping,   0 stopped,   1 zombie
Cpu(s):  0.1%us,  0.1%sy,  0.0%ni, 99.8%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   1048576k total,   278324k used,   770252k free,        0k buffers
Swap:        0k total,        0k used,        0k free,        0k cached

A Request takes place as after the following pattern:
- Browser-GET
- ~1 sec pause
- php-cgi5 uses ~5%cpu for ~1 sec
- ~10 sec pause
- Delivery


RE: very bad fcgi performance - jeffv - 03-15-2010 10:47 PM

I'm having a very similar problem after an upgrade to 1.0.4.


RE: very bad fcgi performance - BeNe - 03-16-2010 01:14 AM

You use ApacheWorker with how many start process ?
And you are sure that the botleneck is not the MySQL-DB ?
Install eAccelerator to cache the sites - speeds up very fine and good.

--> http://www.isp-control.net/documentation/doku.php?id=howto:eaccelerator

Greez BeNe


RE: very bad fcgi performance - nils - 03-16-2010 01:30 AM

Don't know if mysql is the problem, mysqld-process stays at 0% cpu, no slow queries, mytop says:
Code:
MySQL on localhost (5.0.67-Max)                                                           up 0+00:02:37 [16:27:23]
Queries: 6.0k   qps:   39 Slow:     0.0         Se/In/Up/De(%):    00/00/00/00
             qps now:    0 Slow qps: 0.0  Threads:    1 (   1/   0) 00/00/00/00
Key Efficiency: 99.5%  Bps in/out:   9.4/ 1.4k   Now in/out:   8.4/ 1.3k

But a script with nothing but phpinfo() takes only 2,7ms...


RE: very bad fcgi performance - BeNe - 03-16-2010 01:38 AM

Maybe your CMS or what every is very slow ?

Greez BeNe


RE: very bad fcgi performance - nils - 03-16-2010 01:42 AM

On my old server, the cms(drupal6) was very fast, <10ms/request, on the new server with ispcp the same request takes several seconds
Both with the opcode/usercache system apc installed...
Ispcp's user interface is sometimes slow,too, but not everytimes, so i'm not sure..

I use mpm_prefork_module (static) with default tuning-conf:
Code:
<IfModule prefork.c>
    # number of server processes to start
    # http://httpd.apache.org/docs/2.2/mod/mpm_common.html#startservers
    StartServers       1
    # minimum number of server processes which are kept spare
    # http://httpd.apache.org/docs/2.2/mod/prefork.html#minspareservers
    MinSpareServers    1
    # maximum number of server processes which are kept spare
    # http://httpd.apache.org/docs/2.2/mod/prefork.html#maxspareservers
    MaxSpareServers    5
    # highest possible MaxClients setting for the lifetime of the Apache process.
    # http://httpd.apache.org/docs/2.2/mod/mpm_common.html#serverlimit
    ServerLimit       10
    # maximum number of server processes allowed to start
    # http://httpd.apache.org/docs/2.2/mod/mpm_common.html#maxclients
    MaxClients        10
    # maximum number of requests a server process serves
    # http://httpd.apache.org/docs/2.2/mod/mpm_common.html#maxrequestsperchild
    MaxRequestsPerChild  10000
</IfModule>



RE: very bad fcgi performance - BeNe - 03-16-2010 01:47 AM

Why Prefork ? Work would make more sense or ?!

Greez BeNe


RE: very bad fcgi performance - kilburn - 03-16-2010 01:59 AM

Quote:Mem: 1048576k total, 278324k used, 770252k free, 0k buffers

0k buffers? This is REALLY strange. I think your VM is on an overloaded host machine or something...