Performance Probleme mit dem Apache

Apache, Lighttpd, nginx, Cherokee
Post Reply
theomega
Userprojekt
Userprojekt
Posts: 696
Joined: 2003-01-27 14:36
Contact:
 

Performance Probleme mit dem Apache

Post by theomega »

Hallo Leute,
ich hab ein riesen Problem mit meinem Apache:
Auf dem Server läuft eine mittelgroße Seite und sonderlich viele Besucher sind nie gleichzeitig online. Trotzdem ist der Server ständig bei einem load > 4, und das obwohl die Hardware recht stark sein sollte. Ich will es einfach nicht glaube das es an der Hardware liegt sondern tippe auf ein Software-Problem. Ich werde hier einfach mal alle Daten zusammentragen und bitte um einen Tip, was evtl falsch läuft.

1. Hardware-Ausstattung:
Motherboard MSI K8TM
AMD Athlon 64 Bit 3000+
1 GB RAM
160 GB schnelle HDD

2. Seiten auf dem Sever:
ein Mittel-Großes Forum. ca. 200 Benutzer gleichzeitig online. ca. 260.000 hits pro Tag
zusätzlich noch einige kleinere Seiten, die aber fast keine Besucher verursachen

3. Scripte für die Seiten:
Ein PHP-Forum, das auf eine MySQL-Datenbank zugreift. Zu 90% selbstprogrammiert. Hochoptimiert bezgl Queries und Ausführungszeit.

4. Eingesetzte Software:
Debian Sarge Kernel 2.4.27-1-386 (also kein 64bit Linux)
Apache 1.3.33
PHP 4.3.10-9 (Also Module für den Apache)
MySQL 4.0.23

5. #ps aux

Code: Select all

