Apache2 - mod_deflate

Apache, Lighttpd, nginx, Cherokee
Post Reply
in flames
Posts: 70
Joined: 2003-12-24 22:33
 

Apache2 - mod_deflate

Post by in flames »

Hallo,

ich habe bei meinem Apache2 (2.0.54) mod_deflate eingesetzt, mit meinem ISDN Anschluss hab ich dadurch einen deutlichen Vorteil erziehlen können, nun haben sich aber einige DSL User über eine enorme Wartezeit beschwert, teilweiße hat der Seitenaufbau 20 sek. gedauert, sobald die Seite dann aber geladen war, funktionierte der Seitenaufbau sehr schnell.

Nun habe ich deflate wieder ausgebaut und bei mir ist die Seite nun wesentlich langsamer, die DSL User haben dafür aber keine Wartezeit mehr.

Das rootforum ist ja auch gezippt und solche Probleme habe ich hier noch nicht festgestellt.

Habe ich eventuell etwas falsch konfiguriert?

Hier mal meine mod_deflate Einstellungen:
<Location />
# Insert filter
SetOutputFilter DEFLATE

# Netscape 4.x has some problems...
BrowserMatch ^Mozilla/4 gzip-only-text/html

# Netscape 4.06-4.08 have some more problems
BrowserMatch ^Mozilla/4.0[678] no-gzip

# MSIE masquerades as Netscape, but it is fine
# BrowserMatch bMSIE !no-gzip !gzip-only-text/html

# NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48
# the above regex won't work. You can use the following
# workaround to get the desired effect:
BrowserMatch bMSI[E] !no-gzip !gzip-only-text/html

# Don't compress images
SetEnvIfNoCase Request_URI
.(?:gif|jpe?g|png)$ no-gzip dont-vary

# Make sure proxies don't deliver the wrong content
Header append Vary User-Agent env=!dont-vary
</Location>
Hier mal meine phpinfo Ausgabe: http://www.bm-community.de/info.php

Testen könnt ihr hier mal: http://www.bm-community.de (gzip ist momentan deaktiviert) ich find die Seite nun recht langsam.

Ich hoffe ihr könnt mir helfen.

Vielen Dank
killerboy
Posts: 24
Joined: 2005-11-10 13:25
 

Re: Apache2 - mod_deflate

Post by killerboy »

Hi,

