Langsamer RootDS & Seitenaufbau (langes Topic!)

B

BiBS0N

Guten Tag,
Ich habe seit einem Monat einen RootDS bei webperoni gemietet.
Darauf laufen sollen 2 Oscommerce Shops und mehrere statische Websites.

Vor dem RootDS hatte ich den größten vServer bei webperoni, der war mir aber nach einiger Zeit zu langsam (als das Hosting der Shops begann).

Nach updaten auf den RootDS und meinen Konfiguartionsänderungen lief alles top, der Seitenaufbau war schnell, alles so wie es sein sollte!
Doch nach nach einiger Zeit wurde der Server immer langsamer und langsamer...

Wenn ich mich über putty einlogge, sieht das folgendermaßen aus:
Login: (userohneRechte) [ENTER]
5sekunden warten
Passwort: PWeingabe [ENTER]
15-30 Sekunden warten,dann wird endlich bestätigt, dass ich eingeloggt bin
su root
Das WarteSpiel geht von vorne los...


Die gehosteten Webseiten dauern ewig zum Laden, eine normale statische HTML Seite dauert ca. 3 Sekunden, der osC-Shop ca. 10 Sekunden.

ein "you" dauert mehrere Minuten bis sich yast öffnet, dann nochmal mehrere Minuten bis yast die Module geladen hat...


Eine top Ausgabe dauert ewig lange... Normalerweise müsste es ja sofort nach dem bestätigen auf dem Bildschirm erscheinen..
Kurz nach dem einloggen habe ich einen Load Average von > 1.00 und der wait schwankt von 0-40%
Beobachte ich die top Ausgabe mehrere Minuten, sinken die Werte wieder, sodass sich folgendes Bild ergibt:

Code:
top - 14:05:10 up 7 days, 22:51,  1 user,  load average: 0.00, 0.02, 0.06
Tasks:  39 total,   1 running,  38 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.1% us,  0.0% sy,  0.0% ni, 97.3% id,  2.5% wa,  0.0% hi,  0.0% si
Mem:   4028380k total,  4012984k used,    15396k free,    36860k buffers
Swap: 10482404k total,  1344604k used,  9137800k free,   571872k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
    1 root      16   0   640  280  240 S    0  0.0   0:00.06 init
 3103 root      12  -4  1708  524  416 S    0  0.0   0:00.00 udevd
13844 messageb  16   0  3340  852  728 S    0  0.0   0:00.01 dbus-daemon
13927 root      16   0  3136 1364 1236 S    0  0.0   0:00.00 hald
15989 root      16   0  1512  580  504 S    0  0.0   0:03.31 syslogd
17559 root      18   0  4376  636  608 S    0  0.0   0:00.00 saslauthd
17830 root      16   0  2972  652  568 S    0  0.0   0:00.00 couriertcpd
17920 root      18   0  4376  316  252 S    0  0.0   0:00.00 saslauthd
18036 root      17   0  2876  796  688 S    0  0.0   0:00.00 courierlogger
18160 root      19   0  2968  668  564 S    0  0.0   0:00.00 couriertcpd
18258 root      18   0  2744  696  548 S    0  0.0   0:00.00 courierlogger
19533 root      18   0  2968  588  564 S    0  0.0   0:00.00 couriertcpd
22091 root      16   0  2144  788  708 S    0  0.0   0:00.43 xinetd
22113 root      18   0  2740  684  548 S    0  0.0   0:00.00 courierlogger
22352 root      18   0  2968  572  564 S    0  0.0   0:00.00 couriertcpd
23581 root      18   0  2744  608  548 S    0  0.0   0:00.00 courierlogger
26205 named     20   0 36668 2256 1752 S    0  0.1   0:00.04 named
26505 root      16   0  4852  856  764 S    0  0.0   0:00.00 sshd
15508 root      16   0  1728  684  572 S    0  0.0   0:00.06 cron
 9451 root      16   0 66720  16m 8124 S    0  0.4   0:01.39 httpd2-prefork
 9566 wwwrun    16   0 66684  10m 1744 S    0  0.3   0:00.00 httpd2-prefork
