Apache bei Bildauslieferung langsam

Apache, Lighttpd, nginx, Cherokee
Post Reply
micro
Posts: 5
Joined: 2003-08-25 23:32
 

Apache bei Bildauslieferung langsam

Post by micro »

Hallo,

wir haben auf einem Server einen großen Shop am laufen.
Pures HTML + JavaScript.
Pro Seite werden je Aufruf ca 70 Bilder a 5kb ausgeliefert (soll und muß so sein)
Traffic inzwischen 65 GB.
Der Apache läuft max mit 50 Prozessen.

Leider haben wir inzwischen den Effekt, dass die Bilder immer langsam ausgeliefert werden.

Gibt es Konfig-Möglichkeiten dies mit dem Apache zu beschleunigen?
jtb
Posts: 599
Joined: 2002-08-18 16:41
Location: Darmstadt
Contact:
 

Re: Apache bei Bildauslieferung langsam

Post by jtb »

poste mal einen Link zu deiner Config..
dodolin
Posts: 3840
Joined: 2003-01-21 01:59
Location: Sinsheim/Karlsruhe
Contact:
 

Re: Apache bei Bildauslieferung langsam

Post by dodolin »

oxygen
Posts: 2138
Joined: 2002-12-15 00:10
Location: Bergheim
 

Re: Apache bei Bildauslieferung langsam

Post by oxygen »

Vielleicht mod_gzip/deflate nicht für Bilder deaktiviert? Das verzögert die Auslieferung und bringt null.
micro
Posts: 5
Joined: 2003-08-25 23:32
 

Re: Apache bei Bildauslieferung langsam

Post by micro »

Jtb wrote:poste mal einen Link zu deiner Config..
Hier ist die Config: http://status.node11.securewebserver.de/httpd.conf
jtb
Posts: 599
Joined: 2002-08-18 16:41
Location: Darmstadt
Contact:
 

Re: Apache bei Bildauslieferung langsam

Post by jtb »

ich hoffe du hast mit dem "großen Shop" übertrieben..

Die Config ist nicht gerade besonders. Viele Einstellungen sind nicht optimal oder einfach völlig falsch (MaxRequestsPerChild)..
micro
Posts: 5
Joined: 2003-08-25 23:32
 

Re: Apache bei Bildauslieferung langsam

Post by micro »

Jtb wrote:Die Config ist nicht gerade besonders. Viele Einstellungen sind nicht optimal oder einfach völlig falsch (MaxRequestsPerChild)..
Hast Du konkretere Infos oder kennst Du ne Website wo es mehr Infos gibt? (apache.org mal ausgenommen)

MaxRequestsPerChild habe ich mal auf 0 gesetzt.
Wirkung ist aber gleich Null.
User avatar
Joe User
Project Manager
Project Manager
Posts: 11191
Joined: 2003-02-27 01:00
Location: Hamburg
Contact:
 

Re: Apache bei Bildauslieferung langsam

Post by Joe User »

micro wrote:Hast Du konkretere Infos oder kennst Du ne Website wo es mehr Infos gibt? (apache.org mal ausgenommen)
http://127.0.0.1/manual/
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
micro
Posts: 5
Joined: 2003-08-25 23:32
 

Re: Apache bei Bildauslieferung langsam

Post by micro »

Joe User wrote: http://127.0.0.1/manual/
Wirklich sehr konstruktive Hilfe...
darkspirit
Posts: 553
Joined: 2002-10-05 16:39
Location: D'dorf
Contact:
 

Re: Apache bei Bildauslieferung langsam

Post by darkspirit »

Vielleicht machst du mal genau das und liest das Manual, bevor du über einen gutgemeinten Kommentar stänkerst :?
micro
Posts: 5
Joined: 2003-08-25 23:32
 

Re: Apache bei Bildauslieferung langsam

Post by micro »

