Current time: 11-29-2024, 11:28 AM Hello There, Guest! (LoginRegister)


Post Reply 
[SOLVED] php5-cgi causes abnormally high cpu-load
Author Message
psygarden Offline
Junior Member
*

Posts: 84
Joined: Jan 2008
Reputation: 0
Post: #1
[SOLVED] php5-cgi causes abnormally high cpu-load
I don't have a specific idea about what might be causing this, but it looks like i have many (MANY) php5-cgi processess that all use up their bit of cpu, the system also uses up a LOT of cpu

it started about 5 hours ago when i was adding more sites to my server, but no site was added that could be responsible for this kind of cpu load...

the sites used to run on a singlecore amd 3800 and now i'm on a dualcore 5800 - cpu load is higher on the new server by a TENFOLD...


are there things that i can look at to avoid having so many php5-cgi processes? I already restored my default apache2.conf file to make sure i didn't make any errors there...


I found a link that seems to be covering the same issue but it's quite old so i'm probably using different versions of ispcp (so i didn't make the changes): http://www.isp-control.net/forum/showthr...p?tid=1103

greetings,
Rik
(This post was last modified: 01-28-2008 06:01 PM by BeNe.)
01-25-2008 07:39 AM
Visit this user's website Find all posts by this user Quote this message in a reply
psygarden Offline
Junior Member
*

Posts: 84
Joined: Jan 2008
Reputation: 0
Post: #2
RE: php5-cgi causes abnormally high cpu-load
Is php5-cgi used to take the backups of the websites?

does anyone know what performance influences this has when it's archiving 6gigabyte of mp3 files ?
01-25-2008 07:59 AM
Visit this user's website 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: #3
RE: php5-cgi causes abnormally high cpu-load
Quote:but it looks like i have many (MANY) php5-cgi processess that all use up their bit of cpu
There should run every 30min a script to purge old sessions in you cron
(/etc/cron.d/ispcp)
Code:
# Look for and purge old sessions every 30 minutes
0,30 *     * * *     root   /var/www/ispcp/engine/tools/ispcpphptemp.sh >/dev/null 2>&1
If you use Debian this does maybe now work so you can try this:
Code:
# Look for and purge old sessions every 30 minutes
09,39 *     * * *     root   [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -print0 | xargs -r -0 rm
Quote:Is php5-cgi used to take the backups of the websites?
The Backups are not in the webroot so php5-cgi cant catch it.
Quote:does anyone know what performance influences this has when it's archiving 6gigabyte of mp3 files
You mean to Backup the 6GB ?

Greez BeNe
01-25-2008 08:17 AM
Visit this user's website Find all posts by this user Quote this message in a reply
psygarden Offline
Junior Member
*

Posts: 84
Joined: Jan 2008
Reputation: 0
Post: #4
RE: php5-cgi causes abnormally high cpu-load
BeNe Wrote:
Quote:but it looks like i have many (MANY) php5-cgi processess that all use up their bit of cpu
There should run every 30min a script to purge old sessions in you cron
(/etc/cron.d/ispcp)
Code:
# Look for and purge old sessions every 30 minutes
0,30 *     * * *     root   /var/www/ispcp/engine/tools/ispcpphptemp.sh >/dev/null 2>&1
If you use Debian this does maybe now work so you can try this:
Code:
# Look for and purge old sessions every 30 minutes
09,39 *     * * *     root   [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -print0 | xargs -r -0 rm
Quote:Is php5-cgi used to take the backups of the websites?
The Backups are not in the webroot so php5-cgi cant catch it.
Quote:does anyone know what performance influences this has when it's archiving 6gigabyte of mp3 files
You mean to Backup the 6GB ?

Greez BeNe

I rebooted my server and it's looking much better now, i just hope it stays that way...

about the backups yeah, what does it mean cpu-wise when bzip2 archives are being created of 5-6 gigabyte folders ?

greetings,
and thanks for the support!
Rik
01-25-2008 08:25 AM
Visit this user's website 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: php5-cgi causes abnormally high cpu-load
Quote:I rebooted my server and it's looking much better now, i just hope it stays that way...
I mean No, but we will see.

Quote:what does it mean cpu-wise when bzip2 archives are being created of 5-6 gigabyte folders
In the current ispCP Trunk version you can choos in the ispcp.conf between bzip2 and gzip. Gzip is much faster and does not need so many CPU and RAM but the archive is a little bit bigger. bzip2 compress better but need more time/ram/cpu. So if you have enough free space -> gzip!

Greez BeNe
01-25-2008 08:29 AM
Visit this user's website Find all posts by this user Quote this message in a reply
psygarden Offline
Junior Member
*

Posts: 84
Joined: Jan 2008
Reputation: 0
Post: #6
RE: php5-cgi causes abnormally high cpu-load
I've got 2x400Gb so i set it to gzip for now, to see how that works!
01-25-2008 08:50 AM
Visit this user's website Find all posts by this user Quote this message in a reply
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #7
RE: php5-cgi causes abnormally high cpu-load
Since mp3 already is a compressed format you'll gain not much with bzip2 but it takes *much* more time and cpu power...

/J
01-25-2008 09:24 AM
Visit this user's website Find all posts by this user Quote this message in a reply
psygarden Offline
Junior Member
*

Posts: 84
Joined: Jan 2008
Reputation: 0
Post: #8
RE: php5-cgi causes abnormally high cpu-load
Is there an easy way to schedule all the backups of the sites to start at 3am at night?

greetings,
Rik
01-25-2008 09:27 AM
Visit this user's website Find all posts by this user Quote this message in a reply
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #9
RE: php5-cgi causes abnormally high cpu-load
Yes!

in the cron job file

/etc/cron.d/ispcp - find the right lines...

instead of @daily you can write

0 3 * * *

/J
01-25-2008 09:35 AM
Visit this user's website Find all posts by this user Quote this message in a reply
psygarden Offline
Junior Member
*

Posts: 84
Joined: Jan 2008
Reputation: 0
Post: #10
RE: php5-cgi causes abnormally high cpu-load
The backups are scheduled properly now (all happening at night and using gzip instead of bz2)

now i still have the cpu load issue, it's far to high for what the server is doing...

   

It's also somewhat of a suprise to me that the php5-cgi threads need to be killed by a cronjob ? does this mean that they don't even terminate when finished the task that they get???

greetings,
Rik

psµ. cpu load is high, but server performance is still reasonable...
(This post was last modified: 01-28-2008 08:37 PM by psygarden.)
01-25-2008 11:28 PM
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: 1 Guest(s)