USER       PID %CPU %MEM   VSZ  RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.0  1492  444 ?        S    Jan31   0:02 init [2]
root         2  0.0  0.0     0    0 ?        S    Jan31   0:00 [keventd]
root         3  0.0  0.0     0    0 ?        RN   Jan31   0:11 [ksoftirqd_CPU0]
root         4  0.0  0.0     0    0 ?        S    Jan31   3:02 [kswapd]
root         5  0.0  0.0     0    0 ?        S    Jan31   0:00 [bdflush]
root         6  0.0  0.0     0    0 ?        S    Jan31   0:00 [kupdated]
root       105  0.0  0.0     0    0 ?        S    Jan31   0:32 [kjournald]
root       244  0.0  0.0     0    0 ?        S    Jan31   0:00 [kjournald]
root       245  0.0  0.0     0    0 ?        S    Jan31   1:15 [kjournald]
root       246  0.0  0.0     0    0 ?        S    Jan31   0:10 [kjournald]
root       247  0.0  0.0     0    0 ?        S    Jan31   3:42 [kjournald]
root       393  0.0  0.0     0    0 ?        S    Jan31   0:00 [khubd]
root      1062  0.0  0.0  2360  460 ?        Ss   Jan31   0:00 dhclient -e -pf /var/run/dhclient
root      1220  0.0  0.0  2240  580 ?        Ss   Jan31   3:20 /sbin/syslogd
root      1223  0.0  0.0  2208  368 ?        Ss   Jan31   0:00 /sbin/klogd
root      1233  0.0  0.0  6852  488 ?        S    Jan31   0:00 /usr/lib/AntiVir/antivir --update
root      1553  0.0  0.1  3720 1048 ?        Ss   Jan31   0:00 /usr/sbin/sshd
root      1570  0.0  0.0  1756  732 ?        Ss   Jan31   0:00 /usr/sbin/cron
root      1608  0.0  0.0  1484  356 tty6     Ss+  Jan31   0:00 /sbin/getty 38400 tty6
root      2315  0.0  0.0     0    0 ?        S    Jan31   0:21 [kjournald]
root     19808  0.0  0.1  5424 1212 ?        Ss   Feb22   0:21 fetchmail -d 120
cyrus    12268  0.0  0.1  5116 1228 ?        Ss   Feb24   0:24 /usr/sbin/cyrmaster -d
cyrus    12368  0.0  0.0  3912  772 ?        S    Feb24   0:00 notifyd
root     12727  0.0  0.1  3656 1120 ?        Ss   Feb24   1:21 /usr/lib/postfix/master
root     20206  0.0  0.0  1484  412 tty1     Ss+  Mar07   0:00 /sbin/getty 38400 tty1
root     20207  0.0  0.0  1484  412 tty2     Ss+  Mar07   0:00 /sbin/getty 38400 tty2
root     20208  0.0  0.0  1484  412 tty3     Ss+  Mar07   0:00 /sbin/getty 38400 tty3
root     20209  0.0  0.0  1484  412 tty4     Ss+  Mar07   0:00 /sbin/getty 38400 tty4
root     20210  0.0  0.0  1484  412 tty5     Ss+  Mar07   0:00 /sbin/getty 38400 tty5
root     32517  0.0  1.2 26084 11112 ?       R    Mar18   0:12 /usr/sbin/apache
root     22338  0.0  0.0  4484  724 ?        Ss   Mar18   0:00 SCREEN sh update5.sh
root     22339  0.0  0.0  4256  808 pts/2    Ss+  Mar18   0:41 sh update5.sh
postfix  13206  0.0  0.1  3136 1256 ?        S    Mar20   0:18 qmgr -l -t fifo -u
root     13214  0.0  0.0  2220  640 ?        Ss   Mar20   0:00 /usr/sbin/inetd
amavis   28516  0.0  0.3 39788 2904 ?        Ss   Mar23   0:01 amavisd (master)
root      6173  0.0  0.1  4484 1264 ?        Ss   Mar23   0:00 SCREEN sh update_traffic.sh
root      6174  0.0  0.1  4244 1080 pts/0    Ss+  Mar23   0:01 sh update_traffic.sh
root     19171  0.0  0.0  4484  724 ?        Ss   Mar24   0:00 SCREEN thttpd -D -C /etc/thttpd.c
www-data 19172  0.1  0.9  9640 8440 pts/1    Ss+  Mar24   9:58 thttpd -D -C /etc/thttpd.conf
root      5786  0.0  0.2  2428 2428 ?        S<Ls Mar27   0:08 /usr/bin/atop -a -w /var/log/atop
root     19756  0.0  0.1  4268  996 ?        S    Mar27   0:00 /bin/sh /usr/bin/mysqld_safe
mysql    19792  0.0  3.8 106364 35300 ?      S    Mar27   0:17 /usr/sbin/mysqld --basedir=/usr -
root     19793  0.0  0.0  3304  476 ?        S    Mar27   0:00 logger -p daemon.err -t mysqld_sa
mysql    19794  0.0  3.8 106364 35300 ?      S    Mar27   0:16 /usr/sbin/mysqld --basedir=/usr -
mysql    19795  0.0  3.8 106364 35300 ?      S    Mar27   0:00 /usr/sbin/mysqld --basedir=/usr -
mysql    19796  0.0  3.8 106364 35300 ?      S    Mar27   0:00 /usr/sbin/mysqld --basedir=/usr -
mysql    19797  0.0  3.8 106364 35300 ?      S    Mar27   0:00 /usr/sbin/mysqld --basedir=/usr -
mysql    19798  0.0  3.8 106364 35300 ?      S    Mar27   0:00 /usr/sbin/mysqld --basedir=/usr -
mysql    19799  0.0  3.8 106364 35300 ?      S    Mar27   0:00 /usr/sbin/mysqld --basedir=/usr -
mysql    19800  0.0  3.8 106364 35300 ?      S    Mar27   0:00 /usr/sbin/mysqld --basedir=/usr -
mysql    19801  0.0  3.8 106364 35300 ?      S    Mar27   0:00 /usr/sbin/mysqld --basedir=/usr -
mysql    19802  0.0  3.8 106364 35300 ?      S    Mar27   0:11 /usr/sbin/mysqld --basedir=/usr -
mysql    19803  0.0  3.8 106364 35300 ?      S    Mar27   0:00 /usr/sbin/mysqld --basedir=/usr -
guirana   9066  0.0  0.3  4964 2792 ?        SL   15:26   0:00 proftpd: guirana - p54A27CD2.dip.
postfix  21605  0.0  0.1  2964 1176 ?        S    15:58   0:00 pickup -l -t fifo -u
root     21819  0.0  0.2  7312 2096 ?        Ss   15:58   0:00 sshd: root@pts/3
root     21942  0.0  0.2  7312 2096 ?        S    15:59   0:00 sshd: root@pts/3
root     21964  0.0  0.1  4584 1716 pts/3    Ss   15:59   0:00 -bash
postfix  31324  0.0  0.1  3664 1600 ?        S    16:21   0:00 trivial-rewrite -n rewrite -t uni
cyrus     8138  0.0  0.2 21968 2348 ?        S    16:39   0:00 lmtpd
postfix  11572  0.0  0.3  5956 2920 ?        S    16:45   0:00 smtpd -n smtp -t inet -u
cyrus    12096  0.0  0.2  5268 2084 ?        S    16:46   0:00 pop3d -U 30
amavis   12215  0.2  2.8 42152 26004 ?       S    16:47   0:01 amavisd (ch9-avail)
root     16412  0.0  0.1  5116 1208 pts/0    S+   16:55   0:00 perl -e sleep 300 - time % 300
postfix  16625  0.0  0.1  3676 1652 ?        S    16:55   0:00 cleanup -z -t unix -u
postfix  16626  0.0  0.1  4344 1596 ?        S    16:55   0:00 smtp -n smtp-amavis -t unix -u -o
postfix  16637  0.0  0.3  5940 2880 ?        S    16:55   0:00 smtpd -n localhost:10025 -t inet
postfix  16638  0.0  0.1  3340 1536 ?        S    16:55   0:00 local -t unix
postfix  16639  0.0  0.1  4308 1552 ?        S    16:55   0:00 lmtp -t unix -u
postfix  17357  0.0  0.1  4344 1592 ?        S    16:57   0:00 smtp -n smtp-amavis -t unix -u -o
amavis   17367  0.2  2.6 40936 24048 ?       S    16:57   0:00 amavisd (ch2-avail)
cyrus    17884  0.0  0.2  5268 2076 ?        S    16:58   0:00 pop3d -U 30
root     17965  0.0  0.1  5116 1208 pts/2    S+   16:58   0:00 perl -e sleep 60 - time % 60
postfix  18115  0.0  0.2  5064 1856 ?        S    16:58   0:00 smtp -t unix -u
www-data 18198  0.3  1.2 26176 11252 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18199  0.0  1.2 26084 11248 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18200  1.5  1.4 27240 12992 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18201  1.7  1.3 26948 12668 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18202  0.4  1.3 26536 12096 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18204  0.1  1.2 26208 11260 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18206  1.9  1.4 27236 12880 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18207  0.5  1.3 26820 12440 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18209  0.1  1.3 26480 12008 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18210  2.2  1.4 27540 13260 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18211  0.2  1.3 27032 12520 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18214  0.0  1.2 26088 11252 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18216  0.1  1.3 26480 12004 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18217  1.5  1.4 26924 12676 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18218  0.0  1.2 26088 11248 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18219  0.0  1.2 26212 11260 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18220  2.2  1.4 27412 13148 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18222  3.0  1.4 27468 13192 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18223  0.2  1.2 26180 11260 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18224  0.5  1.3 26580 12012 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18232  3.3  1.4 27116 12828 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18233  0.7  1.3 26800 12440 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18234  1.6  1.4 27244 12952 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18235  0.0  1.2 26088 11256 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18238  0.0  1.2 26220 11644 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18239  4.3  1.4 27340 13112 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18240  1.7  1.4 27404 13088 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18244  2.0  1.4 27416 13168 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18245  3.6  1.4 27060 12804 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18246  0.7  1.4 27384 13024 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18250  2.7  1.4 27240 12856 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18251  0.0  1.2 26220 11644 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18252  2.1  1.4 27144 12792 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18256  0.5  1.3 26864 12424 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18257  4.4  1.4 27396 13168 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18258  0.8  1.3 26936 12628 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18271  0.1  1.3 26480 12004 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18272  3.1  1.4 27252 12948 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18273  2.7  1.4 27252 12992 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18274  1.4  1.4 27392 13044 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18280  2.2  1.4 27240 12908 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18281  2.3  1.4 27812 13368 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18282  1.9  1.4 27184 12888 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18286  1.7  1.4 27412 13028 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18287  0.1  1.2 26088 11252 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18288  0.0  1.2 26120 11268 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18293  0.0  1.2 26116 11264 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18294  0.0  1.2 26116 11264 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18295  0.8  1.4 27188 12800 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18298  0.0  1.2 26112 11264 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18299  0.3  1.2 26220 11648 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18300  4.3  1.4 27244 12976 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18307  4.4  1.4 27420 13092 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18308  0.0  1.2 26220 11644 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18309  2.5  1.4 27280 12880 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18314  1.0  1.3 26812 12416 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18315  2.4  1.4 27240 12852 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18316  0.0  1.2 26100 11256 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18320  0.6  1.2 26220 11644 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18321  0.6  1.3 26772 12340 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18322  0.5  1.3 26820 12420 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18326  0.0  1.2 26344 11256 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18327  1.8  1.4 27228 12848 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18328  4.6  1.4 27676 13288 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18330  1.2  1.2 26260 11668 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18331  5.2  1.4 27612 13264 ?       R    16:58   0:00 /usr/sbin/apache
www-data 18332  2.0  1.3 26932 12624 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18339  0.2  1.2 26088 11256 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18351  0.7  1.3 26480 12040 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18352  4.5  1.4 27076 12748 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18353  5.2  1.4 27396 13100 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18360 10.5  1.5 28656 14300 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18361  0.5  1.3 26772 12312 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18362  0.0  1.2 26152 11264 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18375  0.3  1.2 26220 11648 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18376  0.3  1.3 26480 12008 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18377  0.0  1.2 26088 11248 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18381  0.6  1.3 26480 12008 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18382  0.0  1.2 26088 11252 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18383  0.0  1.2 26088 11252 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18384  0.6  1.2 26216 11260 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18385  0.0  1.2 26220 11644 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18386  1.0  1.3 26772 12308 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18387  0.3  1.2 26220 11644 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18388  6.6  1.4 27428 13048 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18389  5.6  1.4 27240 12908 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18391  0.5  1.2 26180 11256 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18394  0.5  1.3 26480 12004 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18395  1.0  1.2 26088 11252 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18396  0.5  1.2 26088 11252 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18397  1.0  1.3 26744 12272 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18398  0.5  1.2 26088 11252 ?       S    16:58   0:00 /usr/sbin/apache
mysql    18399  1.0  3.8 106364 35300 ?      S    16:58   0:00 /usr/sbin/mysqld --basedir=/usr -
www-data 18401  9.5  1.4 27484 13044 ?       R    16:58   0:00 /usr/sbin/apache
www-data 18402  2.0  1.3 26744 12272 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18403  0.5  1.3 26480 12004 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18404  3.5  1.3 27108 12656 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18405  0.5  1.2 26220 11644 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18406  5.0  1.3 27156 12612 ?       R    16:58   0:00 /usr/sbin/apache
mysql    18415 11.0  3.8 106364 35300 ?      S    16:58   0:00 /usr/sbin/mysqld --basedir=/usr -
www-data 18417  1.0  1.3 26772 12308 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18418  0.0  1.2 26084 11168 ?       S    16:58   0:00 /usr/sbin/apache
mysql    18420  3.0  3.8 106364 35300 ?      S    16:58   0:00 /usr/sbin/mysqld --basedir=/usr -
mysql    18422  3.0  3.8 106364 35300 ?      S    16:58   0:00 /usr/sbin/mysqld --basedir=/usr -
www-data 18428  0.0  1.2 26084 11132 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18429  0.0  1.2 26084 11132 ?       S    16:58   0:00 /usr/sbin/apache
www-data 18430  0.0  1.2 26084 11132 ?       S    16:58   0:00 /usr/sbin/apache
mysql    18432  0.0  3.8 106364 35300 ?      S    16:58   0:00 /usr/sbin/mysqld --basedir=/usr -
www-data 18433  0.0  1.2 26084 11132 ?       S    16:58   0:00 /usr/sbin/apache
root     18434  0.0  1.2 26084 11112 ?       R    16:58   0:00 /usr/sbin/apache
root     18435  0.0  1.2 26084 11112 ?       R    16:58   0:00 /usr/sbin/apache
root     18437  0.0  0.0  2480  852 pts/3    R+   16:58   0:00 ps aux
6. ps aux |grep -c apache | wc
170

