Die Performance, mein größtes Problem

Irgendwelche Probleme mit XAMPP für Linux? Dann ist hier genau der richtige Ort um nachzufragen.

Die Performance, mein größtes Problem

Postby aveal » 23. June 2006 17:01

Hallo Jungs und Mädels, ich komme hier einfach nicht mehr weiter mit der Performance.

50 User gleichzeitig sind bei mir schon ein Problem....

Hier mal ein paar Informationen:
Sys: Suse 9.1
CPU: 2000MHz
Ram: 2000MB
Anbindung ans Inet: 100Mbit



HTTPD.CONF
Code: Select all
ServerRoot "/opt/lampp"
Listen 80

LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authn_dbm_module modules/mod_authn_dbm.so
LoadModule authn_anon_module modules/mod_authn_anon.so
LoadModule authn_dbd_module modules/mod_authn_dbd.so
LoadModule authn_default_module modules/mod_authn_default.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule authz_dbm_module modules/mod_authz_dbm.so
LoadModule authz_owner_module modules/mod_authz_owner.so
LoadModule authz_default_module modules/mod_authz_default.so
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule include_module modules/mod_include.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule env_module modules/mod_env.so
LoadModule expires_module modules/mod_expires.so
LoadModule headers_module modules/mod_headers.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule mime_module modules/mod_mime.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule dir_module modules/mod_dir.so
LoadModule actions_module modules/mod_actions.so
LoadModule alias_module modules/mod_alias.so
LoadModule rewrite_module modules/mod_rewrite.so
..
... Servername und Serveradmin etc.
...
<Directory />
    Options FollowSymLinks
    AllowOverride None
    #XAMPP
    #Order deny,allow
    #Deny from all
</Directory>

<Directory "/home/www">
Options Indexes ExecCGI Includes FollowSymLinks
AllowOverride None
AllowOverride All
Order allow,deny
Allow from all
</Directory>

<IfModule dir_module>
    #DirectoryIndex index.html
    # XAMPP
    DirectoryIndex index.html index.html.var index.php index.php3 index.php4
</IfModule>

<FilesMatch "^\.ht">
    Order allow,deny
    Deny from all
</FilesMatch>

ErrorLog logs/error_log
LogLevel warn

Include etc/extra/httpd-mpm.conf
Include etc/extra/httpd-autoindex.conf
Include etc/extra/httpd-vhosts.conf
Include etc/extra/httpd-default.conf

<IfModule ssl_module>
Include etc/extra/httpd-ssl.conf
</IfModule>

<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>

Include etc/extra/httpd-xampp.conf


HTTPD-DEFAULT.CONF
Code: Select all
Timeout 120
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 4
UseCanonicalName Off
AccessFileName .htaccess
ServerTokens Full
ServerSignature On
HostnameLookups Off


HTTPD-MPM.CONF
Code: Select all
<IfModule !mpm_netware_module>
    PidFile logs/httpd.pid
</IfModule>

<IfModule !mpm_winnt_module>
<IfModule !mpm_netware_module>
LockFile logs/accept.lock
</IfModule>
</IfModule>

<IfModule mpm_prefork_module>
    StartServers                5
    MinSpareServers             5
    MaxSpareServers             10
    MaxClients                  256
    MaxRequestsPerChild         500
</IfModule>

<IfModule mpm_worker_module>
    StartServers        5       #2
    MaxClients         256      #150    #1800
    MinSpareThreads      25     #30
    MaxSpareThreads      75     #60
    ThreadsPerChild      25     #60
    MaxRequestsPerChild   500   #0
</IfModule>


HTTPD-XAMPP.CONF
Code: Select all
<IfDefine PHP4>
LoadModule php4_module        modules/libphp4.so
</IfDefine>
<IfDefine PHP5>
LoadModule php5_module        modules/libphp5.so
</IfDefine>
# since LAMPP 0.9.8:
LoadModule perl_module        modules/mod_perl.so

Alias /phpmyadmin "/opt/lampp/phpmyadmin"
Alias /phpsqliteadmin "/opt/lampp/phpsqliteadmin"

# since XAMPP 1.4.3
<Directory "/opt/lampp/phpmyadmin">
    AllowOverride AuthConfig Limit
    Order allow,deny
    Allow from all
</Directory>

<Directory "/opt/lampp/phpsqliteadmin">
    AllowOverride AuthConfig Limit
    Order allow,deny
    Allow from all
</Directory>

# since LAMPP 1.0RC1
AddType application/x-httpd-php .php .php3 .php4

XBitHack on

# since 0.9.8 we've mod_perl
PerlModule Bundle::Apache2

# demo for mod_perl responsehandler
#PerlModule Apache::CurrentTime
#<Location /time>
#      SetHandler modperl
#      PerlResponseHandler Apache::CurrentTime
#</Location>