DarkSpirit wrote:Vielleicht machst du mal genau das und liest das Manual, bevor du über einen gutgemeinten Kommentar stänkerst :?
Vieleicht bemerkst auch Du, dass ich geschrieben habe, dass ich apache.org durchgelesen habe...
Aber wie immer, bekommt man von den ganz Schlauen den Hinweis aufs Manual (egal ob man vorher schon mitgeteilt hat, dass man es kennt)

Ich hatte gehofft, dass es hier jemanden mit Erfahrung gibt, der wirklich weiter helfen will, aber die letzten beiden Kommentare zeigen eher das Gegenteil.

Danke!

PS: Achja, damit das jetzt nicht ewig so weiter geht, fragen tue ich nur, wenn ich nichts finde. Und ich habe keine Lösung für das Problem gefunden.
jtb
Posts: 599
Joined: 2002-08-18 16:41
Location: Darmstadt
Contact:
 

Re: Apache bei Bildauslieferung langsam

Post by jtb »

Also micro, nur ein Beispiel aus deiner Config-File:

Code: Select all

# Each directory to which Apache has access, can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories). 
#
# First, we configure the "default" to be a very restrictive set of 
# permissions.  
#
<Directory />
    Options +FollowSymLinks +Includes +Multiviews
    AllowOverride All
</Directory>

#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#
da steht ausdrücklich in den Kommentaren "very restrictive set of permissions."

Warum wurde dort was verändert?

btw: ich wette mit dir, dass du ca die Hälfte der Module nicht brauchst..
Unter http://httpd.apache.org/docs/misc/perf-tuning.html (wurde hier ja schon erwähnt), steht z.B.:
Since memory usage is such an important consideration in performance, you should attempt to eliminate modules that you are not actually using.
oxygen
Posts: 2138
Joined: 2002-12-15 00:10
Location: Bergheim
 

Re: Apache bei Bildauslieferung langsam

Post by oxygen »

Wie schon erwähnt solltest du mal deine Konfiguration durcharbeiten. Da steht viel müll drin, z.B.

Code: Select all

AddModule mod_fastcgi.c
AddModule mod_gzip.c
AddModule mod_auth_mysql.c
ohne entsprechendes LoadModul

Code: Select all

MaxKeepAliveRequests 50
Soll höher gestellt werden, z.B. auf 300

Code: Select all

Timeout 300
besser wäre 30

Code: Select all

KeepAliveTimeout 15
besser wäre 60

Code: Select all

MinSpareServers 10
MaxSpareServers 20
StartServers 15
Könnte was höher sein.

Code: Select all

LoadModule proxy_module       lib/apache/libproxy.so
LoadModule dbm_auth_module    lib/apache/mod_auth_dbm.so
LoadModule asis_module        lib/apache/mod_asis.so
LoadModule imap_module        lib/apache/mod_imap.so
LoadModule userdir_module     lib/apache/mod_userdir.so
raus

Code: Select all

User nobody
Group nobody
evil.

Code: Select all

ServerAdmin root@node11.securewebserver.de
ändern.

Code: Select all


################## Mod_bandwidth ######################
#<Directory /home>
#BandWidth ecp.fr 0   
#BandWidth 138.195 0  
#BandWidth all 1024
#LargeFileLimit 200 3072 
#LargeFileLimit 1024 2048
#MinBandWidth all 256
#</Directory>
################## Mod_bandwidth ######################