7. pstree

Code: Select all

init&#9472;&#9516;&#9472;amavisd&#9472;&#9472;&#9472;2*[amavisd]
     &#9500;&#9472;antivir
     &#9500;&#9472;apache&#9472;&#9472;&#9472;162*[apache]
     &#9500;&#9472;atop
     &#9500;&#9472;bdflush
     &#9500;&#9472;cron&#9472;&#9516;&#9472;cron&#9472;&#9516;&#9472;php&#9472;&#9472;&#9472;sh&#9472;&#9472;&#9472;rrdtool
     &#9474;      &#9474;      &#9492;&#9472;sendmail&#9472;&#9472;&#9472;postdrop
     &#9474;      &#9492;&#9472;cron&#9472;&#9472;&#9472;sh&#9472;&#9472;&#9472;sh&#9472;&#9472;&#9472;awstats.pl
     &#9500;&#9472;cyrmaster&#9472;&#9516;&#9472;lmtpd
     &#9474;           &#9500;&#9472;notifyd
     &#9474;           &#9492;&#9472;pop3d
     &#9500;&#9472;dhclient
     &#9500;&#9472;fetchmail
     &#9500;&#9472;6*[getty]
     &#9500;&#9472;inetd&#9472;&#9472;&#9472;proftpd
     &#9500;&#9472;keventd
     &#9500;&#9472;khubd
     &#9500;&#9472;6*[kjournald]
     &#9500;&#9472;klogd
     &#9500;&#9472;ksoftirqd_CPU0
     &#9500;&#9472;kswapd
     &#9500;&#9472;kupdated
     &#9500;&#9472;master&#9472;&#9516;&#9472;cleanup
     &#9474;        &#9500;&#9472;lmtp
     &#9474;        &#9500;&#9472;local
     &#9474;        &#9500;&#9472;pickup
     &#9474;        &#9500;&#9472;qmgr
     &#9474;        &#9500;&#9472;smtp
     &#9474;        &#9500;&#9472;2*[smtpd]
     &#9474;        &#9492;&#9472;trivial-rewrite
     &#9500;&#9472;mysqld_safe&#9472;&#9516;&#9472;logger
     &#9474;             &#9492;&#9472;mysqld&#9472;&#9472;&#9472;mysqld&#9472;&#9472;&#9472;16*[mysqld]
     &#9500;&#9472;2*[screen&#9472;&#9472;&#9472;sh&#9472;&#9472;&#9472;perl]
     &#9500;&#9472;screen&#9472;&#9472;&#9472;thttpd
     &#9500;&#9472;sshd&#9472;&#9472;&#9472;sshd&#9472;&#9516;&#9472;bash&#9472;&#9472;&#9472;pstree
     &#9474;             &#9492;&#9472;sshd
     &#9492;&#9472;syslogd
