Current time: 09-23-2024, 06:27 AM Hello There, Guest! (LoginRegister)


Post Reply 
Hoher Server Load
Author Message
the_condor Offline
Junior Member
*

Posts: 33
Joined: Aug 2008
Reputation: 0
Post: #1
Hoher Server Load
Hallo,
wie hier in dem Forum schon öfters behandelt habe ich auch ein Problem mit einem hohen Server Load.

Dieser ist zwischen 6 - 18

Mein System ist:
AMD Athlon™ 64 X2 Dual Core Processor 5600+
---
4 GIG RAM
---
debian 5 ,64 bit
---
PHP 5.2.9-0.dotdeb.1 with Suhosin-Patch 0.9.7
---
mysql Ver 14.14 Distrib 5.1.34, for debian-linux-gnu (x86_64) using readline 5.2
---
Server version: Apache/2.2.9 (Debian)
Server built: Jan 21 2009 00:06:59
Server's Module Magic Number: 20051115:15
Server loaded: APR 1.2.12, APR-Util 1.2.12
Compiled using: APR 1.2.12, APR-Util 1.2.12
Architecture: 64-bit
Server MPM: Worker
threaded: yes (fixed thread count)
forked: yes (variable process count)
Server compiled with....
-D APACHE_MPM_DIR="server/mpm/worker"
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_SYSVSEM_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D DYNAMIC_MODULE_LIMIT=128
-D HTTPD_ROOT=""
-D SUEXEC_BIN="/usr/lib/apache2/suexec"
-D DEFAULT_PIDLOG="/var/run/apache2.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="/etc/apache2/mime.types"
-D SERVER_CONFIG_FILE="/etc/apache2/apache2.conf"

Der hohe Load wird meißt durch php5-cgi verursacht!

Code:
6749 vu2002    20   0  130m  27m 3892 R   16  0.7   9:24.75 php5-cgi

/etc/apache2/mods-available/fastcgi.conf
Code:
<IfModule mod_fastcgi.c>
  AddHandler fastcgi-script .fcgi
  #FastCgiWrapper /usr/lib/apache2/suexec
  FastCgiIpcDir /var/lib/apache2/fastcgi
</IfModule>

Apache Einstellung:
Timeout 30
KeepAlive Off

<IfModule mpm_prefork_module>
StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxClients 100
MaxRequestsPerChild 0
</IfModule>

<IfModule mpm_worker_module>
StartServers 2
MaxClients 200
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 4000
</IfModule>

Hier mal ein Screnn mit htop
[Image: ispcp12Z1DL.gif]

Hier ist der Load nicht ganz so hoch!

Hat jemand eine Idee oder ein Tipp wo ich bissl was verbessern kann?
Mysql wird mit mysqltuner + tuning-primer optimiert soweit möglich.

mfg
the_condor
06-12-2009 04:51 AM
Find all posts by this user Quote this message in a reply
Lucan Offline
Member
*
Beta Team

Posts: 982
Joined: Jul 2008
Reputation: 12
Post: #2
RE: Hoher Server Load
Poste mal die eingeschalteten apache mods.

sowie die fastcgi_ispcp.conf
06-12-2009 05:27 AM
Find all posts by this user Quote this message in a reply
Top44 Offline
Member
***

Posts: 271
Joined: Sep 2007
Reputation: 1
Post: #3
RE: Hoher Server Load
Schau dir die Domain vom user vu2002 an, falls es deine domain ist checken ggf. code optimieren falls nicht deine frist Setzen damit alles durchgecheckt wird. So würde ich es zumindest machen..

grüße
(This post was last modified: 06-12-2009 08:04 AM by Top44.)
06-12-2009 08:02 AM
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: #4
RE: Hoher Server Load
Auf meinem System kommt's zwischendurch auch vor, dass ein php-Prozess mal nicht mehr stoppt und den Load etwas hoch hält.

Ich kille diesen Prozess dann jeweils ud hab wieder Ruhe für ne Zeit...
Ein Merkmal ist zB. wenn man apache "restarted", der obige php-Prozess wird dabei nicht beendet...

/J
06-12-2009 08:22 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Knut Offline
Member
***

Posts: 736
Joined: Nov 2006
Reputation: 10
Post: #5
RE: Hoher Server Load
(06-12-2009 08:22 AM)joximu Wrote:  Ein Merkmal ist zB. wenn man apache "restarted", der obige php-Prozess wird dabei nicht beendet...

Wahrscheinlich weil der Prozess nicht zum Apachen gehört und als User via CGI gestartet wird.

Das beschriebene Verhalten habe ich übrigens auch manchmal, konnte bisher aber keinen "gescheiten" Hinweis finden was dies auslöst.

