Hi Leute,
ich hab ein dummes Problem. Mein Server läuft als Downloadserver für OTR. Das bedeutet, dass viele große Dateien und ziemlich viele Zugriff auf diesem laufen. Auf dem Server wird zweimal lighttpd für die Downloadausgabe benutzt sowie ein Apache für PHP.
Serverdaten:
3Ghz P4
1024MB DDR RAM
750GB SATA HDD
Debian
Problem: Der Server hat einen ziemlich hohen load, dass aber nicht von der CPU Last herkommt. Die CPU Last liegt bei 5%, aber der load bei 30. An was könnte das liegen?
Einer von euch mir helfen?
Danke!
Grüße strex
Serverlast woher
-
- Project Manager
- Posts: 11185
- Joined: 2003-02-27 01:00
- Location: Hamburg
Re: Serverlast woher
Ersetze Apache+mod_php durch lighttpd+php-fcgi, das wird die Load erheblich senken. Sollte auch noch ein DB-Server auf der Kiste laufen, dann diesen auslagern...
-
- Posts: 8
- Joined: 2004-02-27 23:25
Re: Serverlast woher
Hatte ich schon, Ergenis noch schlechter...Sonst läuft nichts auf der Kiste.Joe User wrote:Ersetze Apache+mod_php durch lighttpd+php-fcgi, das wird die Load erheblich senken. Sollte auch noch ein DB-Server auf der Kiste laufen, dann diesen auslagern...
Grüße strex
-
- Posts: 2138
- Joined: 2002-12-15 00:10
- Location: Bergheim
Re: Serverlast woher
Ich weiß nicht was OTR sein soll, aber idR ist ein Download per FTP deutlich weniger Belastung für den Rechner. Insbesondere wenn einen gut optimierten daemon wie pure-ftpd verwendet. Das Problem ist wahrscheinlich die IO Last.
-
- Posts: 8
- Joined: 2004-02-27 23:25
Re: Serverlast woher
Hmm komisch an die IO Last habe ich auch schon gedacht. Aber so ein Rechner sollte doch locker 100Mbit/s ausgeben können. Lighttpd ist doch dafür gedacht...liegt das zufällig an den connections? Die sind pro User auf 12 Stück geschränkt.
Weitere Ideen?
Grüße strex
Weitere Ideen?
Grüße strex
-
- Posts: 8
- Joined: 2004-02-27 23:25
Re: Serverlast woher
Was soll das heißen, bei 100Mbit/s wären das knapp 15MB/s, das wäre doch kein Problem. Da verstehe ich den load von 30 nicht.
Kann das etwa an lighttpd liegen die zur Ausgabe des Downloadtraffics benutzen werden?
Grüße strex
Kann das etwa an lighttpd liegen die zur Ausgabe des Downloadtraffics benutzen werden?
Grüße strex
-
- Posts: 2138
- Joined: 2002-12-15 00:10
- Location: Bergheim
Re: Serverlast woher
Klar ist die sequentielle Leseleistung der Festplatten ausreichend, aber wenn sehr viele User verschiedene Dateien laden, nützt das nicht viel. Da hilft dann nur mehr Ram und mehr Platten.
Last edited by oxygen on 2007-07-22 20:01, edited 1 time in total.
-
- Project Manager
- Posts: 11185
- Joined: 2003-02-27 01:00
- Location: Hamburg
Re: Serverlast woher
Show your lighttpd.conf please.
-
- Posts: 8
- Joined: 2004-02-27 23:25
Re: Serverlast woher
Das wirre ist aber, dass das System vorher auf einem VIA C7 2Ghz 1024MB Ram wunderbar lief. Nur jetzt auf diesem Rechner nicht. Liegt das vielleicht an einem Bug im lighttpd? Benutzte Version 1.4.15.
Hier meine lighttpd conf:
# Debian lighttpd configuration file
#
############ Options you really have to take care of ####################
## modules to load
# mod_access, mod_accesslog and mod_alias are loaded by default
# all other module should only be loaded if neccesary
# - saves some time
# - saves memory
server.modules = (
# "mod_access",
"mod_alias",
# "mod_accesslog",
# "mod_rewrite",
# "mod_redirect",
"mod_status",
# "mod_evhost",
# "mod_compress",
# "mod_usertrack",
# "mod_rrdtool",
# "mod_webdav",
# "mod_expire",
# "mod_flv_streaming",
# "mod_evasive",
"mod_evasive"
)
## a static document-root, for virtual-hosting take look at the
## server.virtual-* options
server.document-root = "/home/otr/web/symlinks/"
evasive.max-conns-per-ip = 12
server.event-handler = "linux-sysepoll"
server.network-backend = "linux-sendfile"
server.max-fds = 15000
## where to send error-messages to
server.errorlog = "/var/log/lighttpd/error.log"
## files to check for if .../ is requested
index-file.names = ( "index.php", "index.html",
"index.htm", "default.htm" )
## Use the "Content-Type" extended attribute to obtain mime type if possible
# mimetype.use-xattr = "enable"
#### accesslog module
#accesslog.filename = "/var/log/lighttpd/access.log"
## deny access the file-extensions
#
# ~ is for backupfiles from vi, emacs, joe, ...
# .inc is often used for code includes which should in general not be part
# of the document-root
url.access-deny = ( "~", ".inc" )
######### Options that are good to be but not neccesary to be changed #######
## bind to port (default: 80)
server.port = 2000
## bind to localhost only (default: all interfaces)
## server.bind = "localhost"
## error-handler for status 404
#server.error-handler-404 = "/error-handler.html"
#server.error-handler-404 = "/error-handler.php"
## to help the rc.scripts
server.pid-file = "/var/run/lighttpd.pid"
##
## Format: <errorfile-prefix><status>.html
## -> ..../status-404.html for 'File not found'
#server.errorfile-prefix = "/var/www/"
## virtual directory listings
dir-listing.encoding = "utf-8"
server.dir-listing = "enable"
## send unhandled HTTP-header headers to error-log
#debug.dump-unknown-headers = "enable"
### only root can use these options
#
# chroot() to directory (default: no chroot() )
#server.chroot = "/"
## change uid to <uid> (default: don't care)
server.username = "www-data"
## change uid to <uid> (default: don't care)
server.groupname = "www-data"
#### compress module
#compress.cache-dir = "/var/tmp/lighttpd/cache/compress/"
#compress.filetype = ("text/plain", "text/html")
#### status module
status.status-url = "/server-status"
status.config-url = "/server-config"
#### url handling modules (rewrite, redirect, access)
# url.rewrite = ( "^/$" => "/server-status" )
# url.redirect = ( "^/wishlist/(.+)" => "http://www.123.org/$1" )
#
# define a pattern for the host url finding
# %% => % sign
# %0 => domain name + tld
# %1 => tld
# %2 => domain name without tld
# %3 => subdomain 1 name
# %4 => subdomain 2 name
#
# evhost.path-pattern = "/home/storage/dev/www/%3/htdocs/"
#### expire module
# expire.url = ( "/buggy/" => "access 2 hours", "/asdhas/" => "access plus 1 seconds 2 minutes")
#### rrdtool
# rrdtool.binary = "/usr/bin/rrdtool"
# rrdtool.db-name = "/var/www/lighttpd.rrd"
#### handle Debian Policy Manual, Section 11.5. urls
#### and by default allow them only from localhost
$HTTP["remoteip"] =~ "127.0.0.1" {
alias.url += (
"/doc/" => "/usr/share/doc/",
"/images/" => "/usr/share/images/"
)
$HTTP["url"] =~ "^/doc/|^/images/" {
dir-listing.activate = "enable"
}
}
#### variable usage:
## variable name without "." is auto prefixed by "var." and becomes "var.bar"
#bar = 1
#var.mystring = "foo"
## integer add
#bar += 1
## string concat, with integer cast as string, result: "www.foo1.com"
#server.name = "www." + mystring + var.bar + ".com"
## array merge
#index-file.names = (foo + ".php") + index-file.names
#index-file.names += (foo + ".php")
#### external configuration files
## mimetype mapping
include_shell "/usr/share/lighttpd/create-mime.assign.pl"
## load enabled configuration files,
## read /etc/lighttpd/conf-available/README first
include_shell "/usr/share/lighttpd/include-conf-enabled.pl"
Hier meine lighttpd conf:
# Debian lighttpd configuration file
#
############ Options you really have to take care of ####################
## modules to load
# mod_access, mod_accesslog and mod_alias are loaded by default
# all other module should only be loaded if neccesary
# - saves some time
# - saves memory
server.modules = (
# "mod_access",
"mod_alias",
# "mod_accesslog",
# "mod_rewrite",
# "mod_redirect",
"mod_status",
# "mod_evhost",
# "mod_compress",
# "mod_usertrack",
# "mod_rrdtool",
# "mod_webdav",
# "mod_expire",
# "mod_flv_streaming",
# "mod_evasive",
"mod_evasive"
)
## a static document-root, for virtual-hosting take look at the
## server.virtual-* options
server.document-root = "/home/otr/web/symlinks/"
evasive.max-conns-per-ip = 12
server.event-handler = "linux-sysepoll"
server.network-backend = "linux-sendfile"
server.max-fds = 15000
## where to send error-messages to
server.errorlog = "/var/log/lighttpd/error.log"
## files to check for if .../ is requested
index-file.names = ( "index.php", "index.html",
"index.htm", "default.htm" )
## Use the "Content-Type" extended attribute to obtain mime type if possible
# mimetype.use-xattr = "enable"
#### accesslog module
#accesslog.filename = "/var/log/lighttpd/access.log"
## deny access the file-extensions
#
# ~ is for backupfiles from vi, emacs, joe, ...
# .inc is often used for code includes which should in general not be part
# of the document-root
url.access-deny = ( "~", ".inc" )
######### Options that are good to be but not neccesary to be changed #######
## bind to port (default: 80)
server.port = 2000
## bind to localhost only (default: all interfaces)
## server.bind = "localhost"
## error-handler for status 404
#server.error-handler-404 = "/error-handler.html"
#server.error-handler-404 = "/error-handler.php"
## to help the rc.scripts
server.pid-file = "/var/run/lighttpd.pid"
##
## Format: <errorfile-prefix><status>.html
## -> ..../status-404.html for 'File not found'
#server.errorfile-prefix = "/var/www/"
## virtual directory listings
dir-listing.encoding = "utf-8"
server.dir-listing = "enable"
## send unhandled HTTP-header headers to error-log
#debug.dump-unknown-headers = "enable"
### only root can use these options
#
# chroot() to directory (default: no chroot() )
#server.chroot = "/"
## change uid to <uid> (default: don't care)
server.username = "www-data"
## change uid to <uid> (default: don't care)
server.groupname = "www-data"
#### compress module
#compress.cache-dir = "/var/tmp/lighttpd/cache/compress/"
#compress.filetype = ("text/plain", "text/html")
#### status module
status.status-url = "/server-status"
status.config-url = "/server-config"
#### url handling modules (rewrite, redirect, access)
# url.rewrite = ( "^/$" => "/server-status" )
# url.redirect = ( "^/wishlist/(.+)" => "http://www.123.org/$1" )
#
# define a pattern for the host url finding
# %% => % sign
# %0 => domain name + tld
# %1 => tld
# %2 => domain name without tld
# %3 => subdomain 1 name
# %4 => subdomain 2 name
#
# evhost.path-pattern = "/home/storage/dev/www/%3/htdocs/"
#### expire module
# expire.url = ( "/buggy/" => "access 2 hours", "/asdhas/" => "access plus 1 seconds 2 minutes")
#### rrdtool
# rrdtool.binary = "/usr/bin/rrdtool"
# rrdtool.db-name = "/var/www/lighttpd.rrd"
#### handle Debian Policy Manual, Section 11.5. urls
#### and by default allow them only from localhost
$HTTP["remoteip"] =~ "127.0.0.1" {
alias.url += (
"/doc/" => "/usr/share/doc/",
"/images/" => "/usr/share/images/"
)
$HTTP["url"] =~ "^/doc/|^/images/" {
dir-listing.activate = "enable"
}
}
#### variable usage:
## variable name without "." is auto prefixed by "var." and becomes "var.bar"
#bar = 1
#var.mystring = "foo"
## integer add
#bar += 1
## string concat, with integer cast as string, result: "www.foo1.com"
#server.name = "www." + mystring + var.bar + ".com"
## array merge
#index-file.names = (foo + ".php") + index-file.names
#index-file.names += (foo + ".php")
#### external configuration files
## mimetype mapping
include_shell "/usr/share/lighttpd/create-mime.assign.pl"
## load enabled configuration files,
## read /etc/lighttpd/conf-available/README first
include_shell "/usr/share/lighttpd/include-conf-enabled.pl"
-
- Project Manager
- Posts: 11185
- Joined: 2003-02-27 01:00
- Location: Hamburg
Re: Serverlast woher
Sichere Deine lighttpd.conf und teste mal folgende:
BTW: 15000 fd's sind etwas viel und Perl per include_shell zum Setzen statischer Konfigurationsoptionen zu misbrauchen ist absoluter Overkill und zudem performancefressend.
<rant>
Ich habe bisher noch keine Debian-Standard-Konfiguration gesehen, die für den produktiven Betrieb eines Servers OOTB geeignet wäre.
</rant>
Code: Select all
cat > /etc/lighttpd/lighttpd.conf << "EOF"
server.username = "www-data"
server.groupname = "www-data"
server.stat-cache-engine = "fam"
server.event-handler = "linux-sysepoll"
server.network-backend = "linux-sendfile"
server.pid-file = "/var/run/lighttpd.pid"
server.errorlog = "/var/log/lighttpd/error_log"
server.document-root = "/home/otr/web/symlinks"
server.name = "www.domain.tld"
server.max-fds = 2048
server.port = 2000
server.modules = (
"mod_alias",
"mod_access",
"mod_accesslog",
"mod_evasive",
)
server.indexfiles = (
"index.xhtml",
"index.html",
"index.htm",
)
mimetype.assign = (
".pdf" => "application/pdf",
".sig" => "application/pgp-signature",
".spl" => "application/futuresplash",
".class" => "application/octet-stream",
".ps" => "application/postscript",
".torrent" => "application/x-bittorrent",
".dvi" => "application/x-dvi",
".pac" => "application/x-ns-proxy-autoconfig",
".swf" => "application/x-shockwave-flash",
".tgz" => "application/x-tgz",
".mp3" => "audio/mpeg",
".m3u" => "audio/x-mpegurl",
".wma" => "audio/x-ms-wma",
".wax" => "audio/x-ms-wax",
".ogg" => "application/ogg",
".wav" => "audio/x-wav",
".xbm" => "image/x-xbitmap",
".xpm" => "image/x-xpixmap",
".xwd" => "image/x-xwindowdump",
".asc" => "text/plain",
".c" => "text/plain",
".h" => "text/plain",
".cc" => "text/plain",
".cpp" => "text/plain",
".hh" => "text/plain",
".hpp" => "text/plain",
".conf" => "text/plain",
".log" => "text/plain",
".text" => "text/plain",
".txt" => "text/plain",
".diff" => "text/plain",
".patch" => "text/plain",
".ebuild" => "text/plain",
".eclass" => "text/plain",
".rtf" => "application/rtf",
".bmp" => "image/bmp",
".tif" => "image/tiff",
".tiff" => "image/tiff",
".ico" => "image/x-icon",
".mpeg" => "video/mpeg",
".mpg" => "video/mpeg",
".mov" => "video/quicktime",
".qt" => "video/quicktime",
".avi" => "video/x-msvideo",
".asf" => "video/x-ms-asf",
".asx" => "video/x-ms-asf",
".wmv" => "video/x-ms-wmv",
".tbz" => "application/x-bzip-compressed-tar",
".tar.bz2" => "application/x-bzip-compressed-tar",
".tar.gz" => "application/x-tgz",
".bz2" => "application/x-bzip",
".gz" => "application/x-gzip",
".tar" => "application/x-tar",
".zip" => "application/zip",
".jpeg" => "image/jpeg",
".jpg" => "image/jpeg",
".png" => "image/png",
".gif" => "image/gif",
".xhtml" => "text/html",
".html" => "text/html",
".htm" => "text/html",
".dtd" => "text/xml",
".xml" => "text/xml",
".css" => "text/css",
".js" => "text/javascript",
"" => "text/plain",
)
static-file.exclude-extensions = (
".pl",
".cgi",
".fcgi",
)
dir-listing.activate = "disable"
dir-listing.hide-dotfiles = "enable"
dir-listing.encoding = "utf-8"
dir-listing.exclude = (
"^.",
"~$",
"favicon.ico",
"robots.txt",
)
url.access-deny = (
"~",
".ini",
".inc",
".cfg",
".tpl",
".bak",
".dist",
".orig",
".htaccess",
".htpasswd",
".example",
".sample",
".lang",
)
evasive.max-conns-per-ip = 12
accesslog.filename = "/var/log/lighttpd/access_log"
accesslog.format = "%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-Agent}i""
$HTTP["url"] =~ ".pdf$" {
server.range-requests = "disable"
}
EOF
<rant>
Ich habe bisher noch keine Debian-Standard-Konfiguration gesehen, die für den produktiven Betrieb eines Servers OOTB geeignet wäre.
</rant>
-
- Posts: 8
- Joined: 2004-02-27 23:25
Re: Serverlast woher
Hmm die Config wurde nicht viel geändert. Hab jetzt aber wohl doch etwas gefunden wo die Last sehr nach unten geht: http://blog.lighttpd.net/articles/2005/ ... -downloads
Das wird das Problem beschrieben. Werde deine Einstellungen aber auch noch testen.
Grüße strex
Das wird das Problem beschrieben. Werde deine Einstellungen aber auch noch testen.
Grüße strex