8. uptime

Code: Select all

 17:01:08 up 56 days,  3:32,  1 user,  load average: 5.27, 4.77, 4.93
9. Infos von server-status des apaches:

Code: Select all

Current Time: Monday, 28-Mar-2005 17:02:02 CEST
Restart Time: Monday, 28-Mar-2005 16:58:35 CEST
Parent Server Generation: 23
Server uptime: 3 minutes 27 seconds
Total accesses: 9688 - Total Traffic: 49.6 MB
CPU Usage: u101.36 s5.53 cu.03 cs0 - 51.7% CPU load
46.8 requests/sec - 245.3 kB/second - 5.2 kB/request
112 requests currently being processed, 1 idle servers
10. Einige Diagramme bzgl. CPU-Auslastung:
http://flacons.org/rrdtool/cpu_1d.gif
http://flacons.org/rrdtool/cpu_2d.gif
http://flacons.org/rrdtool/load_1d.gif
http://flacons.org/rrdtool/load_2d.gif

(Beim CPU-Diagramm hat wurde der load zur skalierung * 10 genommen)

11. /etc/php4/php.ini
http://flacons.org/php4.ini

12. /etc/apache/httpd.conf
http://flacons.org/httpd.conf

Meine Gedanken zu der Sache
1. Es scheint am Apache zu liegen und nicht am MySQL. Weil der Apache ist mit top immer weit oben und in großer anzahl, wogegen man den mysql selten überhaupt auf der ersten seite sieht
2. Eine Installation vom einem THTTPD und eine verlagerung aller Bilder auf diesen hat eine Besserung gebracht, allerdings nicht wirklich viel und der Aufwand (zweite IP, Nameserver verändern) würde recht groß werden.
3. PHP läuft als Modul, weil das ja wohl die beste Performance bringen soll.

