Current time: 11-15-2024, 01:23 AM Hello There, Guest! (LoginRegister)


Post Reply 
High load on ispcp server
Author Message
soringo Offline
Junior Member
*

Posts: 33
Joined: Feb 2007
Reputation: 0
Post: #1
High load on ispcp server
Hi guys.

I use ispcp rc2 on debian etch with php5.

I have a big problem with high load on my srv.

My hardware is ok, cpu is intel core 2 duo 2000, ram 1gb, mb intel, hdd sata2....I have moved some domains from other server to this and I'm not pleased with this high load of resources .

top - 08:58:37 up 8 days, 21:14, 1 user, load average: 18.15, 18.11, 18.05
Tasks: 125 total, 19 running, 104 sleeping, 0 stopped, 2 zombie
Cpu(s): 47.3%us, 52.7%sy, 0.0%ni, 0.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 1010392k total, 976840k used, 33552k free, 94444k buffers
Swap: 2690876k total, 32k used, 2690844k free, 613092k cached


Any suggestions?!

Thx
08-03-2007 04:06 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: #2
RE: High load on ispcp server
There was a Thread in the German Corner.
Maybe it could help - i translate it:

First at i changed the "var/www/fcgi/DOMAIN/php4-fcgi-starter" file
This is the Original Code:

Code:
#!/bin/sh

PHPRC="/var/www/fcgi/DOMAIN/php4/"

export PHPRC
export PHP_FCGI_MAX_REQUESTS

exec /usr/bin/php5-cgi

And this is my modified Code

Code:
#!/bin/sh

# Kill all old process
ps ax -F | awk '{ if ( $3 == "1" && $1 == "vu2001" && $12 == "/usr/bin/php5-cgi" ) { print "kill " $2 } }' | sh

PHPRC="/var/www/fcgi/DOMAIN/php4/"

export PHPRC
#PHP_FCGI_CHILDREN=10
#export PHP_FCGI_CHILDREN
#PHP_FCGI_MAX_REQUESTS=11000
#export PHP_FCGI_MAX_REQUESTS

exec /usr/bin/php5-cgi


Attention!
change "vu2001" and "/usr/bin/php5-cgi" to your needs.

Now the load should going down.

I also changed the file "/etc/apache2/mods-available/fastcgi.conf"
Search for this:
Code:
FastCgiConfig -minProcesses 1 -maxProcesses 10 -singleThreshold 100
              #-killInterval 300 \
              #-autoUpdate \
              #-idle-timeout 300 \
              #-pass-header HTTP_AUTHORIZATION

FastCgiServer /var/www/fcgi/master/php4-fcgi-starter -user vu2000 -group vu2000


Replace through:

Code:
FastCgiConfig -idle-timeout 300 -killInterval 60 -maxClassProcesses 5 -maxProcesses 400 -minProcesses 0 -multiThreshold 80 -startDelay 5

Now my Server runs the last 3 weeks without big problems and with a max. load of 0.40
You must also change the php5-fcgi-starter if you use PHP5.

Greez BeNe
(This post was last modified: 08-03-2007 04:22 PM by BeNe.)
08-03-2007 04:21 PM
Visit this user's website Find all posts by this user Quote this message in a reply
soringo Offline
Junior Member
*

Posts: 33
Joined: Feb 2007
Reputation: 0
Post: #3
RE: High load on ispcp server
Thx man..I'll try it.
08-03-2007 04:38 PM
Find all posts by this user Quote this message in a reply
soringo Offline
Junior Member
*

Posts: 33
Joined: Feb 2007
Reputation: 0
Post: #4
RE: High load on ispcp server
I want to edit php5-fcgi-starter.tpl but I dont know if I can use vu user in this...is there a way tu pass this variable on creating a new domain? in this case all new created domain will have this settings .
08-03-2007 05:03 PM
Find all posts by this user Quote this message in a reply
soringo Offline
Junior Member
*

Posts: 33
Joined: Feb 2007
Reputation: 0
Post: #5
RE: High load on ispcp server
I solved the problem and make some changes to php starter template and dmn-manager to generate the file when you create a new domain.


Put this code in your php5-fcgi-starter.tpl:
#!/bin/sh


# Kill all old process
ps ax -F | awk '{ if ( $3 == "1" && $1 == "{SUEXEC_USER}" && $12 == "/usr/bin/php5-cgi" ) { print "kill " $2 } }' | sh

PHPRC="{PHP_STARTER_DIR}/{DMN_NAME}/php5/"

export PHPRC
#PHP_FCGI_CHILDREN=10
#export PHP_FCGI_CHILDREN
#PHP_FCGI_MAX_REQUESTS=11000
#export PHP_FCGI_MAX_REQUESTS

and add this code in ispcp-dmn-mngr at line 2033:
$starter_tpl =~ s/{SUEXEC_USER}/$sys_user/gi;


Good luck to all!

For rats: sorry for bother you Smile
08-04-2007 06:12 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: #6
RE: High load on ispcp server
Is the Load now OK ??

Greez BeNe
08-04-2007 11:44 PM
Visit this user's website Find all posts by this user Quote this message in a reply
soringo Offline
Junior Member
*

Posts: 33
Joined: Feb 2007
Reputation: 0
Post: #7
RE: High load on ispcp server
BeNe Wrote:Is the Load now OK ??

Greez BeNe

yeap...now is 2.36 after just 5 hours.
08-05-2007 02:37 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: #8
RE: High load on ispcp server
Fine - this looks much better Wink

Greez BeNe
08-05-2007 02:42 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Philipp Offline
Junior Member
*

Posts: 18
Joined: Aug 2007
Reputation: 1
Post: #9
RE: High load on ispcp server
Perhaps one of the developers can add the {SUEXEC_USER} option to the development version after it seems useful for some configurations

Quote:and add this code in ispcp-dmn-mngr at line 2033:
$starter_tpl =~ s/{SUEXEC_USER}/$sys_user/gi;
08-09-2007 02:54 AM
Find all posts by this user Quote this message in a reply
platzwart Offline
Junior Member
*

Posts: 100
Joined: Mar 2007
Reputation: 1
Post: #10
RE: High load on ispcp server
Quote:and add this code in ispcp-dmn-mngr at line 2033:
$starter_tpl =~ s/{SUEXEC_USER}/$sys_user/gi;

i think, thats no longer correct... looking into that file it would make no sense to add this code at line 2033...
could you please tell me where to put it more precisley? perhaps you can tell me into wich sub...

thx!![/quote]
08-16-2007 03:12 AM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


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