Performance Probleme (Apache wohl)

FiX

Registered User
Hatte eben in einem anderen Thread gepostet, dann aber gesehen, dass das ganze von 08/06 war - also lieber was neues.

Ich habe seit einiger Zeit recht starke Lags und finde einfach keine Ursache..

Hardare ist Opteron 146, 1GB Ram bei Strato.

Fakten:

Code:
/usr/bin # ab2 -n 100 -c 10 http://www.united-forum.de/index.php
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/

Benchmarking www.united-forum.de (be patient).....done

Server Software:        Apache/2.2.4
Server Hostname:        www.united-forum.de
Server Port:            80

Document Path:          /index.php
Document Length:        89440 bytes

Concurrency Level:      10
Time taken for tests:   51.637778 seconds
Complete requests:      100
Failed requests:        88
   (Connect: 0, Length: 88, Exceptions: 0)
Write errors:           0
Total transferred:      8982750 bytes
HTML transferred:       8939550 bytes
Requests per second:    1.94 [#/sec] (mean)
Time per request:       5163.778 [ms] (mean)
Time per request:       516.378 [ms] (mean, across all concurrent requests)
Transfer rate:          169.88 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0   75 295.6      0    1527
Processing:   369 4997 5484.8   3264   28747
Waiting:      349 4090 4452.2   2813   22344
Total:        369 5073 5564.5   3408   28747

Percentage of the requests served within a certain time (ms)
  50%   3408
  66%   4685
  75%   5454
  80%   6835
  90%  12287
  95%  19978
  98%  25278
  99%  28747
 100%  28747 (longest request)

Code:
top - 21:27:15 up 78 days,  2:54,  1 user,  load average: 3.87, 8.82, 7.96
Tasks: 119 total,   2 running, 116 sleeping,   0 stopped,   1 zombie
Cpu(s): 29.6% us,  2.3% sy,  0.0% ni, 67.8% id,  0.0% wa,  0.0% hi,  0.3% si
Mem:   1034860k total,   745984k used,   288876k free,    12940k buffers
Swap:  2104496k total,    36464k used,  2068032k free,   437056k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
11491 wwwrun    15   0 96060  17m  12m S 14.1  1.7   0:02.64 httpd2-prefork
11530 wwwrun    15   0 96052  16m  11m S 14.1  1.6   0:00.60 httpd2-prefork
11270 wwwrun    16   0 96124  21m  15m S  2.0  2.1   0:09.97 httpd2-prefork
 5788 mysql     16   0  157m  95m 4320 S  1.6  9.5   9:10.23 mysqld-max
11534 root      16   0  2112 1032  768 R  0.3  0.1   0:00.02 top
    1 root      16   0   692   72   40 S  0.0  0.0   0:04.03 init
    2 root      34  19     0    0    0 S  0.0  0.0   0:00.06 ksoftirqd/0
    3 root      10  -5     0    0    0 S  0.0  0.0   0:00.00 events/0
    4 root      10  -5     0    0    0 S  0.0  0.0   0:00.00 khelper
    5 root      10  -5     0    0    0 S  0.0  0.0   0:00.00 kthread
   11 root      10  -5     0    0    0 S  0.0  0.0   0:00.00 kacpid
  618 root      10  -5     0    0    0 S  0.0  0.0   1:24.11 kblockd/0
  653 root      15   0     0    0    0 S  0.0  0.0   1:11.02 pdflush
  654 root      15   0     0    0    0 S  0.0  0.0   1:03.20 pdflush
  656 root      11  -5     0    0    0 S  0.0  0.0   0:00.00 aio/0
  655 root      16   0     0    0    0 S  0.0  0.0   5:48.75 kswapd0
 1249 root      10  -5     0    0    0 S  0.0  0.0   0:00.00 kseriod
 1371 root      10  -5     0    0    0 S  0.0  0.0   0:00.00 ata/0
 1376 root      22   0     0    0    0 S  0.0  0.0   0:00.00 scsi_eh_0
 1377 root      23   0     0    0    0 S  0.0  0.0   0:00.00 scsi_eh_1
 1438 root      19   0     0    0    0 S  0.0  0.0   0:00.00 scsi_eh_2
 1439 root      20   0     0    0    0 S  0.0  0.0   0:00.00 scsi_eh_3
 1506 root      15   0     0    0    0 S  0.0  0.0   6:15.41 md1_raid1
 1507 root      15   0     0    0    0 S  0.0  0.0   0:00.15 md0_raid1
 1516 root      15   0     0    0    0 S  0.0  0.0   7:53.11 kjournald
 2435 root      12  -4  2040  436  380 S  0.0  0.0   0:00.97 udevd
 2798 root      20   0     0    0    0 S  0.0  0.0   0:00.00 shpchpd_event
 2836 root      10  -5     0    0    0 S  0.0  0.0   0:00.00 khubd
 4333 messageb  16   0  3536  748  636 S  0.0  0.1   0:11.98 dbus-daemon
 4897 root      16   0  1520  344  304 S  0.0  0.0   0:00.04 dhcpcd
 5134 root      16   0  1492  300  296 S  0.0  0.0   0:00.00 acpid
 5352 root      16   0  4704  648  540 S  0.0  0.1   0:00.10 sshd
 5437 root      16   0 20144 1280  876 S  0.0  0.1   3:57.24 nscd
 5751 postgres  16   0 19288  508  460 S  0.0  0.0   0:00.41 postmaster
 5769 postgres  16   0 19420  572  500 S  0.0  0.1   0:01.36 postmaster
 5770 postgres  16   0 10204  472  448 S  0.0  0.0   0:00.12 postmaster
 5771 postgres  16   0  9332  440  436 S  0.0  0.0   0:00.00 postmaster
 6145 root      16   0  1560  312  272 S  0.0  0.0   0:00.57 mdadm
 6155 root      16   0  4912  908  676 S  0.0  0.1   0:04.07 hald
 6170 root      16   0  1792  280  276 S  0.0  0.0   0:00.00 hald-addon-acpi
 6216 root      16   0  4244  668  580 S  0.0  0.1   0:02.82 powersaved
 6243 root      18   0  1932  288  284 S  0.0  0.0   0:00.00 mingetty
 6244 root      15   0  1500  272  268 S  0.0  0.0   0:00.00 agetty
25136 root      15   0  2120  700  504 S  0.0  0.1   0:53.76 syslog-ng
25139 root      15   0  1628  488  308 S  0.0  0.0   0:00.00 klogd
 4802 named     17   0 32048 2904 1784 S  0.0  0.3   3:21.60 named
  920 root      16   0  1784  488  420 S  0.0  0.0   0:00.31 cron
18326 root      16   0 28420 4932 1276 S  0.0  0.5   0:12.64 spamd

Code:
/usr/bin # ps aux
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.0    692    72 ?        S    Mar18   0:04 init [3]
root         2  0.0  0.0      0     0 ?        SN   Mar18   0:00 [ksoftirqd/0]
root         3  0.0  0.0      0     0 ?        S<   Mar18   0:00 [events/0]
root         4  0.0  0.0      0     0 ?        S<   Mar18   0:00 [khelper]
root         5  0.0  0.0      0     0 ?        S<   Mar18   0:00 [kthread]
root        11  0.0  0.0      0     0 ?        S<   Mar18   0:00 [kacpid]
root       618  0.0  0.0      0     0 ?        S<   Mar18   1:24 [kblockd/0]
root       653  0.0  0.0      0     0 ?        S    Mar18   1:11 [pdflush]
root       654  0.0  0.0      0     0 ?        S    Mar18   1:03 [pdflush]
root       656  0.0  0.0      0     0 ?        S<   Mar18   0:00 [aio/0]
root       655  0.0  0.0      0     0 ?        S    Mar18   5:48 [kswapd0]
root      1249  0.0  0.0      0     0 ?        S<   Mar18   0:00 [kseriod]
root      1371  0.0  0.0      0     0 ?        S<   Mar18   0:00 [ata/0]
root      1376  0.0  0.0      0     0 ?        S    Mar18   0:00 [scsi_eh_0]
root      1377  0.0  0.0      0     0 ?        S    Mar18   0:00 [scsi_eh_1]
root      1438  0.0  0.0      0     0 ?        S    Mar18   0:00 [scsi_eh_2]
root      1439  0.0  0.0      0     0 ?        S    Mar18   0:00 [scsi_eh_3]
root      1506  0.0  0.0      0     0 ?        S    Mar18   6:15 [md1_raid1]
root      1507  0.0  0.0      0     0 ?        S    Mar18   0:00 [md0_raid1]
root      1516  0.0  0.0      0     0 ?        S    Mar18   7:53 [kjournald]
root      2435  0.0  0.0   2040   436 ?        S<s  Mar18   0:00 /sbin/udevd --daemon --stop-exec-queue
root      2798  0.0  0.0      0     0 ?        S    Mar18   0:00 [shpchpd_event]
root      2836  0.0  0.0      0     0 ?        S<   Mar18   0:00 [khubd]
100       4333  0.0  0.0   3536   748 ?        Ss   Mar18   0:11 /usr/bin/dbus-daemon --system
root      4897  0.0  0.0   1520   344 ?        Ss   Mar18   0:00 /sbin/dhcpcd -C -H -D -N -t 999999 -h h1020907 -c /etc/sysconfig/network/scripts/dhcpcd-hook
root      5134  0.0  0.0   1492   300 ?        Ss   Mar18   0:00 /usr/sbin/acpid
root      5352  0.0  0.0   4704   648 ?        Ss   Mar18   0:00 /usr/sbin/sshd -o PidFile=/var/run/sshd.init.pid
root      5437  0.0  0.1  20144  1280 ?        Ssl  Mar18   3:57 /usr/sbin/nscd
postgres  5751  0.0  0.0  19288   508 ?        S    Mar18   0:00 /usr/bin/postmaster -D /var/lib/pgsql/data
postgres  5769  0.0  0.0  19420   572 ?        S    Mar18   0:01 postgres: writer process
postgres  5770  0.0  0.0  10204   472 ?        S    Mar18   0:00 postgres: stats buffer process
postgres  5771  0.0  0.0   9332   440 ?        S    Mar18   0:00 postgres: stats collector process
root      6145  0.0  0.0   1560   312 ?        S    Mar18   0:00 /sbin/mdadm -F /dev/md0 /dev/md1 -d 60 -m root@localhost -s -c /etc/mdadm.conf
root      6155  0.0  0.0   4912   908 ?        Ss   Mar18   0:04 /usr/sbin/hald --daemon=yes --retain-privileges
root      6170  0.0  0.0   1792   280 ?        S    Mar18   0:00 hald-addon-acpi
root      6216  0.0  0.0   4244   668 ?        S    Mar18   0:02 /usr/sbin/powersaved -d -f /var/run/acpid.socket -v 3
root      6243  0.0  0.0   1932   288 tty1     Ss+  Mar18   0:00 /sbin/mingetty --noclear tty1
root      6244  0.0  0.0   1500   272 ttyS0    Ss+  Mar18   0:00 /sbin/agetty -L 57600 ttyS0
root     25136  0.0  0.0   2120   700 ?        Ss   Mar28   0:53 /sbin/syslog-ng
root     25139  0.0  0.0   1628   488 ?        Ss   Mar28   0:00 /sbin/klogd -c 1 -x -x
named     4802  0.0  0.2  32048  2904 ?        Ssl  Apr09   3:21 /usr/sbin/named -t /var/lib/named -u named
root       920  0.0  0.0   1784   488 ?        Ss   Apr22   0:00 /usr/sbin/cron
root     18326  0.0  0.4  28420  4932 ?        Ss   May16   0:12 /usr/sbin/spamd --username=popuser --daemonize --nouser-config --helper-home-dir=/var/qmail -
root     18417  0.0  0.0   2796   420 ?        S    May16   0:00 /usr/lib/courier-imap/couriertcpd -address=0 -stderrlogger=/usr/sbin/courierlogger -stderrlog
root     18419  0.0  0.0   2696   428 ?        S    May16   0:00 /usr/sbin/courierlogger imapd
root     18428  0.0  0.0   2788   352 ?        S    May16   0:00 /usr/lib/courier-imap/couriertcpd -address=0 -stderrlogger=/usr/sbin/courierlogger -stderrlog
root     18434  0.0  0.0   2560   244 ?        S    May16   0:00 /usr/sbin/courierlogger imapd-ssl
root     18437  0.0  0.0   2788   416 ?        S    May16   0:00 /usr/lib/courier-imap/couriertcpd -address=0 -stderrlogger=/usr/sbin/courierlogger -stderrlog
root     18442  0.0  0.0   2692   428 ?        S    May16   0:00 /usr/sbin/courierlogger pop3d
root     18447  0.0  0.0   2788   352 ?        S    May16   0:00 /usr/lib/courier-imap/couriertcpd -address=0 -stderrlogger=/usr/sbin/courierlogger -stderrlog
root     18451  0.0  0.0   2564   244 ?        S    May16   0:00 /usr/sbin/courierlogger pop3d-ssl
qmails   18510  0.0  0.0   1536   364 ?        S    May16   0:10 qmail-send
qmaill   18512  0.0  0.0   1496   344 ?        S    May16   0:01 splogger qmail
root     18513  0.0  0.0   1524   264 ?        S    May16   0:01 qmail-lspawn ./Maildir/
qmailr   18514  0.0  0.0   2048   792 ?        S    May16   0:00 qmail-rspawn
qmailq   18515  0.0  0.0   1484   236 ?        S    May16   0:00 qmail-clean
ts       25637  0.3  0.5  64268  5916 ?        SNl  May17  85:57 ./server_linux -PID=tsserver2.pid
root     27559  0.0  0.0   2360   520 ?        Ss   May17   0:03 /usr/sbin/xinetd
root     28175  0.0  0.5  36768  5420 ?        Ss   Mar28   0:00 /usr/local/psa/admin/bin/httpsd
psaadm   14668  0.0  2.3  43788 24484 ?        S    Jun03   0:00 /usr/local/psa/admin/bin/httpsd
psaadm   14669  0.0  1.5  41124 15560 ?        S    Jun03   0:00 /usr/local/psa/admin/bin/httpsd
ntp      17233  0.0  0.3   4136  4136 ?        SLs  Jun03   0:00 /usr/sbin/ntpd -p /var/lib/ntp/var/run/ntp/ntpd.pid -u ntp -i /var/lib/ntp
popuser  11083  0.0  2.2  31564 23632 ?        S    07:01   0:15 spamd child
root     29344  0.0  1.1  95628 12412 ?        Ss   17:13   0:02 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
popuser  29641  0.0  1.8  29076 19212 ?        S    17:18   0:00 spamd child
root      5743  0.0  0.1   2488  1220 ?        S    18:11   0:00 /bin/sh /usr/bin/mysqld_safe --user=mysql --pid-file=/var/lib/mysql/mysqld.pid --socket=/var/
mysql     5788  4.6  9.5 161772 98340 ?        Sl   18:11   9:10 /usr/sbin/mysqld-max --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib
wwwrun    9992  0.7  2.0  96124 21012 ?        S    21:03   0:10 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
root     10050  0.0  0.2   9760  2620 ?        Ss   21:06   0:00 sshd: root@pts/0
root     10053  0.0  0.1   4132  1848 pts/0    Ss   21:06   0:00 -bash
root     10076  0.0  0.2   9548  2636 ?        Ss   21:06   0:00 sshd: root@notty
root     10079  0.0  0.1   4636  1348 ?        Ss   21:06   0:00 /usr/lib/ssh/sftp-server
skep     11170  0.2  0.2   7252  3104 ?        Ss   21:13   0:02 proftpd: skep - 217.228.227.8: IDLE
wwwrun   11270  1.4  2.0  96124 21688 ?        S    21:15   0:10 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
wwwrun   11322  1.3  2.2  96144 22792 ?        S    21:17   0:07 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
wwwrun   11385  1.7  2.0  96392 20836 ?        S    21:18   0:08 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
wwwrun   11396  2.6  1.9  96172 19716 ?        S    21:19   0:12 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
wwwrun   11403  1.4  1.9  96132 20368 ?        S    21:19   0:06 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
wwwrun   11418  1.2  1.6  96300 17536 ?        S    21:20   0:05 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
wwwrun   11433  1.1  1.8  96120 18960 ?        S    21:21   0:04 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
wwwrun   11440  0.7  1.7  96392 17952 ?        S    21:21   0:02 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
wwwrun   11456  1.6  2.6 105112 27224 ?        S    21:23   0:04 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
wwwrun   11457  1.0  1.7  96252 17768 ?        S    21:23   0:02 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
wwwrun   11469  0.6  1.5  96064 16044 ?        S    21:24   0:01 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
wwwrun   11475  0.3  1.6  96052 16828 ?        S    21:24   0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
wwwrun   11478  1.1  1.9  96276 19728 ?        S    21:24   0:01 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
wwwrun   11488  2.5  1.6  96080 16812 ?        S    21:24   0:04 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
wwwrun   11489  1.4  1.6  96244 17516 ?        S    21:24   0:02 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
wwwrun   11491  1.5  1.7  96060 17776 ?        S    21:24   0:02 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
wwwrun   11493  2.3  1.6  96216 17484 ?        S    21:24   0:04 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
wwwrun   11494  0.2  1.6  96124 17156 ?        S    21:24   0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
wwwrun   11501  0.7  1.6  96136 17048 ?        S    21:24   0:01 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
wwwrun   11504  1.7  2.0  96324 20792 ?        S    21:24   0:02 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
wwwrun   11511  0.8  2.6 107764 27236 ?        R    21:26   0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
wwwrun   11513  0.7  2.5 105984 26380 ?        S    21:26   0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
qmaild   11515  0.0  0.0   2696   680 ?        Ss   21:26   0:00 /var/qmail/bin/qmail-smtpd /var/qmail/bin/smtp_auth /var/qmail/bin/true /var/qmail/bin/cmd5ch
wwwrun   11517  0.0  1.2  95900 13208 ?        S    21:26   0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
wwwrun   11519  1.9  1.6  96228 16984 ?        S    21:26   0:01 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
wwwrun   11520  0.0  1.2  95900 13208 ?        S    21:26   0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
wwwrun   11521  0.0  1.2  95764 12560 ?        S    21:26   0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
wwwrun   11522  0.0  1.2  95900 13208 ?        S    21:26   0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
wwwrun   11524  0.0  1.2  95764 12560 ?        S    21:26   0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
wwwrun   11525  1.0  1.5  96032 15900 ?        S    21:26   0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
wwwrun   11526  2.5  1.6  96060 17172 ?        S    21:26   0:01 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
wwwrun   11527  1.0  1.5  96072 15912 ?        S    21:26   0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
wwwrun   11528  1.2  1.5  96028 15980 ?        S    21:26   0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
wwwrun   11529  0.3  1.5  96012 16436 ?        S    21:26   0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
wwwrun   11530  1.1  1.6  96052 16728 ?        S    21:26   0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
root     11535  0.0  0.0   2752   824 pts/0    R+   21:27   0:00 ps aux

Code:
# prefork MPM
<IfModule prefork.c>
	# number of server processes to start
	# http://httpd.apache.org/docs/2.2/mod/mpm_common.html#startservers
	StartServers         10
	# minimum number of server processes which are kept spare
	# http://httpd.apache.org/docs/2.2/mod/prefork.html#minspareservers
	MinSpareServers      10
	# maximum number of server processes which are kept spare
	# http://httpd.apache.org/docs/2.2/mod/prefork.html#maxspareservers
	MaxSpareServers     20
	# highest possible MaxClients setting for the lifetime of the Apache process.
	# http://httpd.apache.org/docs/2.2/mod/mpm_common.html#serverlimit
	ServerLimit        150
	# maximum number of server processes allowed to start
	# http://httpd.apache.org/docs/2.2/mod/mpm_common.html#maxclients
	MaxClients         150
	# 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 500

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

Code:
# The MySQL server
[mysqld]
set-variable=local-infile=0
port		= 3306
socket		= /var/lib/mysql/mysql.sock
old-passwords
skip-locking
skip-bdb
log_slow_queries
long_query_time = 2
max_connections = 100
max_allowed_packet = 16M
tmp_table_size = 128M
table_cache = 1024
thread_cache_size = 512
thread_concurrency = 8
key_buffer_size = 64M
sort_buffer_size      = 2M
join_buffer_size      = 2M
read_buffer_size      = 2M
read_rnd_buffer_size  = 4M 
net_buffer_length = 8K
myisam_sort_buffer_size = 32M
query_cache_type = 1
query_cache_size = 32M
query_cache_limit = 2M
wait_timeout = 150
connect_timeout = 15

Ich hatte schon mit dem tuning-prime.sh Script, dass hier neulich jmd gepostet hat die mysql-config den Vorschlägen angepasst. Da hatte ich vorher einen keybuffer von 128 und max connections 500, der buffer war aber nie so stark benötigt und die connections nicht mal annähernd in dem Bereich laut dem Script. Mysql scheint aber nicht das Problem zu sein, denn es sind eher Apache-Prozesse, die ab & zu mal 80% CPU verbrauchen.

(selbsttest United-Forum - Powered by vBulletin)

Tipps? Ich weiß einfach nicht an was es liegt - es könnte zeitlich im Zusammenhang mit dem Upgrade von Apache 2.0 auf 2.2 gekommen sein, leider ist es mir aber erst jetzt wirklich aufgefallen, so dass ich nicht sagen kann, ob es wirklich mit dem Upgrade kam...

Hier mal noch die Ausgabe von mod_status...da sehe ich jetzt nichts richtiges, außer, dass einfach alles zu lange dauert?

Code:
Srv	PID	Acc	M	CPU 	SS	Req	Conn	Child	Slot	Client	VHost	Request
0-8	15352	9/153/354	K 	9.32	8	0	0.0	0.92	1.73 	85.181.183.192	united-forum.de	GET /images/styles/standard/statusicon/thread_lock.gif HTTP/1.1
1-8	15367	7/181/291	K 	8.76	8	0	0.0	1.10	1.52 	85.181.183.192	united-forum.de	GET /images/styles/standard/statusicon/thread_lock.gif HTTP/1.1
2-8	15369	4/217/284	K 	9.02	3	0	0.0	0.75	2.21 	84.145.107.185	united-forum.de	GET /images/styles/scrin/buttons/printer.gif HTTP/1.1
3-8	15565	6/29/379	K 	0.99	8	0	0.0	0.03	1.55 	85.181.183.192	united-forum.de	GET /images/styles/standard/statusicon/thread_moved_new.gif HTT
4-8	15347	2/244/400	K 	17.51	3	0	0.0	1.81	2.53 	84.145.107.185	united-forum.de	GET /images/icons/gdi/5.png HTTP/1.1
5-8	15608	0/0/297	_ 	6.42	4	0	0.0	0.00	1.49 	::1	h1020907.serverkompetenz.net	GET / HTTP/1.0
6-8	15368	0/360/441	_ 	6.74	2	0	0.0	1.11	1.34 	84.172.143.94	united-forum.de	GET /images/styles/standard/buttons/collapse_thead.gif HTTP/1.1
7-8	15361	7/182/387	W 	5.84	0	0	147.8	1.56	2.56 	84.174.93.6	united-forum.de	GET /server-status HTTP/1.1
8-8	15371	4/395/526	K 	14.76	3	0	0.0	1.50	2.16 	84.145.107.185	united-forum.de	GET /images/styles/scrin/statusicon/user_online.gif HTTP/1.1
9-8	15362	1/189/315	K 	7.64	7	2166	19.8	0.94	1.45 	84.141.85.30	united-forum.de	GET /forumdisplay.php?f=585 HTTP/1.1
10-8	15372	0/271/389	_ 	8.53	1	0	0.0	1.06	1.42 	84.172.143.94	united-battlezone.de	GET /images/advertisment/link_03.gif HTTP/1.1
11-8	15348	2/161/252	K 	11.36	2	736	51.6	1.05	1.88 	217.228.254.179	skep.united-forum.de	GET /shhh/blog/rarskep/bigimages/rarskep008.jpg HTTP/1.1
12-8	15373	6/165/267	K 	8.10	8	0	0.0	1.00	1.66 	85.181.183.192	united-forum.de	GET /images/styles/standard/statusicon/thread_dot_lock.gif HTTP
13-8	15560	4/38/289	K 	1.14	3	0	0.0	0.08	1.46 	84.145.107.185	united-forum.de	GET /images/stars/3_1.gif HTTP/1.1
14-8	15349	1/214/358	K 	7.80	7	0	0.3	0.87	1.41 	89.245.149.106	ubz-tourney.com	GET /ad/ad1.gif HTTP/1.1
15-8	15346	1/226/338	K 	6.94	0	0	0.3	0.68	1.17 	89.49.24.153	ubz-tourney.com	GET /ad/ad1.gif HTTP/1.1
16-8	15375	1/272/445	K 	9.75	6	0	2.7	1.44	2.14 	89.245.149.106	united-battlezone.de	GET /ad/ad1.gif HTTP/1.1
17-8	15350	0/137/293	_ 	8.32	1	0	0.0	1.18	1.90 	77.2.79.98	united-forum.de	GET /images/avatars/Multimedia/Indiana%20Jones.jpg HTTP/1.1
18-8	15366	3/246/428	K 	16.68	2	937	28.3	1.08	1.87 	87.234.141.244	united-forum.de	GET /private.php?do=newpm&u=6106 HTTP/1.1
19-8	15376	7/162/319	K 	13.01	8	0	0.0	1.49	2.15 	85.181.183.192	united-forum.de	GET /images/styles/standard/buttons/collapse_thead.gif HTTP/1.1
20-8	15561	4/45/309	K 	1.12	3	0	0.0	0.27	1.70 	84.145.107.185	united-forum.de	GET /images/styles/scrin/buttons/sendtofriend.gif HTTP/1.1
21-8	15378	316/405/549	K 	74.68	1	114	1701.8	2.24	3.04 	66.249.73.145	united-forum.de	GET /showpost.php?p=817240&postcount=4791 HTTP/1.1
22-8	15379	1/247/348	K 	8.74	0	0	2.7	0.74	0.96 	89.49.24.153	united-battlezone.de	GET /ad/ad1.gif HTTP/1.1
23-8	15363	0/167/321	_ 	6.46	1	1	0.0	0.62	1.22 	84.174.93.6	testforum.united-forum.de	GET /images/styles/standard/spacer.gif HTTP/1.1
24-8	15380	0/159/258	_ 	7.02	1	0	0.0	0.82	1.37 	84.174.93.6	testforum.united-forum.de	GET /images/styles/default/misc/navbits_start.gif HTTP/1.1
25-8	15562	0/37/407	_ 	2.33	2	0	0.0	0.26	1.56 	84.172.143.94	ubz-tourney.com	GET /images/advertisment/link_03.gif HTTP/1.1
26-8	15381	0/178/253	_ 	10.57	1	0	0.0	1.28	1.57 	84.174.93.6	testforum.united-forum.de	GET /images/styles/default/misc/menu_open.gif HTTP/1.1
27-8	15382	6/142/255	K 	9.42	8	0	0.0	0.75	1.29 	85.181.183.192	united-forum.de	GET /images/smilies/TW/gdi.png HTTP/1.1
28-8	15383	7/210/317	K 	18.10	3	0	0.0	1.39	1.81 	84.145.107.185	united-forum.de	GET /images/styles/scrin/buttons/collapse_thead.gif HTTP/1.1
29-8	15384	0/331/509	_ 	6.11	1	191	0.0	1.36	2.01 	84.174.93.6	testforum.united-forum.de	GET /forumdisplay.php HTTP/1.1
30-8	15353	7/356/434	K 	10.38	7	0	0.0	1.02	1.66 	85.181.183.192	united-forum.de	GET /images/styles/standard/statusicon/thread_dot.gif HTTP/1.1
31-8	15385	8/187/272	K 	7.18	8	0	21.9	3.32	3.77 	85.181.183.192	united-forum.de	GET /clientscript/vbulletin_read_marker.js?v=367 HTTP/1.1
32-8	15386	2/247/353	K 	8.13	6	0	24.5	0.85	1.36 	87.168.224.214	united-forum.de	GET /images/smilies/wow.gif HTTP/1.1
33-8	15387	4/180/267	K 	6.50	3	0	0.0	1.17	1.34 	84.145.107.185	united-forum.de	GET /images/smilies/winkie.gif HTTP/1.1
34-8	15468	0/274/354	_ 	5.90	1	15	0.0	1.05	1.36 	84.174.93.6	testforum.united-forum.de	GET /images/styles/standard/topvb3twkane.jpg HTTP/1.1
35-8	15471	0/223/291	_ 	7.07	6	713	0.0	1.01	1.36 	84.156.209.214	united-forum.de	GET /tools/dynsig/dynsig.php?style=gdi&user=Sera&ladder=-Sera-
36-8	15477	0/159/226	_ 	5.08	1	0	0.0	0.50	0.89 	84.172.143.94	united-forum.de	GET /favicon.ico HTTP/1.1
37-8	15495	2/143/167	K 	7.75	3	0	0.0	0.50	0.60 	84.145.107.185	united-forum.de	GET /images/icons/scrin/2.png HTTP/1.1
38-8	15354	9/119/184	K 	8.53	6	103	74.7	1.26	1.53 	87.168.224.214	united-forum.de	GET /attachment.php?attachmentid=17921&stc=1&thumb=1&d=11807405
39-8	15563	0/23/121	_ 	1.59	2	0	0.0	0.30	0.77 	84.172.143.94	united-forum.de	GET /images/styles/standard/buttons/printer.gif HTTP/1.1
40-8	15609	0/0/179	_ 	1.26	3	113	0.0	0.00	0.57 	66.249.73.145	united-forum.de	GET /showpost.php?p=179640&postcount=65 HTTP/1.1
41-8	15355	0/220/308	_ 	9.18	1	0	0.0	1.11	1.46 	77.2.79.98	united-forum.de	GET /images/icons/nod/1.png HTTP/1.1
42-8	15356	10/262/291	K 	8.82	7	0	0.0	1.14	1.30 	85.181.183.192	united-forum.de	GET /images/styles/standard/buttons/collapse_thead.gif HTTP/1.1
43-8	15357	6/216/290	K 	7.59	2	612	38.7	1.57	1.72 	84.145.107.185	united-forum.de	GET /tools/dynsig/dynsig.php?style=scrin_crash&user=stefros&lad
44-8	15358	1/223/240	K 	9.20	2	0	8.9	1.13	1.17 	87.234.141.244	united-forum.de	GET /clientscript/vbulletin_ajax_namesugg.js?v=367 HTTP/1.1
45-8	15610	0/0/159	_ 	11.18	3	0	0.0	0.00	0.73 	::1	h1020907.serverkompetenz.net	GET / HTTP/1.0
46-8	15360	8/312/316	K 	16.29	8	0	20.5	3.14	3.17 	85.181.183.192	united-forum.de	GET /images/styles/standard/statusicon/thread_hot.gif HTTP/1.1
47-8	15364	2/220/252	K 	9.38	3	0	0.0	1.52	1.59 	84.145.107.185	united-forum.de	GET /customavatars/avatar2247_1.gif HTTP/1.1
48-8	15611	0/0/5	_ 	0.00	2	0	0.0	0.00	0.06 	::1	h1020907.serverkompetenz.net	GET / HTTP/1.0
49-8	15612	0/0/41	_ 	0.41	2	0	0.0	0.00	0.12 	85.179.89.130	united-forum.de	GET /favicon.ico HTTP/1.1
50-8	15613	0/0/38	_ 	0.19	2	236	0.0	0.00	0.06 	38.99.13.122	united-forum.de	GET /misc.php?do=whoposted&t=54909 HTTP/1.0
51-8	15614	0/0/19	_ 	0.00	2	0	0.0	0.00	0.03 	::1	h1020907.serverkompetenz.net	GET / HTTP/1.0
52-6	-	0/0/22	. 	0.01	1157	0	0.0	0.00	0.17 	85.179.89.130	united-forum.de	GET /images/styles/standard/gradients/gradient_thead.gif HTTP/1
53-6	-	0/0/30	. 	0.00	1157	0	0.0	0.00	0.02 	217.86.32.253	ubz-tourney.com	GET /ad/ad1.gif HTTP/1.1
54-6	-	0/0/12	. 	0.55	1157	0	0.0	0.00	0.17 	91.64.121.106	united-forum.de	GET /customavatars/avatar16894_1.gif HTTP/1.1
55-6	-	0/0/4	. 	0.00	1157	0	0.0	0.00	0.03 	217.86.32.253	united-battlezone.de	GET /ad/ad1.gif HTTP/1.1
56-6	-	0/0/47	. 	0.02	1157	0	0.0	0.00	0.23 	91.64.121.106	united-forum.de	GET /images/smilies/TW/nod.png HTTP/1.1
57-6	-	0/0/14	. 	0.00	1173	0	0.0	0.00	0.36 	::1	h1020907.serverkompetenz.net	GET / HTTP/1.0
58-6	-	0/0/24	. 	0.61	1144	0	0.0	0.00	0.15 	201.19.72.22	united-forum.de	GET /images/styles/standard/gradients/gradient_thead.gif HTTP/1
59-6	-	0/0/4	. 	0.00	1157	0	0.0	0.00	0.03 	84.173.81.235	ubz-tourney.com	GET /ad/ad1.gif HTTP/1.1
60-5	-	0/0/50	. 	1.21	1199	0	0.0	0.00	0.18 	87.181.77.199	united-forum.de	GET /images/stars/1_5.gif HTTP/1.1
61-5	-	0/0/51	. 	0.71	1220	0	0.0	0.00	0.16 	87.168.246.250	united-forum.de	GET /images/styles/standard/buttons/sendtofriend.gif HTTP/1.1
62-5	-	0/0/51	. 	1.05	1220	0	0.0	0.00	0.25 	87.168.246.250	united-forum.de	GET /images/styles/standard/buttons/subscribe.gif HTTP/1.1
63-5	-	0/0/19	. 	0.93	1220	0	0.0	0.00	0.19 	88.199.79.41	united-forum.de	GET /images/styles/standard/gradients/gradient_tcat.gif HTTP/1.
64-5	-	0/0/12	. 	2.23	1206	71	0.0	0.00	0.09 	91.65.26.9	united-forum.de	GET /tools/dynsig/dynsig.php?style=scrin_crash&user=stefros&lad
65-5	-	0/0/1	. 	0.00	1265	0	0.0	0.00	0.00 	::1	h1020907.serverkompetenz.net	GET / HTTP/1.0
66-5	-	0/0/2	. 	0.26	1232	0	0.0	0.00	0.01 	::1	h1020907.serverkompetenz.net	GET / HTTP/1.0
67-5	-	0/0/11	. 	0.00	1208	48	0.0	0.00	0.01 	83.83.236.75	united-forum.de	GET /customavatars/avatar14156_1.gif HTTP/1.1
68-5	-	0/0/1	. 	0.00	1265	0	0.0	0.00	0.00 	::1	h1020907.serverkompetenz.net	GET / HTTP/1.0
69-5	-	0/0/8	. 	0.00	1208	0	0.0	0.00	0.00 	80.130.237.62	united-forum.de	GET /images/styles/default/posticons/up.gif HTTP/1.1
70-5	-	0/0/8	. 	0.41	1208	0	0.0	0.00	0.02 	80.130.237.62	united-forum.de	GET /images/styles/standard/statusicon/thread_dot_hot_new.gif H

edit2:

Was ich jetzt auch einmal live beobachten konnte war ein "großer Lag" - also es ging 20-30 Sekunden gar nichts. Und in der Zeit stand der mysql Dienst einfach bei 95%CPU Last - als das vorbei war, ging er wieder auf normal zurück und es ging alles weiter..
Der Slow-Query log hilft mir nicht, weil da zwar einige Sachen drin stehen, aber total verschiedene, also nichts wo ich erkennen könnte, dass ein kaputtes Script dabei ist..
Hab den mysqld-max jetzt mal entfernt, weil ich nicht wüsste wozu ich ihn brauche - das entschlackt vielleicht etwas, ändert aber leider nichts daran, dass es ja vorher auch schon mit dem max mal gut funktioniert hat.


edit3:

Ich habe jetzt eine Tabelle mit ~20MB Überhang gefunden (postparsed), was vielleicht mit einem Script zusammenhängt, das in unserem VBulletin Forum bestimmte Anhänge (Replays aus Spielen) in eine besondere Darstellungsform bringt. Ich habe das Parsen der Beiträge mal abgeschaltet bis ich den Coder des Scripts finde. Mal sehen ob das etwas ändert.
 
Last edited by a moderator:
my.cnf Variables
Code:
thread_cache_size = 512
sagt tuning-primer.sh Script, dass du soviel benötigst?

httpd verursacht CPU load

ändere mal in der /etc/apache2/server-tuning.conf
Code:
MaxKeepAliveRequests 1000
KeepAliveTimeout 2
das spart schonmal RAM + Prozesse

evtl. profitierst du auch davon, wenn du
Code:
StartServers         5
	# minimum number of server processes which are kept spare
	# http://httpd.apache.org/docs/2.2/mod/prefork.html#minspareservers
	MinSpareServers      5
	# maximum number of server processes which are kept spare
	# http://httpd.apache.org/docs/2.2/mod/prefork.html#maxspareservers
	MaxSpareServers     10
	# highest possible MaxClients setting for the lifetime of the Apache process.
	# http://httpd.apache.org/docs/2.2/mod/mpm_common.html#serverlimit
	ServerLimit        150
	# maximum number of server processes allowed to start
	# http://httpd.apache.org/docs/2.2/mod/mpm_common.html#maxclients
	MaxClients         50
verwendest. Das würde ich nach der KeepAliveTimeout Änderung mal testen.
 
Last edited by a moderator:
Sehr komisch, ich habe recht viel durchprobiert (auch das von dir) und es brachte keine Änderung. Dann habe ich den VBulletin-internen Beitragscache deaktiviert, der Beiträge vor-parsed und in einer seperaten Tabelle speichert (die Tabelle hatte über 20MB an Überhang, daher wurde ich erst darauf aufmerksam).

Jetzt ist die Last enorm gesunken (von 5-8 auf 1-2), was ich mir nicht wirklich erklären kann, weil das ganze früher funktioniert hat. Im VB-Supportforum hatte man leider keinen besseren Tipp, als dass ich es deaktiviert lassen soll, wenn ich damit eine niedrigere Last habe - nur schade, weil halt die Funktion _eigentlich_ Last einspart und nur etwas mehr Platz in der Datenbank benötigt wird.

Aber nunja, bis auf weiteres ist das erstmal ein passabler work-around.
 
Back
Top