Also, wie gesagt, wer hat mir einen Tip, worans liegt? Wenn irgendwelche Daten fehlen, dann nur sagen, ich stells dann sofort online. Ich bin echt verzweifelt und hab keine Ahnung worans liegt und will wie gesagt nicht akzeptieren, das die nicht sonderlich große Seite wirklich einen so starken CPU und soviel Ram an die Grenzen bringt.


Danke für jeden Hinweis
TO
User avatar
Joe User
Project Manager
Project Manager
Posts: 11191
Joined: 2003-02-27 01:00
Location: Hamburg
Contact:
 

Re: Performance Probleme mit dem Apache

Post by Joe User »

Hast Du mal über Apache2-worker+PHP-FCGI nachgedacht?
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.
theomega
Userprojekt
Userprojekt
Posts: 696
Joined: 2003-01-27 14:36
Contact:
 

Re: Performance Probleme mit dem Apache

Post by theomega »

ja, habe ich mir angeschaut, allerdings ist der administrationsaufwand ja ungleich höher als mit mod_php4. Ist es den so, das das wirklich was bringen würde? Ich glaube einfach noch, das irgendwas an meinen Apache einstellungen nicht passt, weil so viele user sind es doch nicht, das das den apache an seine grenzen bringen sollte, wenn er richtig konfiguriert wäre
superuser1
Posts: 291
Joined: 2003-11-26 18:43
Location: earth
 