# AcceptMutex sysvsem is default but on some systems we need this
# thanks to jeff ort for this hint
#AcceptMutex flock
#LockFile /opt/lampp/logs/accept.lock



Apachebenchmark sagt, bei 50 gleichzeitigen Usern und einer Gesamtsumme von 5000 Anfragen, benötigt meine Webseite (www.onlinewars.eu) 22 Sekunden. Dabei verursacht der Benchmark, ausgeführt von einem anderen Server, eine CPU-Last von 96% auf dem Webserver. Der Arbeitsspeicher hingegen wird kaum/garnicht angefasst.

Eventuell noch Interessant wäre die my.cnf
Code: Select all
[client]
#password       = your_password
port            = 3306
socket          = /opt/lampp/var/mysql/mysql.sock

# Here follows entries for some specific programs

# The MySQL server
[mysqld]
# commented out by lampp security
#port           = 3306
set-variable = max_connections=2500
port = 0
socket          = /opt/lampp/var/mysql/mysql.sock
skip-locking
key_buffer = 200M
max_allowed_packet = 10M #1M
table_cache = 128M #512
sort_buffer_size = 100M #50M
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 128M #64M
query_cache_limit = 20M #1M
query_cache_size = 100M #32M
query_cache_type = 1
server-id = 1

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash

[isamchk]
key_buffer = 128M
sort_buffer_size = 128M
read_buffer = 8M #2M
write_buffer = 8M #2M

[myisamchk]
key_buffer = 128M
sort_buffer_size = 128M
read_buffer = 2M
write_buffer = 2M

[mysqlhotcopy]
interactive-timeout



Hat jemand eine Idee was ich sonst noch optimieren könnte damit der Server schneller wird? Oder anderst gefragt: Was ist alles falsch? :)

Für eure Hilfe bedanke ich mich schonmal vielmals!
aveal
 
Posts: 2
Joined: 23. June 2006 16:33

Postby LazyOne » 24. June 2006 22:01

mod deflate, mod cache z.b., dann htaccess sachen direkt in die vhosts eintragen und nich immer nach htaccess dateien suchen lassen.. log deaktivieren z.b., eaccelerator mh..mehr fällt mir grad nich ein spontan, sorry.
LazyOne
 
Posts: 141
Joined: 12. May 2005 12:12
Location: München

Postby aveal » 25. June 2006 21:36

er verkraftet jetzt zwar mehr anfragen (ohne fehler) aber bei gleicher menge ist er nicht schneller geworden (sekunden)...eventuell doch noch ein kleiner gedankenblitz?
aveal
 
Posts: 2
Joined: 23. June 2006 16:33

Postby LazyOne » 25. June 2006 22:17

<IfModule mpm_prefork_module>
ServerLimit 300
MinSpareServers 20
MaxSpareServers 80
StartServers 32
MaxClients 256
MaxRequestsPerChild 10000
</IfModule>


probiers mal.. aber keine garantie, das es dan besser klappt.
LazyOne
 
Posts: 141
Joined: 12. May 2005 12:12
Location: München

Postby dyingPhoenix » 27. June 2006 07:17

Hi,
weißt du was bei zu Performance Verlusten führt? Ich hab auch ein übles Performance Problem. Der mysqld nutzt 40-60% des Prozessors. Ich komm einfach nicht hinter voran das liegt :-(
dyingPhoenix
 
Posts: 19
Joined: 21. December 2004 14:43

Postby maxhb » 18. January 2007 16:47

dyingPhoenix wrote:Hi,
weißt du was bei zu Performance Verlusten führt? Ich hab auch ein übles Performance Problem. Der mysqld nutzt 40-60% des Prozessors.

Ursachen kann es viele geben:
    - Der Query Cache könnte schlecht konfiguriert sein, in der oben gezeigten Config fällt mir da insbesondere "query_cache_limit = 20M" auf. So große Anfrageergebnisse cacht man eigentlich besser nicht. 1M ist normalerweise ein vernünftiger Standardwert.

    - Evtl. ist die DB-Anwendung auf Deinem Server einfach nicht gut optimiert worden. Oftmals wird nicht mit einem Index gearbeitet oder der Index ist schlecht gewählt

    - Was ergibt die SQl-Anfrage "show status like '%cache%'", wenn Du sie z.B. per phpMyAdmin ausführst? Insbesondere der Wert für "Qcache_lowmem_prunes" sollte klein sein, am besten 0

    - Was läuft denn bei Dir auf dem Server für eine Applikation? Forum? Redaktionssystem?

Darüber hinaus gibt es noch zig Faktoren, die bei der Performanz mit reinspielen. Genaueres kann man vermutlich erst sagen, wenn man eine gründliche Diagnose durchführt.

CU
maxhb
User avatar
maxhb
 
Posts: 17
Joined: 18. January 2007 15:08
Location: Bremen


Return to XAMPP für Linux

Who is online

Users browsing this forum: No registered users and 29 guests