11565 root      17   0  2452 1216  980 S    0  0.0   0:00.00 mysqld_safe
11678 mysql     16   0  134m  21m 5000 S    0  0.5   0:09.73 mysqld
23951 wwwrun    16   0 67512  12m 2884 S    0  0.3   0:00.32 httpd2-prefork
24466 wwwrun    15   0 67332  12m 2880 S    0  0.3   0:00.12 httpd2-prefork
16153 wwwrun    16   0 67444  12m 2844 S    0  0.3   0:00.10 httpd2-prefork
14089 wwwrun    16   0 67268  12m 2880 S    0  0.3   0:00.08 httpd2-prefork
14095 wwwrun    16   0 68428  13m 3216 S    0  0.3   0:00.12 httpd2-prefork
14096 wwwrun    16   0 67412  12m 2884 S    0  0.3   0:00.06 httpd2-prefork
25664 wwwrun    16   0 67316  12m 2880 S    0  0.3   0:00.08 httpd2-prefork
26074 wwwrun    15   0 68500  13m 3212 S    0  0.3   0:00.33 httpd2-prefork
26214 wwwrun    15   0 68392  13m 3212 S    0  0.3   0:00.10 httpd2-prefork
26420 wwwrun    16   0 67260  12m 2880 S    0  0.3   0:00.04 httpd2-prefork
 3474 root      15   0  9364 2612 2032 S    0  0.1   0:00.03 sshd
 3770 BiBS0N    16   0  9532 1732 1140 S    0  0.0   0:00.26 sshd
 3892 BiBS0N    17   0  3492 1948 1436 S    0  0.0   0:00.05 bash
 6058 root      18   0  5536 1872 1340 S    0  0.0   0:00.12 su
 7365 root      16   0  3232 1976 1444 S    0  0.0   0:00.02 bash