Re: Performance Probleme mit dem Apache

Post by superuser1 »

Hi...

ich stimme Joe User in soweit zu dass ich dir auch mindestens auf Apache2-worker raten würde - wenn dir FCGI vom Aufwand her zu groß ist, ok - aber der Apache-Umstieg sollte dir schon einen Gewinn bringen.

Wirkliche Performance-Bremsen habe ich nach einem flüchtigen Blick über deine Configs jetzt nicht sehen können, an der ein oder anderen Stelle könnte man mit Sicherheit noch etwas drehen, aber eher im marginalen Bereich.

Ansonsten, wenn dir die Last wirklich zu stark ansteigt, würde ich ernsthaft über einen zweiten Server nachdenken. Das müsste ja keine High-End-Maschine sein - eher überdurchschnittlich gut angebunden - zum geschickten Auslagern von manchen Diensten wäre es durchaus eine Ã?berlegung wert.

:roll:
theomega
Userprojekt
Userprojekt
Posts: 696
Joined: 2003-01-27 14:36
Contact:
 

Re: Performance Probleme mit dem Apache

Post by theomega »

jauh, das war auch eine überlegung von mir, nur bin ich erst vor 2 monaten auf den server umgezogen in der hoffnung mal für ein bischen zeit ruhe mit neuer Hardware zu haben. Aber ich scheine mich da verschätzt zu haben
superuser1
Posts: 291
Joined: 2003-11-26 18:43
Location: earth
 

Re: Performance Probleme mit dem Apache

Post by superuser1 »

Hi...

gerade in solchen Fällen finde ich sollte der Grundsatz gelten: Lieber 2 Mid-Range-Server und gut angebunden als eine High-End-Maschine - allein schon vor dem Hintergrund der Skalierbarkeit eine bessere Wahl und zuzüglich des in den meisten Fällen sogar doppelten Inklusivtraffics eine echte Alternative.

:roll:
streicher
Posts: 17
Joined: 2003-06-02 18:39
 

Re: Performance Probleme mit dem Apache

Post by streicher »

theomega wrote:3. Scripte für die Seiten:
Ein PHP-Forum, das auf eine MySQL-Datenbank zugreift. Zu 90% selbstprogrammiert. Hochoptimiert bezgl Queries und Ausführungszeit.
Das selbstprogrammierte Forum scheint mir bei den vielen Queries, die für jede Seite aufgerufen werden doch nicht wirklich hoch optmiert zu sein. Wenn dann noch so viele User Online sind, wundert mich der Serverload gar nicht. Schlimmer noch scheint aber das Bildarchiv zu sein. Alleine die Seite http://www.pagenstecher.de/cars.php hat 71 Queries. Eine Detailseite wie http://www.pagenstecher.de/car643,VW---Golf-4-18T.html sogar 74.
streicher
Posts: 17
Joined: 2003-06-02 18:39
 

Re: Performance Probleme mit dem Apache

Post by streicher »

Streicher wrote: Das selbstprogrammierte Forum
##

Ich muß mich leider selber quoten, da ich keine Edit-Button gefunden habe. Nun das Forum ist doch nur ein abgewandeltes Forum thwboard.de
User avatar
Joe User
Project Manager
Project Manager
Posts: 11191
Joined: 2003-02-27 01:00
Location: Hamburg
Contact:
 