ich würde es etwas ander versuchen. Mit Deiner Konfiguration filterst Du alles (SetOutputFilter DEFLATE). Ich würde die Filterung auf den Content-Type text/* einstellen:

Code: Select all

AddOutputFilterByType DEFLATE text/html text/css text/javascript
Danach fügst Du dann die Ausnahmen ein. Ist nur ein Versuch, aber vielleicht hilft es ja.
User avatar
Joe User
Project Manager
Project Manager
Posts: 11191
Joined: 2003-02-27 01:00
Location: Hamburg
Contact:
 

Re: Apache2 - mod_deflate

Post by Joe User »

Ich (das RF wohnt momentan bei mir) konfiguriere mod_deflate so:

Code: Select all

<Location />
    AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/xml application/xhtml+xml
</Location>
HTH
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.
in flames
Posts: 70
Joined: 2003-12-24 22:33
 

Re: Apache2 - mod_deflate

Post by in flames »

Ich danke euch, ich hab den Apache nun nochmal mit den deflate einstellungen gestartet.

Es wäre nett wenn ihr auch nochmal darüber schauen könntet, ob bei euch nun eventuelle Fehler bzw. Verzögerungen auftreten.

http://www.bm-community.de

Herzlichen Dank
in flames
Posts: 70
Joined: 2003-12-24 22:33
 

Re: Apache2 - mod_deflate

Post by in flames »

Musste deflate nun wieder rausnehmen, da sich die DSL User mal wieder beschwert haben.

Hab nun die konfiguration von Joe genommen, hat leider aber auch nicht geholfen.

Bei RH klappts aber wunderbar, ohne diese Verzögerung die bei uns "angeblich" auftritt
User avatar
Joe User
Project Manager
Project Manager
Posts: 11191
Joined: 2003-02-27 01:00
Location: Hamburg
Contact:
 

Re: Apache2 - mod_deflate

Post by Joe User »

In Flames wrote:Musste deflate nun wieder rausnehmen, da sich die DSL User mal wieder beschwert haben.
Dann sollen die ihre (DSL-)Konfiguration prüfen und etwaige "Beschleuniger" deinstallieren. Anders kann ich mir solche "Probleme" nicht erklären, bin ja auch kein Telekomiker...
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.
in flames
Posts: 70
Joined: 2003-12-24 22:33
 

Re: Apache2 - mod_deflate

Post by in flames »

Eventuell habe ich auch ein grundsätzliches Konfigurationsproblem, hab jetzt von zwei Usern gesagt bekommen, dass diese Einbrüche auch ohne gzip auftreten, mit soll es aber noch schlimmer sein.

Ich kann mir nicht vorstellen, dass es an deren DSL Anschlüssen liegt, da das rootforum oder linuxforen ja auch mit deflate arbeiten und dort haben die User eben keine Probleme.

Ich mit meinem ISDN merke bei aktivem gzip einen deutlichen Unterschied.

Hier ist mal meine apache2.conf vll. ist da was grundsätzliches falsch:

http://www.bm-community.de/apache2.conf

Vielen Dank
User avatar
Joe User
Project Manager
Project Manager
Posts: 11191
Joined: 2003-02-27 01:00
Location: Hamburg
Contact:
 

Re: Apache2 - mod_deflate

Post by Joe User »

Sieht mir nach einer Default-Config (Debian) aus. Ich würde (mindestens) folgende Ã?nderungen vornehmen:

Module anpassen:

Code: Select all

LoadModule auth_module /usr/lib/apache2/modules/mod_auth.so
#LoadModule auth_anon_module /usr/lib/apache2/modules/mod_auth_anon.so
#LoadModule auth_dbm_module /usr/lib/apache2/modules/mod_auth_dbm.so
#LoadModule auth_digest_module /usr/lib/apache2/modules/mod_auth_digest.so
#LoadModule file_cache_module /usr/lib/apache2/modules/mod_file_cache.so
#LoadModule cache_module /usr/lib/apache2/modules/mod_cache.so
#LoadModule disk_cache_module /usr/lib/apache2/modules/mod_disk_cache.so
#LoadModule mem_cache_module /usr/lib/apache2/modules/mod_mem_cache.so
#LoadModule ldap_module /usr/lib/apache2/modules/mod_ldap.so
#LoadModule auth_ldap_module /usr/lib/apache2/modules/mod_auth_ldap.so
LoadModule ext_filter_module /usr/lib/apache2/modules/mod_ext_filter.so
LoadModule include_module /usr/lib/apache2/modules/mod_include.so
LoadModule deflate_module /usr/lib/apache2/modules/mod_deflate.so
#LoadModule mime_magic_module /usr/lib/apache2/modules/mod_mime_magic.so
#LoadModule cern_meta_module /usr/lib/apache2/modules/mod_cern_meta.so
LoadModule expires_module /usr/lib/apache2/modules/mod_expires.so
LoadModule headers_module /usr/lib/apache2/modules/mod_headers.so
#LoadModule usertrack_module /usr/lib/apache2/modules/mod_usertrack.so
#LoadModule unique_id_module /usr/lib/apache2/modules/mod_unique_id.so
#LoadModule proxy_module /usr/lib/apache2/modules/mod_proxy.so
#LoadModule proxy_connect_module /usr/lib/apache2/modules/mod_proxy_connect.so
#LoadModule proxy_ftp_module /usr/lib/apache2/modules/mod_proxy_ftp.so
#LoadModule proxy_http_module /usr/lib/apache2/modules/mod_proxy_http.so
<IfDefine SSL>
LoadModule ssl_module /usr/lib/apache2/modules/mod_ssl.so
</IfDefine>
#LoadModule dav_module /usr/lib/apache2/modules/mod_dav.so
#LoadModule asis_module /usr/lib/apache2/modules/mod_asis.so
LoadModule info_module /usr/lib/apache2/modules/mod_info.so
LoadModule suexec_module /usr/lib/apache2/modules/mod_suexec.so
#LoadModule cgid_module /usr/lib/apache2/modules/mod_cgid.so
LoadModule cgi_module /usr/lib/apache2/modules/mod_cgi.so
#LoadModule dav_fs_module /usr/lib/apache2/modules/mod_dav_fs.so
#LoadModule vhost_alias_module /usr/lib/apache2/modules/mod_vhost_alias.so
#LoadModule imap_module /usr/lib/apache2/modules/mod_imap.so
LoadModule actions_module /usr/lib/apache2/modules/mod_actions.so
#LoadModule speling_module /usr/lib/apache2/modules/mod_speling.so
#LoadModule userdir_module /usr/lib/apache2/modules/mod_userdir.so
LoadModule rewrite_module /usr/lib/apache2/modules/mod_rewrite.so
Directiven setzen:

Code: Select all

ServerRoot ""
User nobody
Group #-1
ServerAdmin you@example.com
ServerName www.example.com:80
Directiven kommentieren:

Code: Select all

#UserDir public_html

#AliasMatch ^/manual(?:/(?:de|en|es|fr|ja|ko|ru))?(/.*)?$ "/usr/share/apache2/default-site/htdocs/manual$1"
#<Directory "/usr/share/apache2/default-site/htdocs/manual">
#    Options Indexes
#    AllowOverride None
#    Order allow,deny
#    Allow from all
#    <Files *.html>
#        SetHandler type-map
#    </Files>
#    SetEnvIf Request_URI ^/manual/(de|en|es|fr|ja|ko|ru)/ prefer-language=$1
#    RedirectMatch 301 ^/manual(?:/(de|en|es|fr|ja|ko|ru)){2,}(/.*)?$ /manual/$1$2
#</Directory>
HTH
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.
in flames
Posts: 70
Joined: 2003-12-24 22:33
 

Re: Apache2 - mod_deflate

Post by in flames »

Danke,

die Module werden bei mir ja über die Zeile:

# Include module configuration:
Include /etc/apache2/mods-enabled/*.load
Include /etc/apache2/mods-enabled/*.conf

Und eben über den Ordner mods-enabled geladen, darin sind folgende Module:

cgi.load
deflate.load
headers.load
php4.conf
php4.load
rewrite.load
userdir.conf
userdir.load

Auf dem System läuft VHCS2 folgende Einstellungen sind in der vhcs2.conf noch gesetzt: http://www.bm-community.de/vhcs2.conf

Einige haben diese Verzögerungsprobleme nun auch ohne aktiviertem gzip, nun ist die Frage ob es an denen liegt oder am Server, könnt ihr eine Verzögerung feststellen?

Ja ist eine Standard Debian Config, ich hab zwar jetzt schon länger rootserver aber mit der Apache config (vorallem bei Apache2) bin ich nicht soo vertraut.

Vielen Dank
in flames
Posts: 70
Joined: 2003-12-24 22:33
 

Re: Apache2 - mod_deflate

Post by in flames »

Ich hab gerade mal einen Apache Benchmark gemacht, das Ergebnis ist ja grauslich:
debian:~# ab2 -n 100 -c 10 http://www.bm-community.de/
This is ApacheBench, Version 2.0.41-dev <$Revision: 1.141 $> apache-2.0
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/

Benchmarking http://www.bm-community.de (be patient).....done


Server Software: Apache/2.0.54
Server Hostname: http://www.bm-community.de
Server Port: 80

Document Path: /
Document Length: 47758 bytes

Concurrency Level: 10
Time taken for tests: 27.764104 seconds
Complete requests: 100
Failed requests: 10
(Connect: 0, Length: 10, Exceptions: 0)
Write errors: 0
Total transferred: 4877622 bytes
HTML transferred: 4823880 bytes
Requests per second: 3.60 [#/sec] (mean)
Time per request: 2776.410 [ms] (mean)
Time per request: 277.641 [ms] (mean, across all concurrent requests)
Transfer rate: 171.55 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 16 54.5 0 257
Processing: 1671 2654 307.0 2694 3503
Waiting: 204 703 296.1 660 1380
Total: 1671 2671 314.8 2706 3503

Percentage of the requests served within a certain time (ms)
50% 2706
66% 2801
75% 2902
80% 2931
90% 3025
95% 3104
98% 3430
99% 3503
100% 3503 (longest request)
debian:~#
in flames
Posts: 70
Joined: 2003-12-24 22:33
 

Re: Apache2 - mod_deflate

Post by in flames »

Ich bekomm das einfach nicht weg, sporadisch hängt der Apache einfach da kann es dann bis zu 20 sek. dauern bis wieder eine Aktion durchgeführt wird.
Post Reply