# Frontpage Support
#####################
# http://www.rtr.com/fpsupport/faq2002.htm 
#
# Here are some quick steps to setting up a vhost with frontpage 2002 support...
#  1) setup the vhost, make sure its working correctly!
#  2) run /usr/local/frontpage/version5.0/bin/owsadm.exe to setup the vhost
#   2a) the documentation sucks.. heres an example that worked for me...
#       "./owsadm.exe -o install -servconf /usr/local/apache/conf/httpd.conf -xuser unix_system_user -xgroup unix_system_group -u admin_account_on_webfolder -p 80 -m vhost-domain.tld"
#   2b) you must now copy /usr/local/frontpage/version5.0/vti_bin/ to your vhost webroot
#   2c) you will also have to manually chmod all the .exe files under /vti_bin/ to 6755
#  3) you will probably have to manually add these lines into the frontpage vhosts <VirtualHost> directive...
#     "scriptalias /_vti_bin/_vti_adm/ /vhome/vhost-domain.tld/_vti_bin/_vti_adm/"
#     "scriptalias /_vti_bin/_vti_aut/ /vhome/vhost-domain.tld/_vti_bin/_vti_aut/"
#     "scriptalias /_vti_bin/ /vhome/vhost-domain.tld/_vti_bin/"
#   3a) you will also HAVE to add AllowOverride All to your vhosts, this is required by frontpage
#  4) test it and make sure you can login to it as a webfolder
#
######################

######### MOD FastCGI #########
#http://www.fastcgi.com/
#FastCgiSuexec /usr/local/apache/bin/suexec
#FastCgiServer /usr/local/apache/sbin/testing.cgi -priority 5
#FastCgiServer /usr/local/apache/sbin/stuff.pl -priority 5
######### MOD FastCGI #########

<IfModule mod_gzip.c>
################# Mod_GZIP ##################
# http://www.remotecommunications.com/apache/mod_gzip/
LogFormat "%h %l %u %t %r %>s %b mod_gzip: %{mod_gzip_compression_ratio}npct." common_with_mod_gzip_info1
LogFormat "%h %l %u %t %r %>s %b mod_gzip: %{mod_gzip_result}n In:%{mod_gzip_input_size}n Out:%{mod_gzip_output_size}n:%{mod_gzip_compression_ratio}npct." common_with_mod_gzip_info2
CustomLog /var/log/httpd/gzip.log common_with_mod_gzip_info2   

mod_gzip_on                 No
mod_gzip_minimum_file_size  300
mod_gzip_maximum_file_size  0
mod_gzip_maximum_inmem_size 100000
mod_gzip_keep_workfiles     No
mod_gzip_dechunk yes
# I suggest you make /usr/local/apache/gzip and use that instead
mod_gzip_temp_dir           /tmp
mod_gzip_item_include       file .html$
mod_gzip_item_include       file .jsp$
mod_gzip_item_include       file .php$
mod_gzip_item_include       file .pl$
mod_gzip_item_include       mime ^text/.*
mod_gzip_item_include       mime ^application/x-httpd-php
mod_gzip_item_include       mime ^httpd/unix-directory$
mod_gzip_item_include       handler ^perl-script$
mod_gzip_item_include       handler ^server-status$
mod_gzip_item_include       handler ^server-info$
mod_gzip_item_exclude       file .css$
mod_gzip_item_exclude       file .js$
mod_gzip_item_exclude       mime ^image/.*
################# Mod_GZIP ##################
</IfModule>
raus den müll.
User avatar
Joe User
Project Manager
Project Manager
Posts: 11191
Joined: 2003-02-27 01:00
Location: Hamburg
Contact:
 

Re: Apache bei Bildauslieferung langsam

Post by Joe User »

micro wrote:
DarkSpirit wrote:Vielleicht machst du mal genau das und liest das Manual, bevor du über einen gutgemeinten Kommentar stänkerst :?
Vieleicht bemerkst auch Du, dass ich geschrieben habe, dass ich apache.org durchgelesen habe...
Sorry, Du schriebst lediglich, dass Du keinen Link zu apache.org wünscht, was ich respektierte.
micro wrote:Aber wie immer, bekommt man von den ganz Schlauen den Hinweis aufs Manual (egal ob man vorher schon mitgeteilt hat, dass man es kennt)
Das Manual hast Du nicht gelesen...
micro wrote:PS: Achja, damit das jetzt nicht ewig so weiter geht, fragen tue ich nur, wenn ich nichts finde. Und ich habe keine Lösung für das Problem gefunden.
RTFM
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
Post Reply