Gruß Knut
06-12-2009 03:10 PM
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: #6
RE: Hoher Server Load
(06-12-2009 03:10 PM)Knut Wrote:  
(06-12-2009 08:22 AM)joximu Wrote:  Ein Merkmal ist zB. wenn man apache "restarted", der obige php-Prozess wird dabei nicht beendet...

Wahrscheinlich weil der Prozess nicht zum Apachen gehört und als User via CGI gestartet wird.

denk' ich nicht - aber der Prozess hat sich dann schon irgendwie verselbständigt. Wird aber wie alle php-cgi Prozesse via suexec durch apache gestartet...

(06-12-2009 03:10 PM)Knut Wrote:  Das beschriebene Verhalten habe ich übrigens auch manchmal, konnte bisher aber keinen "gescheiten" Hinweis finden was dies auslöst.
Gruß Knut

ja, das ist schwieriger...

/J
06-12-2009 04:25 PM
Visit this user's website Find all posts by this user Quote this message in a reply
the_condor Offline
Junior Member
*

Posts: 33
Joined: Aug 2008
Reputation: 0
Post: #7
RE: Hoher Server Load
/etc/ispcp/apache/working/fastcgi_ispcp.conf

Code:
<IfModule mod_fastcgi.c>
        FastCgiWrapper On
        FastCgiIpcDir /var/lib/apache2/fastcgi2

        FastCgiConfig -minProcesses 1 \
                  -maxProcesses 400 \
                  -maxClassProcesses 5 \
                  -multiThreshold 80 \
                  -killInterval 60 \
                  -startDelay 5
                  -idle-timeout 60
                  # -singleThreshold 100 \
                  # -autoUpdate \
                  # -pass-header HTTP_AUTHORIZATION

        FastCgiServer {PHP_STARTER_DIR}/master/php{PHP_VERSION}-fcgi-starter -user {APACHE_SUEXEC_USER_PREF}{APACHE_SUEXEC_MIN_UID} -group {APACHE_SUEXEC_USER_PREF}{APACHE_SUEXEC_MIN_GID} -idle-timeout 300

        #
        # PHP{PHP_VERSION} SUPPORT
        #

        AddHandler php-fastcgi .php .php{PHP_VERSION}

        <Location /php{PHP_VERSION}/php{PHP_VERSION}-fcgi-starter>
                SetHandler fastcgi-script
                Options +ExecCGI
        </Location>

        Action php-fastcgi /php{PHP_VERSION}/php{PHP_VERSION}-fcgi-starter
        AddType application/x-httpd-php .php .php{PHP_VERSION}
</IfModule>

/etc/apache2/mods-available/fastcgi_ispcp.conf

Code:
<IfModule mod_fastcgi.c>
        FastCgiWrapper On
        FastCgiIpcDir /var/lib/apache2/fastcgi2

        FastCgiConfig -minProcesses 1 \
                  -maxProcesses 400 \
                  -maxClassProcesses 5 \
                  -multiThreshold 80 \
                  -killInterval 60 \
                  -startDelay 5
                  # -singleThreshold 100 \
                  # -autoUpdate \
                  # -pass-header HTTP_AUTHORIZATION

        FastCgiServer /var/www/fcgi/master/php5-fcgi-starter -user vu2000 -group vu2000 -idle-timeout 300

        #
        # PHP5 SUPPORT
        #

        AddHandler php-fastcgi .php .php5

        <Location /php5/php5-fcgi-starter>
                SetHandler fastcgi-script
                Options +ExecCGI
        </Location>

        Action php-fastcgi /php5/php5-fcgi-starter
        AddType application/x-httpd-php .php .php5
</IfModule>

vu2002 gehört zu unserem Grafik Projekt.

Apache Mods wurde auf das notdürftige schon reduziert!
06-13-2009 02:03 AM
Find all posts by this user Quote this message in a reply
Lucan Offline
Member
*
Beta Team

Posts: 982
Joined: Jul 2008
Reputation: 12
Post: #8
RE: Hoher Server Load
Die config aus dem mods-available sieht gut aus, die aus dem working ist allerdings "im Eimer".

Kopier mal die ausm mods-available in den working Ordner
06-13-2009 08:33 PM
Find all posts by this user Quote this message in a reply
the_condor Offline
Junior Member
*

Posts: 33
Joined: Aug 2008
Reputation: 0
Post: #9
RE: Hoher Server Load
Hallo,
das bringt ja nicht wirklich was, habe aus der Aktuellen Version die fastcgi_ispcp.conf ins Working kopiert,jedoch immer noch hoher Load zur Zeit load average: 11.04, 10.64, 7.72
06-15-2009 12:54 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: #10
RE: Hoher Server Load
Schon mal fcgid mit der Config aus dem Trunk versucht ?

Greez BeNe
06-16-2009 03:32 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: 4 Guest(s)