ps aux liefert folgendes Bild
Code:
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.0    640   280 ?        Ss   Jan14   0:00 init [3]
root      3103  0.0  0.0   1708   524 ?        S<s  Jan14   0:00 /sbin/udevd --daemon
100      13844  0.0  0.0   3340   852 ?        Ss   Jan14   0:00 /usr/bin/dbus-daemon --system
root     13927  0.0  0.0   3136  1364 ?        Ss   Jan14   0:00 /usr/sbin/hald --daemon=yes --retain-privileges
root     15989  0.0  0.0   1512   580 ?        Ss   Jan14   0:03 /sbin/syslogd -a /var/lib/named/dev/log
root     17559  0.0  0.0   4376   636 ?        Ss   Jan14   0:00 /usr/sbin/saslauthd -n 2 -a pam
root     17830  0.0  0.0   2972   652 ?        S    Jan14   0:00 /usr/lib/courier-imap/couriertcpd -address=0 -stderrlogger=/usr/sbin/courierlogger -st
root     17920  0.0  0.0   4376   316 ?        S    Jan14   0:00 /usr/sbin/saslauthd -n 2 -a pam
root     18036  0.0  0.0   2876   796 ?        S    Jan14   0:00 /usr/sbin/courierlogger imapd
root     18160  0.0  0.0   2968   668 ?        S    Jan14   0:00 /usr/lib/courier-imap/couriertcpd -address=0 -stderrlogger=/usr/sbin/courierlogger -st
root     18258  0.0  0.0   2744   696 ?        S    Jan14   0:00 /usr/sbin/courierlogger imapd-ssl
root     19533  0.0  0.0   2968   588 ?        S    Jan14   0:00 /usr/lib/courier-imap/couriertcpd -address=0 -stderrlogger=/usr/sbin/courierlogger -st
root     22091  0.0  0.0   2144   788 ?        Ss   Jan14   0:00 /usr/sbin/xinetd
root     22113  0.0  0.0   2740   684 ?        S    Jan14   0:00 /usr/sbin/courierlogger pop3d
root     22352  0.0  0.0   2968   572 ?        S    Jan14   0:00 /usr/lib/courier-imap/couriertcpd -address=0 -stderrlogger=/usr/sbin/courierlogger -st
root     23581  0.0  0.0   2744   608 ?        S    Jan14   0:00 /usr/sbin/courierlogger pop3d-ssl
named    26205  0.0  0.0  36668  2256 ?        Ssl  Jan14   0:00 /usr/sbin/named -t /var/lib/named -u named
root     26505  0.0  0.0   4852   856 ?        Ss   Jan14   0:00 /usr/sbin/sshd -o PidFile=/var/run/sshd.init.pid
root     15508  0.0  0.0   1728   684 ?        Ss   Jan14   0:00 /usr/sbin/cron
root      9451  0.0  0.4  66720 17164 ?        Ss   Jan20   0:01 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -DSSL
wwwrun    9566  0.0  0.2  66684 10492 ?        S    Jan20   0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -DSSL
root     11565  0.0  0.0   2452  1216 ?        S    Jan20   0:00 /bin/sh /usr/bin/mysqld_safe --user=mysql --pid-file=/var/lib/mysql/mysqld.pid --socke
mysql    11678  0.0  0.5 137240 21800 ?        Sl   Jan20   0:09 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/
wwwrun   23951  0.0  0.3  67512 12656 ?        S    10:00   0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -DSSL
wwwrun   24466  0.0  0.3  67332 12560 ?        S    10:01   0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -DSSL
wwwrun   16153  0.0  0.3  67444 12532 ?        S    11:06   0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -DSSL
wwwrun   14089  0.0  0.3  67268 12440 ?        S    12:20   0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -DSSL
wwwrun   14095  0.0  0.3  68428 13964 ?        S    12:20   0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -DSSL
wwwrun   14096  0.0  0.3  67412 12564 ?        S    12:20   0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -DSSL
wwwrun   25664  0.0  0.3  67316 12544 ?        S    12:32   0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -DSSL
wwwrun   26074  0.0  0.3  68500 14032 ?        S    12:33   0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -DSSL
wwwrun   26214  0.0  0.3  68392 13908 ?        S    12:34   0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -DSSL
wwwrun   26420  0.0  0.3  67260 12468 ?        S    12:34   0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -DSSL
root      3474  0.0  0.0   9364  2612 ?        Ss   13:18   0:00 sshd: BiBS0N [priv]
BiBS0N    3770  0.0  0.0   9532  1732 ?        R    13:19   0:00 sshd: BiBS0N@pts/0
BiBS0N    3892  0.0  0.0   3492  1948 pts/0    Ss   13:19   0:00 -bash
root      6058  0.0  0.0   5536  1872 pts/0    S    13:22   0:00 su root
root      7365  0.0  0.0   3232  1976 pts/0    S    13:23   0:00 bash
root     19711  0.0  0.0   2276   888 pts/0    R+   14:05   0:00 ps aux

/proc/user_beancounters:
Code:
Version: 2.5
       uid  resource                     held              maxheld              barrier                limit              failcnt
  36329003: kmemsize                  5587378              5595783             27648000             30412800                    0
            lockedpages                     0                    0                 1024                 1024                    0
            privvmpages                 68794                68896               655360               720896                    0
            shmpages                     9046                 9046               327680               327680                    0
            dummy                           0                    0                    0                    0                    0
            numproc                        54                   54                  450                  450                    0
            physpages                   14488                14488                    0           2147483647                    0
            vmguarpages                     0                    0               262144           2147483647                    0
            oomguarpages                15413                15413               262144           2147483647                    0
            numtcpsock                     16                   16                  392                  392                    0
            numflock                       10                   10                  400                  440                    0
            numpty                          1                    1                   40                   40                    0
            numsiginfo                      0                    0                 1024                 1024                    0
            tcpsndbuf                  171112               171112              6724042              9605176                    0
            tcprcvbuf                  262144               262144              6724042              9605176                    0
            othersockbuf                32816                32816              1331200              2334720                    0
            dgramrcvbuf                     0                    0              1331200              1331200                    0
            numothersock                   27                   27                  392                  392                    0
            dcachesize                      0                    0              4376580              4814238                    0
            numfile                      2474                 2474                10800                10800                    0
            dummy                           0                    0                    0                    0                    0
            dummy                           0                    0                    0                    0                    0
            dummy                           0                    0                    0                    0                    0
            numiptent                      14                   14                  128                  128                    0

