lange ladedauer von bildern

  • Thread starter Thread starter spacy
  • Start date Start date
S

spacy

Guest
Hallo Gurus,
ich habe ein Problem mit der Ladedauer von Bildern, aber eins nach dem anderen;)
Mein Server ist ein vServer L von 1&1 mit Suse, php5 und mysql.
Plesk ist abgeschaltet und die Datenbank nach einigen Angaben aus diesem Forum optimiert. Soll heißen, dass vermutlich genügend Ressourcen zur Verfügung stehen.
Auf diesem kleinen Server läuft phpbb3 als Forum sonst nix. die Datenbank an sich ist ca. 30MB klein.
Jetzt zum eigentlichen Problem:
Beim Aufruf der Seite dauert es teilweise bis zu 60 Sekunden bis alle Bilder geladen wurden. Das HTML, als auch das Stylesheet sind innerhalb 0,4 Sekunden verfügbar (laut httpwatch). Bei den meisten Bildern (icons) liegt die Ladedauer ebenfalls in dieser Zeit. Und bei den letzten 5-10 icons dauert es ewig.
Der direkte (Einzel-) Aufruf ist pfeilschnell.
Interessanterweise ist die Ladedauer mit dem IE8 deutlich geringer als mit Firefox, mit Opera ist's am schnellsten und der Rest schneckt ein wenig.
Die icons an sich haben Dateigrößen von 1-2KB.

Liegt dieser Effekt an der Server-Konfiguration und wenn ja was kann man da machen oder habt ihr evtl. einen Tipp für mich was ich noch prüfen könnte?

LG spacy
EDIT: 10.11. Textanpassung an Forenregeln
 
Last edited by a moderator:
Hast du mal nachgesehen, ob dein Server vielleicht ein RAM-Problem bekommt, wenn er so viele Anfragen in kurzer Zeit verarbeiten muss? Es könnte ja durchaus sein, dass zu viele Apache-Prozesse offen sind, die dann zuviel RAM verbrauchen.

Poste doch mal die Ausgabe von
Code:
cat /proc/user_beancounters
 
gern
Code:
Version: 2.5
       uid  resource                     held              maxheld              barrier                limit              failcnt
  55389225: kmemsize                 14685160             14738553             20971520             23068672                    0
            lockedpages                     0                    0                  256                  256                    0
            privvmpages                100667               101136               262144               288358                    0
            shmpages                      852                  852                20480                20480                    0
            dummy                           0                    0                    0                    0                    0
            numproc                        54                   54                   96                   96                17039
            physpages                   49906                50335           2147483647           2147483647                    0
            vmguarpages                     0                    0                65536           2147483647                    0
            oomguarpages                49906                50335                65536           2147483647                    0
            numtcpsock                     46                   46                  360                  360                    0
            numflock                       11                   12                  188                  206                    0
            numpty                          1                    1                   16                   16                    0
            numsiginfo                      0                    1                  256                  256                    0
            tcpsndbuf                  213304               217992              1720320              2703360                    0
            tcprcvbuf                  303200               307592              1720320              2703360                    0
            othersockbuf               199240               216944              1126080              2097152                   30
            dgramrcvbuf                     0                    0               262144               288358                    0
            numothersock                  124                  126                  360                  360                   22
            dcachesize                1327671              1344654              3145728              3460300                    0
            numfile                      2443                 2452                 4096                 4096                 1655
            dummy                           0                    0                    0                    0                    0
            dummy                           0                    0                    0                    0                    0
            dummy                           0                    0                    0                    0                    0
            numiptent                      50                   50                  100                  105                    0
 
Ich glaube einen Teil der Lösung gefunden zu haben.
In der Datei server-tuning.conf stand der Parameter MaxKeepAliveRequests auf 100 und KeepAliveTimeout auf 15. Habe jetzt die Werte auf 1000 bzw. 2 geändert. Nun läuft's deutlich schneller.

Beim initialen Aufruf erfolgen 22 requests, 13 werden sofort geliefert, 3 nach 2 Sekunden und 6 nach 4 Sekunden.

Kann ich dem Server mitteilen, dass dieser in einem Schritt mehr als 13 requests verarbeitet?
Als Anlage habe ich die server-tuning.conf eingehängt.

