Current time: 12-27-2024, 02:16 PM Hello There, Guest! (LoginRegister)


Post Reply 
very bad fcgi performance
Author Message
nils Offline
Junior Member
*

Posts: 11
Joined: Dec 2009
Reputation: 0
Post: #1
very bad fcgi performance
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
(This post was last modified: 03-14-2010 02:29 AM by nils.)
03-14-2010 02:21 AM
Find all posts by this user Quote this message in a reply
kilburn Offline
Development Team
*****
Dev Team

Posts: 2,182
Joined: Feb 2007
Reputation: 34
Post: #2
RE: very bad fcgi performance
Does "top" show a high % in the CPU WAIT time? It looks like an I/O problem...
03-14-2010 04:42 AM
Visit this user's website Find all posts by this user Quote this message in a reply
nils Offline
Junior Member
*

Posts: 11
Joined: Dec 2009
Reputation: 0
Post: #3
RE: very bad fcgi performance
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
03-14-2010 08:32 AM
Find all posts by this user Quote this message in a reply
jeffv Offline


Posts: 4
Joined: Dec 2009
Reputation: 0
Post: #4
RE: very bad fcgi performance
I'm having a very similar problem after an upgrade to 1.0.4.
03-15-2010 10:47 PM
Find all posts by this user Quote this message in a reply
BeNe Offline
Moderator
*****
Moderators

Posts: 5,899
Joined: Jan 2007
Reputation: 68
Post: #5
RE: very bad fcgi performance
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...ccelerator

Greez BeNe
(This post was last modified: 03-16-2010 01:15 AM by BeNe.)
03-16-2010 01:14 AM
Visit this user's website Find all posts by this user Quote this message in a reply
nils Offline
Junior Member
*

Posts: 11
Joined: Dec 2009
Reputation: 0
Post: #6
RE: very bad fcgi performance
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...
(This post was last modified: 03-16-2010 01:30 AM by nils.)
03-16-2010 01:30 AM
Find all posts by this user Quote this message in a reply
BeNe Offline
Moderator
*****
Moderators

Posts: 5,899
Joined: Jan 2007
Reputation: 68
Post: #7
RE: very bad fcgi performance
Maybe your CMS or what every is very slow ?

Greez BeNe
03-16-2010 01:38 AM
Visit this user's website Find all posts by this user Quote this message in a reply
nils Offline
Junior Member
*

Posts: 11
Joined: Dec 2009
Reputation: 0
Post: #8
RE: very bad fcgi performance
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>
(This post was last modified: 03-16-2010 01:45 AM by nils.)
03-16-2010 01:42 AM
Find all posts by this user Quote this message in a reply
BeNe Offline
Moderator
*****
Moderators

Posts: 5,899
Joined: Jan 2007
Reputation: 68
Post: #9
RE: very bad fcgi performance
Why Prefork ? Work would make more sense or ?!

Greez BeNe
03-16-2010 01:47 AM
Visit this user's website Find all posts by this user Quote this message in a reply
kilburn Offline
Development Team
*****
Dev Team

Posts: 2,182
Joined: Feb 2007
Reputation: 34
Post: #10
RE: very bad fcgi performance
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...
03-16-2010 01:59 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 3 Guest(s)