Re: Performance Probleme mit dem Apache

Post by Joe User »

Ich lade gerade 2.85-rc3 und sehe mal flüchtig über den Source...
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.
theomega
Userprojekt
Userprojekt
Posts: 696
Joined: 2003-01-27 14:36
Contact:
 

Re: Performance Probleme mit dem Apache

Post by theomega »

vergesst es, das copyright ist nurnoch formal drin, vom code ist (fast) nichtsmehr original. Selbst wenn die Queries ein bischen hoch sind (werde mich nochmal drum kümmer), wiso verursacht dann der apache den load? Das mit den 2 Servern statt einer wußte ich nicht, höre ich jetzt so zum ersten mal, erscheint aber sehr logisch 8O 8O
theomega
Userprojekt
Userprojekt
Posts: 696
Joined: 2003-01-27 14:36
Contact:
 

Re: Performance Probleme mit dem Apache

Post by theomega »

wo ist eigentlich der edit-button hin, ziemlich lästig hier.
Wollte gerade folgendes oben anfügen:
==
Danke an alle die bisher geantwortet haben
superuser1
Posts: 291
Joined: 2003-11-26 18:43
Location: earth
 

Re: Performance Probleme mit dem Apache

Post by superuser1 »

Hi...

ein möglicher Ansatz bei dir wäre zum Beispiel:

Apache und MySQL (dynamischer Content) auf den einen und thppd/fnord (statischer Content) und Mailserver auf den anderen...

:roll:
theomega
Userprojekt
Userprojekt
Posts: 696
Joined: 2003-01-27 14:36
Contact:
 

Re: Performance Probleme mit dem Apache

Post by theomega »

jauh, das wäre mein zweiter Schritt gewesen, festzustellen wie man am besten mit einem zweiten Server aufteilt. Heißt es, außer die Script noch zu optimieren gibt es nichts was ich tun kann, damit mir der Server reicht.
User avatar
Joe User
Project Manager
Project Manager
Posts: 11191
Joined: 2003-02-27 01:00
Location: Hamburg
Contact:
 

Re: Performance Probleme mit dem Apache

Post by Joe User »

OK, könntest Du (mir (PN)) Deine Version mal zum DL bereitstellen? Danke.
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.
oxygen
Posts: 2138
Joined: 2002-12-15 00:10
Location: Bergheim
 

Re: Performance Probleme mit dem Apache

Post by oxygen »

Habe gerade mal die httpd.conf überflogen und fällt mir nur ein "Fehler" auf:

Code: Select all

<Directory /home/domixx/dx_pagenstecher/html/gallery>
    AllowOverride Options FileInfo
</Directory>
Durch das AllowOverride wird Apache dazu genötigt, bei jedem Request nach einer .htaccess in allen Verzeichnissen die über diesem liegen zu schauen. Sollte das eine "normale" .htaccess sein, die nicht gerade dynmaisch generiert ist, würde ich den Inhalt direkt in die httpd.conf schreiben und auf ein AllowOverride verzichten.
theomega
Userprojekt
Userprojekt
Posts: 696
Joined: 2003-01-27 14:36
Contact:
 

Re: Performance Probleme mit dem Apache

Post by theomega »

der code ist eh veraltet, ich werde ihn komplett streichen, danke für den hinweis.
theomega
Userprojekt
Userprojekt
Posts: 696
Joined: 2003-01-27 14:36
Contact:
 

Re: Performance Probleme mit dem Apache

Post by theomega »

habe gerade noch dem tipp bekommen, ich solle doch den kernel neu komplieren. Wie sieht es damit aus, sinvoll? Bis jetzt ist wie oben angegeben wohl der standart sarge-kernel im einsatz. Wäre es jetzt sinvoll einen eigenen zu komplieren, oder bringt bsplsweise der einsatz von CC's Custom Kernels was?
oxygen
Posts: 2138
Joined: 2002-12-15 00:10
Location: Bergheim
 

Re: Performance Probleme mit dem Apache

Post by oxygen »

Naja, am besten wäre ein 2.6'er Kernel mit einer nptl glibc. Dann würde auch der Umstieg auf Apache2-worker mehr bringen. Zwischen einzelnen 2.4'er Releases ist der Unterschied nicht so groß.
Post Reply