Code:
##
## Server-Pool Size Regulation (MPM specific)
## 

# the MPM (multiprocessing module) is not a dynamically loadable module in the
# sense of other modules. It is a compile time decision which one is used. We
# provide different apache2 MPM packages, containing different httpd2 binaries
# compiled with the available MPMs. See APACHE_MPM in /etc/sysconfig/apache2.

# prefork MPM
<IfModule prefork.c>
	# number of server processes to start
	# http://httpd.apache.org/docs/2.2/mod/mpm_common.html#startservers
	StartServers       1
	# minimum number of server processes which are kept spare
	# http://httpd.apache.org/docs/2.2/mod/prefork.html#minspareservers
	MinSpareServers    1
	# maximum number of server processes which are kept spare
	# http://httpd.apache.org/docs/2.2/mod/prefork.html#maxspareservers
	# von 5 auf 3
	MaxSpareServers    3
	# highest possible MaxClients setting for the lifetime of the Apache process.
	# http://httpd.apache.org/docs/2.2/mod/mpm_common.html#serverlimit
	ServerLimit       10
	# maximum number of server processes allowed to start
	# http://httpd.apache.org/docs/2.2/mod/mpm_common.html#maxclients
	MaxClients        10
	# maximum number of requests a server process serves
	# http://httpd.apache.org/docs/2.2/mod/mpm_common.html#maxrequestsperchild
	MaxRequestsPerChild  10000
</IfModule>

# worker MPM
<IfModule worker.c>
	# initial number of server processes to start
	# http://httpd.apache.org/docs/2.2/mod/mpm_common.html#startservers
	StartServers       1
	# minimum number of worker threads which are kept spare
	# http://httpd.apache.org/docs/2.2/mod/mpm_common.html#minsparethreads
	MinSpareThreads    1
	# maximum number of worker threads which are kept spare
	# http://httpd.apache.org/docs/2.2/mod/mpm_common.html#maxsparethreads
	MaxSpareThreads    4
	# upper limit on the configurable number of threads per child process
	# http://httpd.apache.org/docs/2.2/mod/mpm_common.html#threadlimit
	ThreadLimit         64
	# maximum number of simultaneous client connections
	# http://httpd.apache.org/docs/2.2/mod/mpm_common.html#maxclients
	MaxClients        10
	# number of worker threads created by each child process
	# http://httpd.apache.org/docs/2.2/mod/mpm_common.html#threadsperchild
	ThreadsPerChild     25
	# maximum number of requests a server process serves
	# http://httpd.apache.org/docs/2.2/mod/mpm_common.html#maxrequestsperchild
	MaxRequestsPerChild  10000
</IfModule>


#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
KeepAlive On

#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests 1000

#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#
KeepAliveTimeout 2

#
# EnableMMAP: Control whether memory-mapping is used to deliver
# files (assuming that the underlying OS supports it).
# The default is on; turn this off if you serve from NFS-mounted
# filesystems.  On some systems, turning it off (regardless of
# filesystem) can improve performance; for details, please see
# http://httpd.apache.org/docs-2.2/mod/core.html#enablemmap
#
#EnableMMAP off

#
# EnableSendfile: Control whether the sendfile kernel support is
# used  to deliver files (assuming that the OS supports it).
# The default is on; turn this off if you serve from NFS-mounted
# filesystems.  Please see
# http://httpd.apache.org/docs-2.2/mod/core.html#enablesendfile
#
#EnableSendfile off


#
# The following directives modify normal HTTP response behavior to
# handle known problems with browser implementations.
#
BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
BrowserMatch "RealPlayer 4\.0" force-response-1.0
BrowserMatch "Java/1\.0" force-response-1.0
BrowserMatch "JDK/1\.0" force-response-1.0

#
# The following directive disables redirects on non-GET requests for
# a directory that does not include the trailing slash.  This fixes a 
# problem with Microsoft WebFolders which does not appropriately handle 
# redirects for folders with DAV methods.
# Same deal with Apple's DAV filesystem and Gnome VFS support for DAV.
#
BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
BrowserMatch "^WebDrive" redirect-carefully
BrowserMatch "^WebDAVFS/1.[012]" redirect-carefully
BrowserMatch "^gnome-vfs" redirect-carefully

Grüße spacy
 
Back
Top