Slayer8 Geschrieben 1. November 2007 Geschrieben 1. November 2007 Hi, heute glüht mein Webserver wieder heiß, CPU Last von ~ 90% und Systemlast von lediglich 8%. Woran kann das liegen??? Ich meine klar sind einige Besucher auf der Seite (derzeit um die 60) aber der große Unterschied zwischen CPU und Systemlast. Der Rechner ist ein: CPU GenuineIntel, Intel® Celeron® CPU 2.40GHz Operating system Linux 2.6.18.8-0.7-default mit 512 MB RAM Habe einige Apache Prefork Prozesse die jeweils ca. 18MB belegen, sollte ich evtl auf den Worker Bereich wechseln? Im Anhang ein Auszug aus top. (Änderung: Dazu noch einen Auszug aus dem Watchdog, der zeit ja das Gegentei lvom TOP, dass die Gesamtlsat zu hoch ist und der Server um 15 Uhr zusammengebrochen ist ?). Wer hat Tipps, oder ist ein Serverwechsel anzuraten ? Danke und Gruß S8 Zitieren
Amstelchen Geschrieben 1. November 2007 Geschrieben 1. November 2007 Habe einige Apache Prefork Prozesse die jeweils ca. 18MB belegen, sollte ich evtl auf den Worker Bereich wechseln? hätte ich das jetzt nicht um ein haar überlesen, hätte ich gesagt: ja - schau mal ob du mit der worker MPM besser fährst als mit prefork (z.b. wenn du module hast, die auch threadsicher sind; prefork verwendet AFAIK keine threads). das kommt allerdings auch darauf an, was auf dem apachen so läuft - ist das statischer inhalt? ist das dynamischer inhalt? weiters lassen sich sicherlich noch einige prozent performance aus der richtigen balance von direktiven (insb. MaxSpareServers und MinSpareServers) herausholen - poste diese allenfalls auch mal. Wer hat Tipps, oder ist ein Serverwechsel anzuraten ? nö. apache kann sogar auf linux mit 1/2 Gib RAM recht gut skalieren, wenn alles stimmig eingestellt ist. s'Amstel Zitieren
Slayer8 Geschrieben 4. November 2007 Autor Geschrieben 4. November 2007 Hallo Amstelchen, ersteinmal vielen lieben Dank für die Hilfe! Anbei die Einstellungen yu meinem Prefork StartServers 5 MinSpareServers 5 MaxSpareServers 10 ServerLimit 150 MaxClients 150 MaxRequestsPerChild 10000 Auf dem Server läuft ein CMS mit Bilddatenbank, bisher ging der jedoch nie ab 50 Besuchern in die Knie. Wir hatten jedoch regelmäßig (ca. alle 3 Monate) starke Performance Probleme, die den Server in die Knie zwangen, darum haben wir im Juli diesen Jahres den Server mit OpenSuse 10.2 und den neusten Apache + MySQL Versionen neu aufgesetzt (bzw. aufsetzen müssen, da der alte Server nicht mehr ansprechbar war und die Zugriffe proportional zunahmen, nach 2 Stunden dann aber wieder abnahmen, bis zum nächsten Tag). Mittlerweile hat sich das ganze wieder ein wenig beruhigt, ich hänge mal aktuelle Screenshot an (Watchdog, top, VMstat). Vielen Dank und beste Grüße S8 Zitieren
geloescht_JesterDay Geschrieben 14. November 2007 Geschrieben 14. November 2007 Also ich finde, dass sieht eher nach dem rumdoktorn an den Symptomen als an der Ursache aus. Wichtiger als top wäre IMHO z.b. die Access.log von der Zeit. Also wieviele Zugriffe gab es da und vorallem, was wurde da aufgerufen. Vielleicht gibt es da ja im CMS ein Problem, was die CPU Last hervorruft. Zitieren
aLeXL Geschrieben 15. November 2007 Geschrieben 15. November 2007 ist ein Serverwechsel anzuraten ? Naja also ich denke der Server ist eigentlich ausreichend dimensioniert, kann mir eigentlich nicht vorstellen, dass es daran liegt. Zitieren
Slayer8 Geschrieben 17. November 2007 Autor Geschrieben 17. November 2007 Hallo und erst einmal Sorry für die späte Antwort! Leider war ich eine Woche unterwegs, aber nun kann ich mich wieder voll und hganz dem Server widmen. Anbei die letzten Abfragen (angehangen) und die Config Dateien: Mysql.cnf: # The MySQL server [mysqld] set-variable=local-infile=0 port = 3306 socket = /var/lib/mysql/mysql.sock skip-locking key_buffer = 32M #16 max_allowed_packet = 1M table_cache = 512 sort_buffer_size = 4M net_buffer_length = 8K read_buffer_size = 256K read_rnd_buffer_size = 512K myisam_sort_buffer_size = 8M long-query-time = 5 query_cache_size = 4M thread_cache = 32 # required unique id between 1 and 2^32 - 1 # defaults to 1 if master-host is not set # but will not function as a master if omitted server-id = 1 # The safe_mysqld script [safe_mysqld] err-log=/var/lib/mysql/mysqld.log [mysqldump] quick max_allowed_packet = 16M [mysql] no-auto-rehash [isamchk] key_buffer = 20M sort_buffer_size = 20M read_buffer = 2M write_buffer = 2M [myisamchk] key_buffer = 20M sort_buffer_size = 20M read_buffer = 2M write_buffer = 2M [mysqlhotcopy] interactive-timeout Und Apache.conf (die jedoch gestückelt ist): # # /etc/apache2/httpd.conf # Overview of include files, chronologically: # # httpd.conf # | # |-- uid.conf . . . . . . . . . . . . . . UserID/GroupID to run under # |-- server-tuning.conf . . . . . . . . . sizing of the server (how many processes to start, ...) # |-- sysconfig.d/loadmodule.conf . . . . . [*] load these modules # |-- listen.conf . . . . . . . . . . . . . IP adresses / ports to listen on # |-- mod_log_config.conf . . . . . . . . . define logging formats # |-- sysconfig.d/global.conf . . . . . . . [*] server-wide general settings # |-- mod_status.conf . . . . . . . . . . . restrict access to mod_status (server monitoring) # |-- mod_info.conf . . . . . . . . . . . . restrict access to mod_info # |-- mod_usertrack.conf . . . . . . . . . defaults for cookie-based user tracking # |-- mod_autoindex-defaults.conf . . . . . defaults for displaying of server-generated directory listings # |-- mod_mime-defaults.conf . . . . . . . defaults for mod_mime configuration # |-- errors.conf . . . . . . . . . . . . . customize error responses # |-- ssl-global.conf . . . . . . . . . . . SSL conf that applies to default server _and all_ virtual hosts # | # |-- default-server.conf . . . . . . . . . set up the default server that replies to non-virtual-host requests # | |--mod_userdir.conf . . . . . . . . enable UserDir (if mod_userdir is loaded) # | `--conf.d/apache2-manual?conf . . . add the docs ('?' = if installed) # | # |-- sysconfig.d/include.conf . . . . . . [*] your include files # | (for each file to be included here, put its name # | into APACHE_INCLUDE_* in /etc/sysconfig/apache2) # | # `-- vhosts.d/ . . . . . . . . . . . . . . for each virtual host, place one file here # `-- *.conf . . . . . . . . . . . . . (*.conf is automatically included) # # Files marked [*] are created from sysconfig upon server restart: instead of # these files, you edit /etc/sysconfig/apache2 # run under this user/group id Include /etc/apache2/uid.conf # - how many server processes to start (server pool regulation) # - usage of KeepAlive Include /etc/apache2/server-tuning.conf # generated from APACHE_MODULES in /etc/sysconfig/apache2 Include /etc/apache2/sysconfig.d/loadmodule.conf # IP addresses / ports to listen on Include /etc/apache2/listen.conf # generated from global settings in /etc/sysconfig/apache2 Include /etc/apache2/sysconfig.d/global.conf # optional mod_status, mod_info Include /etc/apache2/mod_status.conf Include /etc/apache2/mod_info.conf # optional cookie-based user tracking # read the documentation before using it!! Include /etc/apache2/mod_usertrack.conf # configuration of server-generated directory listings Include /etc/apache2/mod_autoindex-defaults.conf # associate MIME types with filename extensions TypesConfig /etc/apache2/mime.types DefaultType text/plain Include /etc/apache2/mod_mime-defaults.conf # set up (customizable) error responses Include /etc/apache2/errors.conf # global (server-wide) SSL configuration, that is not specific to # any virtual host Include /etc/apache2/ssl-global.conf # forbid access to the entire filesystem by default <Directory /> Options None AllowOverride None Order deny,allow Deny from all </Directory> # use .htaccess files for overriding, AccessFileName .htaccess # and never show them <Files ~ "^\.ht"> Order allow,deny Deny from all </Files> ### 'Main' server configuration Include /etc/apache2/default-server.conf # Another way to include your own files Include /etc/apache2/sysconfig.d/include.conf ### Virtual server configuration ############################################ Include /etc/apache2/vhosts.d/*.conf AddOutputFilter INCLUDES .shtml AddType text/html .shtml AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps Die Default.Server.conf die inkludiert wird: # # Global configuration that will be applicable for all virtual hosts, unless # deleted here, or overriden elswhere. DocumentRoot "/srv/www/htdocs" # # Configure the DocumentRoot <Directory "/srv/www/htdocs"> # Possible values for the Options directive are "None", "All", # or any combination of: # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews # Options None # AllowOverride controls what directives may be placed in .htaccess files. # It can be "All", "None", or any combination of the keywords: # Options FileInfo AuthConfig Limit AllowOverride None # Controls who can get stuff from this server. Order allow,deny Allow from all </Directory> Alias /icons/ "/usr/share/apache2/icons/" <Directory "/usr/share/apache2/icons"> Options Indexes MultiViews AllowOverride None Order allow,deny Allow from all </Directory> # ScriptAlias ScriptAlias /cgi-bin/ "/srv/www/cgi-bin/" # "/srv/www/cgi-bin" should be changed to whatever your ScriptAliased # CGI directory exists, if you have that configured. # <Directory "/srv/www/cgi-bin"> AllowOverride None Options +ExecCGI -Includes Order allow,deny Allow from all </Directory> # UserDir: The name of the directory that is appended onto a user's home # directory if a ~user request is received. # # To disable it, simply remove userdir from the list of modules in APACHE_MODULES # in /etc/sysconfig/apache2. # <IfModule mod_userdir.c> # Note that the name of the user directory ("public_html") cannot simply be # changed here, since it is a compile time setting. The apache package # would have to be rebuilt. You could work around by deleting # /usr/sbin/suexec, but then all scripts from the directories would be # executed with the UID of the webserver. UserDir public_html # The actual configuration of the directory is in # /etc/apache2/mod_userdir.conf. Include /etc/apache2/mod_userdir.conf # You can, however, change the ~ if you find it awkward, by mapping e.g. # http://www.example.com/users/karl-heinz/ --> /home/karl-heinz/public_html/ #AliasMatch ^/users/([a-zA-Z0-9-_.]*)/?(.*) /home/$1/public_html/$2 </IfModule> # Include all *.conf files from /etc/apache2/conf.d/. Include /etc/apache2/conf.d/*.conf # The manual... if it is installed ('?' means it won't complain) Include /etc/apache2/conf.d/apache2-manual?conf Und die Servertuning.conf: ## ## Server-Pool Size Regulation (MPM specific) ## # prefork MPM <IfModule prefork.c> # number of server processes to start StartServers 5 # minimum number of server processes which are kept spare MinSpareServers 5 # maximum number of server processes which are kept spare MaxSpareServers 10 # highest possible MaxClients setting for the lifetime of the Apache process. ServerLimit 150 # maximum number of server processes allowed to start MaxClients 150 # maximum number of requests a server process serves # http://httpd.apache.org/docs/2.2/mod/mpm_common.html#maxrequestsperchild MaxRequestsPerChild 10000 </IfModule> # worker MPM <IfModule worker.c> # initial number of server processes to start # http://httpd.apache.org/docs/2.2/mod/mpm_common.html#startservers StartServers 3 # minimum number of worker threads which are kept spare MinSpareThreads 25 # maximum number of worker threads which are kept spare MaxSpareThreads 75 # upper limit on the configurable number of threads per child process ThreadLimit 64 # maximum number of simultaneous client connections MaxClients 150 # number of worker threads created by each child process ThreadsPerChild 25 # maximum number of requests a server process serves # http://httpd.apache.org/docs/2.2/mod/mpm_common.html#maxrequestsperchild MaxRequestsPerChild 10000 </IfModule> # # KeepAlive: Whether or not to allow persistent connections (more than # one request per connection). Set to "Off" to deactivate. KeepAlive On # # MaxKeepAliveRequests: The maximum number of requests to allow # during a persistent connection. Set to 0 to allow an unlimited amount. # We recommend you leave this number high, for maximum performance. MaxKeepAliveRequests 300 # # KeepAliveTimeout: Number of seconds to wait for the next request from the # same client on the same connection. KeepAliveTimeout 45 Ehrlich gesagt ist die ganze Config Sache mittlerweile so verzweigt, dass ich da nicht mehr so recht durchsteige... :-( Zitieren
Slayer8 Geschrieben 17. November 2007 Autor Geschrieben 17. November 2007 Die Error und Access Logs zeigen nichts ungewöhnliches an, das einzige ungewöhnliche war an dem Tag die Anzahl der folgenden Meldung: 127.0.0.1 - - [01/Nov/2007:13:41:36 +0100] "GET / HTTP/1.0" 200 3523 "-" "Apache (internal dummy connection)" und dass der Server offenbar "gesannt" wurde: [Thu Nov 01 09:15:42 2007] [error] [client 84.19.178.143] File does not exist: /srv/www/vhosts/default/htdocs/phpMyAdmin-2.6.3-rc1 [Thu Nov 01 09:15:42 2007] [error] [client 84.19.178.143] File does not exist: /srv/www/vhosts/default/htdocs/phpMyAdmin-2.6.3 [Thu Nov 01 09:15:42 2007] [error] [client 84.19.178.143] File does not exist: /srv/www/vhosts/default/htdocs/phpMyAdmin-2.6.3-pl1 [Thu Nov 01 09:15:42 2007] [error] [client 84.19.178.143] File does not exist: /srv/www/vhosts/default/htdocs/phpMyAdmin-2.6.4-rc1 [Thu Nov 01 09:15:42 2007] [error] [client 84.19.178.143] File does not exist: /srv/www/vhosts/default/htdocs/phpMyAdmin-2.6.4-pl1 [Thu Nov 01 09:15:42 2007] [error] [client 84.19.178.143] File does not exist: /srv/www/vhosts/default/htdocs/phpMyAdmin-2.6.4-pl2 Das setzt sich so fort, über einige Verzeichnisse und Möglichkeiten... Zitieren
lupo49 Geschrieben 18. November 2007 Geschrieben 18. November 2007 Die Error und Access Logs zeigen nichts ungewöhnliches an, das einzige ungewöhnliche war an dem Tag die Anzahl der folgenden Meldung: 127.0.0.1 - - [01/Nov/2007:13:41:36 +0100] "GET / HTTP/1.0" 200 3523 "-" "Apache (internal dummy connection)" NickBlog - internal dummy connection Du koenntest mit diesem Tool testen, ob es ueberhaupt an den externen Anfragen liegt, die die Load so hochtreiben. ab - Apache HTTP server benchmarking tool - Apache HTTP Server Zitieren
Slayer8 Geschrieben 22. November 2007 Autor Geschrieben 22. November 2007 Jetzt geht der Server erst ab 35 Usern in die Knie. Normal klingt das immer noch nicht. Selbst mein altes Hosting Paket hielt bis zu 50-55 User aus.... Anbei ein Auszug aus ab2 Zitieren
Empfohlene Beiträge
Dein Kommentar
Du kannst jetzt schreiben und Dich später registrieren. Wenn Du ein Konto hast, melde Dich jetzt an, um unter Deinem Benutzernamen zu schreiben.