Lighttpd - Performance Probleme

SebastianHe

New Member
Hallo,

ich nutze eigene Hardware in einem Rechenzentrum (AMD 4050+, 4 GB Ram).
Die einzelnen Server laufen unter einer XEN umgebung, wobei der Webserver (Lighttpd - 2 GB Ram - 2 CPUs) Probleme bereitet.

Die Auslieferung einzelner Seiten braucht ewig lange, teilweise bricht der Server ab.

PHP wird von xcache unterstützt.


Ausgabe von top:
Code:
top - 20:51:30 up 36 min,  2 users,  load average: 10.50, 11.06, 8.44
Tasks: 222 total,  12 running, 210 sleeping,   0 stopped,   0 zombie
Cpu(s):  2.1%us,  1.1%sy,  0.0%ni, 86.9%id,  7.5%wa,  0.0%hi,  0.3%si,  2.1%st
Mem:   2058544k total,  1228184k used,   830360k free,     4196k buffers
Swap:   867468k total,     9608k used,   857860k free,    92120k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                                                                              
 3105 lighttpd  20   0  238m  21m  13m S    1  1.1   0:05.42 php5                                                                                                                  
 3165 lighttpd  20   0  237m  20m  12m R    1  1.0   0:05.08 php5                                                                                                                  
 3022 lighttpd  20   0  236m  19m  12m S    1  1.0   0:05.78 php5                                                                                                                  
 3046 lighttpd  20   0  239m  24m  15m S    1  1.2   0:07.32 php5                                                                                                                  
 3049 lighttpd  20   0  236m  20m  13m R    1  1.0   0:04.14 php5                                                                                                                  
 3056 lighttpd  20   0  237m  20m  12m S    1  1.0   0:05.58 php5                                                                                                                  
 3062 lighttpd  20   0  237m  21m  13m R    1  1.1   0:06.78 php5                                                                                                                  
 3072 lighttpd  20   0  237m  20m  12m S    1  1.0   0:05.18 php5                                                                                                                  
 3092 lighttpd  20   0  236m  19m  12m R    1  1.0   0:03.88 php5                                                                                                                  
 3097 lighttpd  20   0  236m  19m  12m R    1  1.0   0:04.96 php5                                                                                                                  
 3109 lighttpd  20   0  236m  20m  13m R    1  1.0   0:02.32 php5                                                                                                                  
 3138 lighttpd  20   0  236m  19m  12m S    1  1.0   0:06.14 php5                                                                                                                  
 3159 lighttpd  20   0  236m  20m  13m S    1  1.0   0:05.02 php5                                                                                                                  
 3166 lighttpd  20   0  236m  19m  12m S    1  1.0   0:04.52 php5                                                                                                                  
 3167 lighttpd  20   0  236m  19m  12m S    1  1.0   0:02.08 php5                                                                                                                  
 3264 root      20   0 16932 1372  948 R    1  0.1   0:00.04 top                                                                                                                   
    1 root      20   0   864   76   40 S    0  0.0   0:00.14 init                                                                                                                  
    2 root      15  -5     0    0    0 S    0  0.0   0:00.00 kthreadd                                                                                                              
    3 root      RT  -5     0    0    0 S    0  0.0   0:00.00 migration/0                                                                                                           
    4 root      15  -5     0    0    0 S    0  0.0   0:00.28 ksoftirqd/0                                                                                                           
    5 root      15  -5     0    0    0 S    0  0.0   0:00.06 events/0


Lighttpd Config File:
Code:
#######################################################################
##
## /etc/lighttpd/lighttpd.conf
##
## check /etc/lighttpd/conf.d/*.conf for the configuration of modules.
##
#######################################################################

var.log_root    = "/var/log/lighttpd"
var.server_root = "/srv/www/vhosts/feuerwache.net"
var.state_dir   = "/var/run"
var.home_dir    = "/var/lib/lighttpd"
var.conf_dir    = "/etc/lighttpd"

var.vhosts_dir  = server_root + "/vhosts"
var.cache_dir   = "/var/cache/lighttpd"
var.socket_dir  = home_dir + "/sockets"

## Load the modules.
include "modules.conf"

server.port = 80
server.use-ipv6 = "enable"  

server.username  = "lighttpd"
server.groupname = "lighttpd"

server.document-root = server_root + "/web"

server.pid-file = state_dir + "/lighttpd.pid"

server.errorlog             = log_root + "/error.log"
include "conf.d/access_log.conf"
include "conf.d/debug.conf"

server.event-handler = "linux-sysepoll"
server.network-backend = "linux-sendfile"

server.max-fds = 2048
server.stat-cache-engine = "simple"
server.max-connections = 628

server.max-keep-alive-idle = 5
server.max-keep-alive-requests = 5
server.max-read-idle = 30
server.max-write-idle = 60
server.max-worker = 8

index-file.names += (
  "index.xhtml", "index.html", "index.htm", "default.htm", "index.php"
)
 
url.access-deny             = ( "~", ".inc" )

$HTTP["url"] =~ "\.pdf$" {
  server.range-requests = "disable"
}
 
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi", ".scgi" )

include "conf.d/mime.conf"
include "conf.d/dirlisting.conf"

server.follow-symlink = "enable"

server.upload-dirs = ( "/var/tmp" )


    alias.url            = (
        "/sf"           => "/usr/share/php5/PEAR/data/symfony/web/sf"
    )

    url.rewrite-once = (
        "^/(.*\..+(?!html))$" => "$0",
        "^/(.*)\.(.*)"        => "$0",
        "^/([^.]+)$"          => "/index.php/$1",
        "^/$"        => "/index.php"
    )



Fastcgi Config File:
Code:
server.modules += ( "mod_fastcgi" )

fastcgi.server = ( ".php" =>
                   ( "php-local" =>
                     (
                       "socket" => socket_dir + "/php-fastcgi-1.socket",
                       "bin-path" => server_root + "/cgi-bin/php5",
                       "max-procs" => 3,
                       "bin-environment" => (
                                "PHP_FCGI_CHILDREN" => "50",
                                "PHP_FCGI_MAX_REQUESTS" => "500",
                        ),
                       "broken-scriptfilename" => "enable",
                    )
                   ),
              )


Wäre um Tipps zur Performance-Verbesserung dankbar.

Gruß
Sebastian
 
Back
Top