cpuinfo
Code:
# cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 15
model           : 4
model name      :                   Intel(R) Xeon(TM) CPU 3.20GHz
stepping        : 10
cpu MHz         : 750.058
cache size      : 2048 KB
physical id     : 0
siblings        : 2
core id         : 0
cpu cores       : 1
fpu             : yes
fpu_exception   : yes
cpuid level     : 5
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx lm pni monitor ds_cpl cid cx16 xtpr
bogomips        : 6406.40
clflush size    : 64
cache_alignment : 128
address sizes   : 36 bits physical, 48 bits virtual
power management:

processor       : 1
vendor_id       : GenuineIntel
cpu family      : 15
model           : 4
model name      :                   Intel(R) Xeon(TM) CPU 3.20GHz
stepping        : 10
cpu MHz         : 750.058
cache size      : 2048 KB
physical id     : 0
siblings        : 2
core id         : 0
cpu cores       : 1
fpu             : yes
fpu_exception   : yes
cpuid level     : 5
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx lm pni monitor ds_cpl cid cx16 xtpr
bogomips        : 6399.29
clflush size    : 64
cache_alignment : 128
address sizes   : 36 bits physical, 48 bits virtual
power management:

vpsmem
Code:
 ----- VPS Speichernutzung ----      ---- Hardware Node Memory ----
 [XXX-------------------------]      Total:                 3934 MB
./vpsmem: line 74: printf: 10.546: invalid number
 Momentan:          0% Barriere      Frei:                    14 MB
 Fehlversuche:         0 Fehler      Buffers:                 31 MB
 ------------------------------      Cached:                 529 MB
 Momentan genutzt:       270 MB      ------- +/- buff/cache -------
 Maximal  genutzt:       270 MB      Used:                  3359 MB
 Barriere:              2560 MB      Free:                   575 MB
 Limit:                 2816 MB      ------------ Swap ------------
 ------------------------------      Total Swap:           10237 MB
 Zugesichert:           1024 MB      Free  Swap:            8924 MB
 ------------------------------      ------------------------------


Ich habe bereits viel hier im Forum gelesen, um apache und mysql zu optimieren und habe ein wenig an der apache2, server-tuning.conf und my.cnf verändert.
tuning-primer.sh gibt Folgendes aus: (Die Ausgabe dauert ca. 40 Sekunden)

Code:
        -- MYSQL PERFORMANCE TUNING PRIMER --
             - By: Matthew Montgomery -

MySQL Version 5.0.26 i686

Uptime = 1 days 20 hrs 0 min 12 sec
Avg. qps = 0
Total Questions = 32158
Threads Connected = 1

Warning: Server has not been running for at least 48hrs.
It may not be safe to use these recommendations

To find out more information on how each of these
runtime variables effects performance visit:
http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html
Visit http://www.mysql.com/products/enterprise/advisors.html
for info about MySQL's Enterprise Monitoring and Advisory Service

SLOW QUERIES
Current long_query_time = 2 sec.
You have 10 out of 32170 that take longer than 2 sec. to complete
The slow query log is NOT enabled.
Your long_query_time seems to be fine

WORKER THREADS
Current thread_cache_size = 32
Current threads_cached = 3
Current threads_per_sec = 0
Historic threads_per_sec = 0
Your thread_cache_size is fine

MAX CONNECTIONS
Current max_connections = 60
Current threads_connected = 1
Historic max_used_connections = 4
The number of used connections is 6% of the configured maximum.
You are using less than 10% of your configured max_connections.
Lowering max_connections could help to avoid an over-allocation of memory
See "MEMORY USAGE" section to make sure you are not over-allocating

MEMORY USAGE
Max Memory Ever Allocated : 42 M
Configured Max Per-thread Buffers : 99 M
Configured Max Global Buffers : 35 M
Configured Max Memory Limit : 135 M
Physical Memory : 3.84 G
Max memory limit seem to be within acceptable norms

KEY BUFFER
Current MyISAM index space = 1 M
Current key_buffer_size = 32 M
Key cache miss rate is 1 : 220
Key buffer fill ratio = 0 %
Your key_buffer_size seems to be too high.
Perhaps you can use these resources elsewhere

QUERY CACHE
Query cache is enabled
Current query_cache_size = 1 M
Current query_cache_used = 571 K
Current query_cache_limit = 4 M
Current Query cache Memory fill ratio = 55.85 %
Current query_cache_min_res_unit = 4 K
Query Cache is 12 % fragmented
Run "FLUSH QUERY CACHE" periodically to defragment the query cache memory
If you have many small queries lower 'query_cache_min_res_unit' to reduce fragmentation.
MySQL won't cache query results that are larger than query_cache_limit in size

SORT OPERATIONS
Current sort_buffer_size = 32 K
Current record/read_rnd_buffer_size = 508 K
Sort buffer seems to be fine

JOINS
Current join_buffer_size = 1.00 M
You have had 222 queries where a join could not use an index properly
You should enable "log-queries-not-using-indexes"
Then look for non indexed joins in the slow query log.
If you are unable to optimize your queries you may want to increase your
join_buffer_size to accommodate larger joins in one pass.

Note! This script will still suggest raising the join_buffer_size when
ANY joins not using indexes are found.

OPEN FILES LIMIT
Current open_files_limit = 2118 files
The open_files_limit should typically be set to at least 2x-3x
that of table_cache if you have heavy MyISAM usage.
Your open_files_limit value seems to be fine

TABLE CACHE
Current table_cache value = 1024 tables
You have a total of 227 tables
You have 388 open tables.
The table_cache value seems to be fine

TEMP TABLES
Current max_heap_table_size = 16 M
Current tmp_table_size = 32 M
Of 2290 temp tables, 27% were created on disk
Effective in-memory tmp_table_size is limited to max_heap_table_size.
Perhaps you should increase your tmp_table_size and/or max_heap_table_size
to reduce the number of disk-based temporary tables
Note! BLOB and TEXT columns are not allow in memory tables.
If you are using these columns raising these values might not impact your
ratio of on disk temp tables.

TABLE SCANS
Current read_buffer_size = 12 K
Current table scan ratio = 372 : 1
read_buffer_size seems to be fine

TABLE LOCKING
Current Lock Wait ratio = 1 : 9643
Your table locking seems to be fine

Ich weiß, einige Werte sind zu hoch gewählt, der Traffic und somit die Auslastung wird aber nach und nach in die Höhe steigen, ich habe ja zugesicherte 1GB RAM, also dürfte das nicht der Grund für das Lahmen sein..

Auf Wunsch poste ich auch noch die apache und SQL Konfigurations Dateien, ich kann mir aber nicht vorstellen, dass es daran liegt...
Es läuft ja nur apache, sql, qmail... ich hab sogar Plesk gestoppt.

Ist der Server zu schlecht für meine "geringen" Anforderungen?
Ich bezahle zur Zeit 35€/mtl. und kann nicht sagen, dass ich mit dem Preis/Leistungs - Verhältnis zufrieden bin.

Ist die Maschine mit zu vielen VEs vollgepumpt?
Es wird ja ziemlich viel geswapt...

Das was auf dem Server drauf ist muss wirklich zuverlässig und schnell laufen, muss ich den Provider wechseln oder ist da was zu machen?

Würde mich freuen wenn mal jemand über die geposteten Codes drüberschauen würde und etwas dazu sagen könnte.

Danke! :)
 
Zurück