MySQL Performance Tuning mit Tuning-Primer.sh Script

Frage: Ist es möglich den MYSQL bzw. Apache zu optimieren, sodass auch währen einer Synchronisation die Nutzer komfortabel arbeiten können?

Software:
Group-Office 3.4.9

Ausgabe des Scripts:

PHP:
MySQL Version 5.1.37-1ubuntu5.1 i486

Uptime = 0 days 0 hrs 52 min 35 sec
Avg. qps = 24
Total Questions = 77216
Threads Connected = 2

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.1/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
The slow query log is NOT enabled.
Current long_query_time = 10.000000 sec.
You have 0 out of 77276 that take longer than 10.000000 sec. to complete
Your long_query_time seems to be fine

BINARY UPDATE LOG
The binary update log is NOT enabled.
You will not be able to do point in time recovery
See http://dev.mysql.com/doc/refman/5.1/en/point-in-time-recovery.html

WORKER THREADS
Current thread_cache_size = 8
Current threads_cached = 2
Current threads_per_sec = 0
Historic threads_per_sec = 0
Your thread_cache_size is fine

MAX CONNECTIONS
Current max_connections = 151
Current threads_connected = 2
Historic max_used_connections = 4
The number of used connections is 2% 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

INNODB STATUS
Current InnoDB index space = 0 bytes
Current InnoDB data space = 0 bytes
Current InnoDB buffer pool free = 96 %
Current innodb_buffer_pool_size = 8 M
Depending on how much space your innodb indexes take up it may be safe
to increase this value to up to 2 / 3 of total system memory

MEMORY USAGE
Max Memory Ever Allocated : 52 M
Configured Max Per-thread Buffers : 405 M
Configured Max Global Buffers : 42 M
Configured Max Memory Limit : 447 M
Physical Memory : 1.96 G
Max memory limit seem to be within acceptable norms

KEY BUFFER
Current MyISAM index space = 7 M
Current key_buffer_size = 16 M
Key cache miss rate is 1 : 1143
Key buffer free ratio = 87 %
Your key_buffer_size seems to be fine

QUERY CACHE
Query cache is enabled
Current query_cache_size = 16 M
Current query_cache_used = 2 M
Current query_cache_limit = 1 M
Current Query cache Memory fill ratio = 13.44 %
Current query_cache_min_res_unit = 4 K
Your query_cache_size seems to be too high.
Perhaps you can use these resources elsewhere
MySQL won't cache query results that are larger than query_cache_limit in size

SORT OPERATIONS
Current sort_buffer_size = 2 M
Current read_rnd_buffer_size = 256 K
Sort buffer seems to be fine

JOINS
Current join_buffer_size = 132.00 K
You have had 0 queries where a join could not use an index properly
Your joins seem to be using indexes properly

OPEN FILES LIMIT
Current open_files_limit = 1024 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_open_cache = 64 tables
Current table_definition_cache = 256 tables
You have a total of 161 tables
You have 64 open tables.
Current table_cache hit rate is 1%
, while 100% of your table cache is in use
You should probably increase your table_cache

TEMP TABLES
Current max_heap_table_size = 16 M
Current tmp_table_size = 16 M
Of 1603 temp tables, 14% were created on disk
Created disk tmp tables ratio seems fine

TABLE SCANS
Current read_buffer_size = 128 K
Current table scan ratio = 29 : 1
read_buffer_size seems to be fine

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

Danke schon mal...
 
Frage: ...
Ja, meistens schon.

Uptime = 0 days 0 hrs 52 min 35 sec
...
Warning: Server has not been running for at least 48hrs.
It may not be safe to use these recommendations
Bitte lesen und beachten. Genauso wie viele viele andere Hinweise in der Augabe:
Current long_query_time = 10.000000 sec.
Wahrscheinlich zu lang.

Current max_connections = 151
Wofür so viele?

Current table_cache hit rate is 1%
Der Table-Cache ist zu klein.

huschi.
 
ich kenne mich nicht so besonders aus mit der my.cnf
deswegen würde ich da ungerne einfach so etwas ändern, ohne zu wissen was ich da tue...

momentan ist "long_query_time" auskommentiert, welcher wert währe da denn sinnvoll?

Wir haben in unserem Unternehmen ca. 150 Persohnen die das System gleichzeitig nutzen sollen.
Ist da "Current max_connections = 151 " nicht i.o.?

PHP:
 Current table_cache hit rate is 1%
table_cache ist auch auskommentiert, sollte ich den auf 64 setzen?

MFG
 
Hallo,

ich komme nicht mit den "JOINS" klar


JOINS
Current join_buffer_size = 260.00 K
You have had 3257 queries where a join could not use an index properly
You have had 17 joins without keys that check for key usage after each row
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.


un mysqltuner sagt
Variables to adjust:
query_cache_size (> 2M)
join_buffer_size (> 256.0K, or always use indexes with joins)
tmp_table_size (> 25M)
max_heap_table_size (> 25M)
table_cache (> 524288)


"join_buffer_size = 256K"


WAS machen die JOINS?

Wie sind Einstellungen Optimal?


--
VSERVER SUSE derzeit noch 1GB RAM bisher noch wenig Connect 2 XT Shop´s und 5 Joomla Projekte sollen laufen
--

DANKE euch
 
deswegen würde ich da ungerne einfach so etwas ändern, ohne zu wissen was ich da tue...
Dann lass es auch besser!
Hat Dein Unternehmen keinen der sich besser damit auskennt?

momentan ist "long_query_time" auskommentiert, welcher wert währe da denn sinnvoll?
Was ist alles kleiner als 10?
9...8...7...6...5...4...3...2...1
Ein guter Wert ist 2 Sekunden. (Steht auch schon mehrfach in diesem Thread!)

Wir haben in unserem Unternehmen ca. 150 Persohnen die das System gleichzeitig nutzen sollen.
Dann brauchst Du nur max_connections > 150 wenn alle 150 Leute gleichzeitig (!!!) auf die Datenbank zugreifen.
Da es aber über eine Webapp geht, müsste es auch mind. 150 Apache-Threads geben. Und dann könnte Dein Speicher zu gering sein.

table_cache ist auch auskommentiert, sollte ich den auf 64 setzen?
Der Informatiker Dreisatz: "Lesen, verstehen, umsetzten!"

huschi.
 
WAS machen die JOINS?
Basis von relationalen Datenbank-Modellen.
Siehe auch http://de.wikipedia.org/wiki/Join_(Relationale_Algebra)#Join

Sobald mehrere Tabellen miteinander Verknüpft werden, nennt man es "join".
Idealerweise verknüpft man immer über indizierte Felder.
Der Join-Buffer wird benötigt, sobald eben keine Indizierung vorhanden ist. Denn sonst kommt der Key-Buffer zum Einsatz.
Es kommt auf den vorhandenen Speicher, die Auslastung und die Anzahl der nicht indizierten Joins an.

huschi.
 
Vielen dank für deine Geduld.
Momentan gibt es niemanden in unserem Unternehmen, der sich mit MySQL Administration beschäftigt. Da ich noch ausgebildet werde, macht es ja Sinn sich damit zu beschäftigen.
Naja... es läuft ja auch alles soweit, nur halt etwas langsam.

Ich habe n bissle mit den Zeiten und Buffergrößen gespielt, und habe den Eindruck, dass es auch besser geworden ist. Werde den Server nun erst mal ein paar Tage laufen lassen um dann nochmal das Script auszuführen.

Many thanks !
Ihnocent
 
Hallo

Also ich bin jetzt auch gerade dran ein wenig zu optimieren.
Könnte mal jemand von euch drüber schauen was noch geht.

Erstmal zu meinen Daten.
Vserver mit 786mb RAM, falls noch was gewünscht ist sagen.

Auf meinem Server läuft zur Zeit nur ein Forum und wir sind auch nicht viele. Ich sag mal so max. komme ich auf 50 gleichzeitige User.

Später soll noch shoutcast laufen und eventuell TS3.

Hier mal die ausgabe von tuning-primer, ich weiß läuft erst seit 5min aber man kann ja schon mal schauen

Code:
MySQL Version 5.0.51a-24+lenny3-log i486

Uptime = 0 days 0 hrs 5 min 7 sec
Avg. qps = 3
Total Questions = 1178
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
The slow query log is enabled.
Current long_query_time = 2 sec.
You have 0 out of 1199 that take longer than 2 sec. to complete
Your long_query_time seems to be fine

BINARY UPDATE LOG
The binary update log is NOT enabled.
You will not be able to do point in time recovery
See http://dev.mysql.com/doc/refman/5.0/en/point-in-time-recovery.html

WORKER THREADS
Current thread_cache_size = 8
Current threads_cached = 1
Current threads_per_sec = 0
Historic threads_per_sec = 0
Your thread_cache_size is fine

MAX CONNECTIONS
Current max_connections = 100
Current threads_connected = 1
Historic max_used_connections = 2
The number of used connections is 2% 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

INNODB STATUS
Current InnoDB index space = 0 bytes
Current InnoDB data space = 0 bytes
Current InnoDB buffer pool free = 96 %
Current innodb_buffer_pool_size = 8 M
Depending on how much space your innodb indexes take up it may be safe
to increase this value to up to 2 / 3 of total system memory

MEMORY USAGE
Max Memory Ever Allocated : 39 M
Configured Max Per-thread Buffers : 262 M
Configured Max Global Buffers : 34 M
Configured Max Memory Limit : 296 M
Physical Memory : 768 M
Max memory limit seem to be within acceptable norms

KEY BUFFER
Current MyISAM index space = 5 M
Current key_buffer_size = 16 M
Key cache miss rate is 1 : 2
Key buffer free ratio = 88 %
Your key_buffer_size seems to be fine

QUERY CACHE
Query cache is enabled
Current query_cache_size = 8 M
Current query_cache_used = 8 K
Current query_cache_limit = 1 M
Current Query cache Memory fill ratio = .10 %
Current query_cache_min_res_unit = 4 K
Your query_cache_size seems to be too high.
Perhaps you can use these resources elsewhere
MySQL won't cache query results that are larger than query_cache_limit in size

SORT OPERATIONS
Current sort_buffer_size = 2 M
Current read_rnd_buffer_size = 256 K
No sort operations have been performed
Sort buffer seems to be fine

JOINS
Current join_buffer_size = 132.00 K
You have had 0 queries where a join could not use an index properly
Your joins seem to be using indexes properly

OPEN FILES LIMIT
Current open_files_limit = 1024 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 = 64 tables
You have a total of 264 tables
You have 64 open tables.
Current table_cache hit rate is 2%
, while 100% of your table cache is in use
You should probably increase your table_cache

TEMP TABLES
Current max_heap_table_size = 16 M
Current tmp_table_size = 32 M
Of 417 temp tables, 11% were created on disk
Effective in-memory tmp_table_size is limited to max_heap_table_size.
Created disk tmp tables ratio seems fine

TABLE SCANS
Current read_buffer_size = 128 K
Current table scan ratio = 6 : 1
read_buffer_size seems to be fine

TABLE LOCKING
Current Lock Wait ratio = 0 : 1454
Your table locking seems to be fine

so hier mal top

Code:
top - 18:43:57 up 1 day,  1:11,  1 user,  load average: 0.00, 0.01, 0.00
Tasks:  38 total,   1 running,  37 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.1%us,  0.2%sy,  0.0%ni, 98.8%id,  0.9%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:    786432k total,   191956k used,   594476k free,        0k buffers
Swap:        0k total,        0k used,        0k free,        0k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
    1 root      15   0  1980  692  596 S    0  0.1   0:00.30 init
 1408 root      15   0  1692  620  492 S    0  0.1   0:00.52 syslogd
 3493 root      18   0  8616 2076  936 S    0  0.3   0:00.11 sendmail-mta
 3513 root      25   0  1832  432  352 S    0  0.1   0:00.00 courierlogger
 3514 root      18   0  2048  644  520 S    0  0.1   0:00.00 authdaemond
 3522 root      18   0  1832  436  352 S    0  0.1   0:00.00 courierlogger
 3523 root      15   0  1936  604  520 S    0  0.1   0:00.01 couriertcpd
 3528 root      18   0  1832  432  352 S    0  0.1   0:00.00 courierlogger
 3529 root      16   0  1936  604  520 S    0  0.1   0:00.00 couriertcpd
 3530 root      15   0  2052  580  320 S    0  0.1   0:00.00 authdaemond
 3531 root      15   0  2052  580  320 S    0  0.1   0:00.00 authdaemond
 3532 root      15   0  2268  864  568 S    0  0.1   0:00.03 authdaemond
 3534 root      15   0  2268  864  568 S    0  0.1   0:00.00 authdaemond
 3536 root      15   0  2268  880  584 S    0  0.1   0:00.03 authdaemond
 3738 polw      16   0  7852 5552 1256 S    0  0.7   0:00.03 policyd-weight
 3744 polw      15   0  7720 5208  920 S    0  0.7   0:00.05 policyd-weight
 4083 root      23   0  2484 1160  964 S    0  0.1   0:00.00 mysqld_safe
 5153 postgrey  18   0 11156 8068 2592 S    0  1.0   0:00.02 postgrey
 5156 mysql     16   0  133m  17m 4904 S    0  2.3   0:00.71 mysqld
 5157 root      18   0  1628  532  460 S    0  0.1   0:00.00 logger
 6112 root      18   0 12744 9260 2224 S    0  1.2   0:00.18 ispcp-apache-lo
 6113 root      18   0 12748 9256 2224 S    0  1.2   0:00.15 ispcp-apache-lo
 6114 www-data  18   0 14120 2276  464 S    0  0.3   0:00.00 apache2
 6115 www-data  18   0 14624 2860  968 S    0  0.4   0:00.00 apache2
 7688 nobody    18   0  7832 1768  628 S    0  0.2   0:00.16 proftpd
14173 root      18   0  1628  432  360 S    0  0.1   0:00.00 ispcp_daemon
20126 root      15   0  2036  884  704 S    0  0.1   0:00.07 cron
20259 root      15   0  5272 1036  680 S    0  0.1   0:00.00 sshd
24153 root      15   0  8016 2628 2164 S    0  0.3   0:00.07 sshd
26005 mario     15   0  8164 1684 1188 S    0  0.2   0:01.58 sshd
26028 mario     16   0  3280 1788 1212 S    0  0.2   0:00.00 bash
26241 root      16   0  2380 1100  864 S    0  0.1   0:00.00 su
27733 root      15   0  2784 1540 1204 S    0  0.2   0:00.04 bash
28203 root      18   0 14624 4772 2936 S    0  0.6   0:00.80 apache2
28464 polw      15   0  7848 5228  928 S    0  0.7   0:00.03 policyd-weight
30194 root      18   0  4132 1276  972 S    0  0.2   0:01.55 ntpd
31966 root      15   0  2252  992  792 R    0  0.1   0:00.00 top
32214 root      24   0  2352  872  704 S    0  0.1   0:00.00 xinetd

hier mal top wenn ich was im Forum mache
Code:
top - 20:10:36 up 1 day,  2:37,  1 user,  load average: 0.01, 0.02, 0.00
Tasks:  43 total,   2 running,  41 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.0%us,  0.1%sy,  0.0%ni, 99.9%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:    786432k total,   491648k used,   294784k free,        0k buffers
Swap:        0k total,        0k used,        0k free,        0k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 1794 root      15   0  2256 1096  876 R    0  0.1   0:00.01 top
20187 www-data  18   0  263m 189m 1352 S    0 24.6   0:01.72 apache2
    1 root      18   0  1980  692  596 S    0  0.1   0:00.30 init
 1408 root      15   0  1692  620  492 S    0  0.1   0:00.52 syslogd
 3493 root      15   0  8616 2076  936 S    0  0.3   0:00.11 sendmail-mta
 3513 root      25   0  1832  432  352 S    0  0.1   0:00.00 courierlogger
 3514 root      18   0  2048  644  520 S    0  0.1   0:00.00 authdaemond
 3522 root      18   0  1832  436  352 S    0  0.1   0:00.00 courierlogger
 3523 root      15   0  1936  604  520 S    0  0.1   0:00.01 couriertcpd
 3528 root      18   0  1832  432  352 S    0  0.1   0:00.00 courierlogger
 3529 root      16   0  1936  604  520 S    0  0.1   0:00.00 couriertcpd
 3530 root      15   0  2052  580  320 S    0  0.1   0:00.00 authdaemond
 3531 root      15   0  2052  580  320 S    0  0.1   0:00.00 authdaemond
 3532 root      15   0  2268  864  568 S    0  0.1   0:00.03 authdaemond
 3534 root      15   0  2268  864  568 S    0  0.1   0:00.00 authdaemond
 3536 root      15   0  2268  880  584 S    0  0.1   0:00.03 authdaemond
 3738 polw      16   0  7852 5552 1256 S    0  0.7   0:00.03 policyd-weight
 3744 polw      15   0  7720 5208  920 S    0  0.7   0:00.05 policyd-weight
 4083 root      23   0  2484 1160  964 S    0  0.1   0:00.00 mysqld_safe
 5153 postgrey  18   0 11156 8068 2592 S    0  1.0   0:00.02 postgrey
 5156 mysql     15   0  133m  18m 5312 S    0  2.5   0:01.09 mysqld
 5157 root      18   0  1628  532  460 S    0  0.1   0:00.00 logger
 6112 root      18   0 12744 9260 2224 S    0  1.2   0:00.18 ispcp-apache-lo
 6113 root      18   0 12748 9260 2224 S    0  1.2   0:00.16 ispcp-apache-lo
 6114 www-data  15   0 14120 2456  616 S    0  0.3   0:00.00 apache2
 6115 www-data  15   0 15264 3724 1372 S    0  0.5   0:00.06 apache2
 7688 nobody    18   0  7832 1768  628 S    0  0.2   0:00.16 proftpd
14173 root      18   0  1628  432  360 S    0  0.1   0:00.00 ispcp_daemon
20126 root      15   0  2036  884  704 S    0  0.1   0:00.08 cron
20259 root      15   0  5272 1036  680 S    0  0.1   0:00.00 sshd
24153 root      15   0  8016 2628 2164 S    0  0.3   0:00.11 sshd
26005 mario     18   0  8164 1684 1188 R    0  0.2   0:02.35 sshd
26028 mario     16   0  3280 1788 1212 S    0  0.2   0:00.00 bash
26241 root      16   0  2380 1100  864 S    0  0.1   0:00.00 su
26447 www-data  18   0 14924 3592 1360 S    0  0.5   0:00.01 apache2
26614 vu2001    18   0 42948 7220 4924 S    0  0.9   0:00.03 php5-cgi
26618 vu2001    15   0 48008  17m  10m S    0  2.3   0:00.89 php5-cgi
26619 vu2001    15   0 48820  16m 7940 S    0  2.1   0:00.35 php5-cgi
27733 root      21   0  2784 1540 1204 S    0  0.2   0:00.04 bash
28203 root      18   0 14624 4772 2936 S    0  0.6   0:00.80 apache2
28464 polw      15   0  7848 5228  928 S    0  0.7   0:00.03 policyd-weight
30194 root      18   0  4132 1276  972 S    0  0.2   0:01.60 ntpd
32214 root      24   0  2352  872  704 S    0  0.1   0:00.00 xinetd

sieht schon ganz gut aus aber vorhin hat ich das Problem, das der Ram verbrauch immer höher stieg. Ich war teilweise bei 630mb.

Wäre euch sehr dankbar wenn ihr mal schauen könnt

Gruss
Mario
 
Last edited by a moderator:
Hallo!
Was genau sollen wir dir jetzt raten? Das das Tuning Script noch keinen Sinn macht hast du selbst erkannt. Eventuell kannst du noch am table_cache drehen.

Zum Zweiten: Wenn RAM vorhanden ist, wird RAM auch genutzt. Load sieht normal aus - SWAP wird nicht genutzt.

mfG
Thorsten
 
Ja ich weiß das es noch zu früh aber vielleicht hätte man jetzt schon mal sagen können da und da, das könnte man von vornherein schon ändern.

Ich warte jetzt mal 48h stunden und lass es mal laufen.

Was mich aber stutzig macht, vielleicht ist es auch normal, das er wenn man im Forum aktiv ist, das der Ram Verbrauch immer höher und höher wird.

Zur Zeit sind nur ich (der Admin) und ein Kumpel (Mod) im Forum unterwegs und da ist der Ram Verbrauch schon bei 630mb. Wenn ich jetzt noch Shoutcast laufen lassen würde wäre doch ganz schnell Schluss mit dem RAM oder hab ich einen Denkfehler.
 
Hallo!
Wenn mehr Menschen dein Forum nutzen, verursachen sie damit mehr Zugriffe die dein Apache verarbeiten muss. Je mehr Zugriffe verarbeitet werden, umso mehr Prozesse muss dein Apache starten. Und was braucht so ein Prozess, damit er sich im RAM so richtig wohlfühlen kann? Richtig! Platz!

mfG
Thorsten
 
Ok das ist klar.

Wir haben jetzt mal ein Test gemacht und eine grosse Datei hochgeladen.

Dabei steigt der RAM Verbrauch bis suf 780mb und dann bricht der Upload ab und es wird angezeigt "Verbindung wurde zurückgesetzt"

Ich hab bis jetzt keine Ahnung an was das liegt
 
PHP:
MySQL Version 5.1.36-log x86_64

Uptime = 1 days 19 hrs 22 min 32 sec
Avg. qps = 67
Total Questions = 10581293
Threads Connected = 2

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.1/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
The slow query log is enabled.
Current long_query_time = 10.000000 sec.
You have 613 out of 10581338 that take longer than 10.000000 sec. to complete
Your long_query_time seems to be fine

BINARY UPDATE LOG
The binary update log is enabled
The expire_logs_days is not set.
The mysqld will retain the entire binary log until RESET MASTER or PURGE MASTER LOGS commands are run manually
Setting expire_logs_days will allow you to remove old binary logs automatically
See http://dev.mysql.com/doc/refman/5.1/en/purge-master-logs.html
Binlog sync is not enabled, you could loose binlog records during a server crash

WORKER THREADS
Current thread_cache_size = 0
Current threads_cached = 0
Current threads_per_sec = 2
Historic threads_per_sec = 0
Threads created per/sec are overrunning threads cached
You should raise thread_cache_size

MAX CONNECTIONS
Current max_connections = 151
Current threads_connected = 1
Historic max_used_connections = 71
The number of used connections is 47% of the configured maximum.
Your max_connections variable seems to be fine.

INNODB STATUS
Current InnoDB index space = 14 M
Current InnoDB data space = 13 M
Current InnoDB buffer pool free = 0 %
Current innodb_buffer_pool_size = 8 M
Depending on how much space your innodb indexes take up it may be safe
to increase this value to up to 2 / 3 of total system memory

MEMORY USAGE
Max Memory Ever Allocated : 143 M
Configured Max Per-thread Buffers : 250 M
Configured Max Global Buffers : 26 M
Configured Max Memory Limit : 276 M
Physical Memory : 5.77 G
Max memory limit seem to be within acceptable norms

KEY BUFFER
Current MyISAM index space = 229 M
Current key_buffer_size = 16 M
Key cache miss rate is 1 : 238
Key buffer free ratio = 81 %
Your key_buffer_size seems to be fine

QUERY CACHE
Query cache is supported but not enabled
Perhaps you should set the query_cache_size

SORT OPERATIONS
Current sort_buffer_size = 512 K
Current read_rnd_buffer_size = 512 K
Sort buffer seems to be fine

JOINS
Current join_buffer_size = 132.00 K
You have had 51355 queries where a join could not use an index properly
You have had 18 joins without keys that check for key usage after each row
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 = 1024 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_open_cache = 64 tables
Current table_definition_cache = 256 tables
You have a total of 1443 tables
You have 65 open tables.
Current table_cache hit rate is 0%
, while 101% of your table cache is in use
You should probably increase your table_cache
You should probably increase your table_definition_cache value.

TEMP TABLES
Current max_heap_table_size = 16 M
Current tmp_table_size = 16 M
Of 977651 temp tables, 16% were created on disk
Created disk tmp tables ratio seems fine

TABLE SCANS
Current read_buffer_size = 256 K
Current table scan ratio = 921 : 1
read_buffer_size seems to be fine

TABLE LOCKING
Current Lock Wait ratio = 1 : 769
You may benefit from selective use of InnoDB.
If you have long running SELECT's against MyISAM tables and perform
frequent updates consider setting 'low_priority_updates=1'
If you have a high concurrency of inserts on Dynamic row-length tables
consider setting 'concurrent_insert=2'.


Der Läuft noch net so lange, aber werde die nächsten tage nochmal neuen Report hier posten.

Problem ist das der Server alle paar minuten komplett hängt und laut "iotop"
PHP:
Total DISK READ: 0 B/s | Total DISK WRITE: 0 B/s
PID USER DISK READ DISK WRITE SWAPIN IO> COMMAND
272 root 0 B/s 0 B/s 0.00 % 99.99 % [md0_raid1]
15127 root 0 B/s 0 B/s 0.00 % 98.12 % [pdflush]

Laut Support liegt es an der Datenbank, aber kann leider nicht sagen an welcher?
Sind ca 30 auf dem Server.
 
Bitte noch Info's über Dein System.
Kann es sein, dass es ein vServer ist?

Aber schon mal soviel:
Stichwort "table_open_cache". Lesen, verstehen und umsetzen was Dir tuning-primer rät.
Same as innodb_buffer_pool_size.

huschi.
 
ist kein vServer

Root Server
Leistung 4 x 2,66 GHz
Arbeitsspeicher 6 GB DDR3-RAM
Festplatte 2 x 1.000 GB SATA

table_open_cache habe ich erhöht, selbe mache ich nun mit den inno db

ich poste morgen dann den neuen report
 
Hallo,

nach einiges an andere Arbeit etc. muß ich nun doch nochmal nachfragen.

Habe seit Start mit meinem Server einiges eingestellt und wesentliche Verbesserungen an der Performance bekommen, und doch bin ich noch nicht zufrieden da es immer noch einige Sekündchen vergehen bis eine Seite reagiert.

Ganz schlimm ist Wordpress
http://blog.s-kids.de/

hier mal top
Code:
top - 10:33:01 up 25 min,  2 users,  load average: 0.02, 0.21, 0.38
Tasks:  67 total,   2 running,  65 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.3%us,  0.3%sy,  0.0%ni, 99.3%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   4194304k total,   392076k used,  3802228k free,        0k buffers
Swap:        0k total,        0k used,        0k free,        0k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+   PPID TTY      P SWAP   TIME CODE DATA nDRT WCHAN     COMMAND
12053 root      15   0  2432 1108  856 R  0.3  0.0   0:00.09  1548 pts/0    0 1324   0:00   92  340    0 stext     top
    1 root      15   0  1008  380  324 S  0.0  0.0   0:00.76     0 ?        0  628   0:00  772  228    0 stext     init
 1448 root      16   0  9072 2568 2044 S  0.0  0.1   0:00.02 30708 ?        0 6504   0:00  448  468    0 stext     sshd
 1451 slbsmer   15   0  9224 1444  920 R  0.0  0.0   0:00.24  1448 ?        0 7780   0:00  448  620    0 stext     sshd
 1452 slbsmer   15   0  5504 2420 1676 S  0.0  0.1   0:00.08  1451 pts/0    0 3084   0:00  672 1056    0 wait      bash
 1488 root      16   0  7720 2140 1516 S  0.0  0.1   0:00.14  1452 pts/0    0 5580   0:00   28  644    0 wait      su
 1548 root      15   0  4940 2304 1588 S  0.0  0.1   0:00.22  1488 pts/0    0 2636   0:00  672  792    0 wait      bash
 3326 wwwrun    15   0 43388  17m 4956 S  0.0  0.4   0:04.55 32391 ?        0  24m   0:04  372  13m    0 semtimedo httpd2-prefork
 3371 wwwrun    15   0 67004  41m 5388 S  0.0  1.0   0:12.61 32391 ?        0  24m   0:12  372  36m    0 semtimedo httpd2-prefork
 3373 wwwrun    15   0 49400  23m 5196 S  0.0  0.6   0:09.93 32391 ?        0  24m   0:09  372  19m    0 semtimedo httpd2-prefork
 3376 wwwrun    15   0 49420  23m 5224 S  0.0  0.6   0:10.58 32391 ?        0  24m   0:10  372  19m    0 semtimedo httpd2-prefork
 3381 wwwrun    15   0 42512  16m 4944 S  0.0  0.4   0:06.53 32391 ?        0  24m   0:06  372  12m    0 semtimedo httpd2-prefork
 3383 wwwrun    15   0 41536  15m 5104 S  0.0  0.4   0:05.67 32391 ?        0  24m   0:05  372  11m    0 semtimedo httpd2-prefork
 5213 qmaild    18   0  3556  748  544 S  0.0  0.0   0:00.11 30716 ?        0 2808   0:00   52  140    0 stext     qmail-smtpd
 5217 wwwrun    15   0 42228  15m 4012 S  0.0  0.4   0:05.18 32391 ?        0  25m   0:05  372  12m    0 stext     httpd2-prefork
 5256 wwwrun    15   0 43464  18m 5096 S  0.0  0.4   0:06.11 32391 ?        0  24m   0:06  372  13m    0 semtimedo httpd2-prefork
 5261 wwwrun    15   0 42272  16m 4844 S  0.0  0.4   0:03.19 32391 ?        0  24m   0:03  372  12m    0 semtimedo httpd2-prefork
 9258 root      16   0  9072 2564 2044 S  0.0  0.1   0:00.02 30708 ?        0 6508   0:00  448  468    0 stext     sshd
 9262 slbsmer   15   0  9224 1452  920 S  0.0  0.0   0:00.14  9258 ?        0 7772   0:00  448  620    0 stext     sshd
 9263 slbsmer   15   0  5504 2424 1676 S  0.0  0.1   0:00.07  9262 pts/1    0 3080   0:00  672 1056    0 wait      bash
 9295 root      18   0  7724 2144 1516 S  0.0  0.1   0:00.14  9263 pts/1    0 5580   0:00   28  648    0 wait      su
 9303 root      17   0  4940 2300 1580 S  0.0  0.1   0:00.02  9295 pts/1    0 2640   0:00  672  792    0 stext     bash
28286 root      20  -4  2348  660  384 S  0.0  0.0   0:00.00     1 ?        0 1688   0:00  100  376    0 stext     udevd
29772 root      18   0 43564 1288  888 S  0.0  0.0   0:00.24     1 ?        0  41m   0:00  236  40m    0 stext     rsyslogd
30409 root      15   0 14436 9264 1956 S  0.0  0.2   0:00.02     1 ?        0 5172   0:00 2404 7276    0 stext     miniserv.pl
30431 root      18   0  5056  744  520 S  0.0  0.0   0:00.01     1 ?        0 4312   0:00   48  260    0 stext     couriertcpd
30433 root      20   0  3500  692  512 S  0.0  0.0   0:00.00     1 ?        0 2808   0:00   12  124    0 pipe_wait courierlogger
30442 root      25   0  5056  744  520 S  0.0  0.0   0:00.01     1 ?        0 4312   0:00   48  260    0 stext     couriertcpd
30444 root      25   0  3500  688  512 S  0.0  0.0   0:00.00     1 ?        0 2812   0:00   12  124    0 pipe_wait courierlogger
30451 root      18   0  5056  756  532 S  0.0  0.0   0:00.00     1 ?        0 4300   0:00   48  260    0 stext     couriertcpd
30458 root      18   0  3632  856  664 S  0.0  0.0   0:00.00     1 ?        0 2776   0:00   12  256    0 pipe_wait courierlogger
30461 root      25   0  5056  744  520 S  0.0  0.0   0:00.00     1 ?        0 4312   0:00   48  260    0 stext     couriertcpd
30463 root      25   0  3500  684  512 S  0.0  0.0   0:00.00     1 ?        0 2816   0:00   12  124    0 pipe_wait courierlogger
30708 root      15   0  6484 1088  660 S  0.0  0.0   0:00.00     1 ?        0 5396   0:00  448  468    0 stext     sshd
30716 root      15   0  2576  888  720 S  0.0  0.0   0:00.02     1 ?        0 1688   0:00  160  412    0 stext     xinetd
32094 sw-cp-se  15   0  4916 2208 1412 S  0.0  0.1   0:00.04     1 ?        0 2708   0:00  172  672    0 901002534 sw-cp-serverd
32100 root      18   0  2336  804  632 S  0.0  0.0   0:00.00     1 ?        0 1532   0:00   44  248    0 stext     cron
32151 named     18   0 45096 9232 2032 S  0.0  0.2   0:00.03     1 ?        0  35m   0:00  392  36m    0 rt_sigsus named
32178 root      25   0  2936 1296 1104 S  0.0  0.0   0:00.02     1 ?        0 1640   0:00  672  260    0 wait      mysqld_safe
32219 mysql     15   0  198m  66m 4392 S  0.0  1.6   0:08.02 32178 ?        0 132m   0:08 5984 189m    0 stext     mysqld
32233 root      15   0 32868  28m 3148 S  0.0  0.7   0:02.14     1 ?        0 3400   0:02 2404  25m    0 stext     spamd
32238 popuser   18   0 36240  31m 3020 S  0.0  0.8   0:03.09 32233 ?        0 3576   0:03 2404  29m    0 stext     spamd
32288 qmails    16   0  1824  416  328 S  0.0  0.0   0:00.02     1 ?        0 1408   0:00   48  260    0 stext     qmail-send
32289 qmaill    18   0  1776  484  416 S  0.0  0.0   0:00.00 32288 ?        0 1292   0:00    8  252    0 pipe_wait splogger
32290 root      15   0  1804  384  292 S  0.0  0.0   0:00.00 32288 ?        0 1420   0:00   16  272    0 stext     qmail-lspawn
32291 qmailr    18   0  1800  360  272 S  0.0  0.0   0:00.00 32288 ?        0 1440   0:00   12  272    0 stext     qmail-rspawn
32292 qmailq    18   0  1772  356  292 S  0.0  0.0   0:00.00 32288 ?        0 1416   0:00   12  244    0 pipe_wait qmail-clean
32391 root      18   0 38812  16m 8244 S  0.0  0.4   0:00.47     1 ?        0  21m   0:00  372 9408    0 stext     httpd2-prefork
32393 wwwrun    15   0 37832 7944  480 S  0.0  0.2   0:00.00 32391 ?        0  29m   0:00  372 8464    0 182766853 httpd2-prefork
32399 wwwrun    15   0 67544  41m 5320 S  0.0  1.0   0:10.99 32391 ?        0  24m   0:10  372  37m    0 semtimedo httpd2-prefork
32541 drweb     15   0 84760  78m  536 S  0.0  1.9   0:00.18     1 ?        0 4860   0:00 2348  77m    0 stext     drwebd.real
32542 drweb     15   0 84760  77m  340 S  0.0  1.9   0:00.00 32541 ?        0 5056   0:00 2348  77m    0 107564389 drwebd.real

ps free und vmstat

Code:
h1600184:/ # ps
  PID TTY          TIME CMD
 1488 pts/0    00:00:00 su
 1548 pts/0    00:00:00 bash
11940 pts/0    00:00:00 ps
h1600184:/ # free
             total       used       free     shared    buffers     cached
Mem:       4194304     391556    3802748          0          0          0
-/+ buffers/cache:     391556    3802748
Swap:            0          0          0
h1600184:/ # vms´tat
bash: vms´tat: command not found
h1600184:/ # vmstat
procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa
 1  0      0 3802740      0      0    0    0 12071 28402    0 15462 12  3 84  1
h1600184:/ #


tuning-primer
Code:
h1600184:/usr/local/bin # ./tuning-primer.sh

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

MySQL Version 5.0.67-log i686

Uptime = 0 days 0 hrs 15 min 8 sec
Avg. qps = 7
Total Questions = 6873
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
The slow query log is enabled.
Current long_query_time = 2 sec.
You have 1 out of 6894 that take longer than 2 sec. to complete
Your long_query_time seems to be fine

BINARY UPDATE LOG
The binary update log is NOT enabled.
You will not be able to do point in time recovery
See http://dev.mysql.com/doc/refman/5.0/en/point-in-time-recovery.html

WORKER THREADS
Current thread_cache_size = 16384
Current threads_cached = 6
Current threads_per_sec = 0
Historic threads_per_sec = 0
Your thread_cache_size is fine

MAX CONNECTIONS
Current max_connections = 50
Current threads_connected = 1
Historic max_used_connections = 7
The number of used connections is 14% of the configured maximum.
Your max_connections variable seems to be fine.

No InnoDB Support Enabled!

MEMORY USAGE
Max Memory Ever Allocated : 583 M
Configured Max Per-thread Buffers : 3.08 G
Configured Max Global Buffers : 141 M
Configured Max Memory Limit : 3.22 G
Physical Memory : 4.00 G
Max memory limit seem to be within acceptable norms

KEY BUFFER
Current MyISAM index space = 12 M
Current key_buffer_size = 15 M
Key cache miss rate is 1 : 30
Key buffer free ratio = 83 %
Your key_buffer_size seems to be fine

QUERY CACHE
Query cache is enabled
Current query_cache_size = 100 M
Current query_cache_used = 3 M
Current query_cache_limit = 3 M
Current Query cache Memory fill ratio = 3.78 %
Current query_cache_min_res_unit = 4 K
Your query_cache_size seems to be too high.
Perhaps you can use these resources elsewhere
MySQL won't cache query results that are larger than query_cache_limit in size

SORT OPERATIONS
Current sort_buffer_size = 5 M
Current read_rnd_buffer_size = 3 M
Sort buffer seems to be fine

JOINS
Current join_buffer_size = 50.00 M
You have had 24 queries where a join could not use an index properly
join_buffer_size >= 4 M
This is not advised
You should enable "log-queries-not-using-indexes"
Then look for non indexed joins in the slow query log.

OPEN FILES LIMIT
Current open_files_limit = 65535 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 = 212992 tables
You have a total of 3968 tables
You have 3976 open tables.
The table_cache value seems to be fine

TEMP TABLES
Current max_heap_table_size = 40 M
Current tmp_table_size = 40 M
Of 211 temp tables, 16% were created on disk
Created disk tmp tables ratio seems fine

TABLE SCANS
Current read_buffer_size = 5 M
Current table scan ratio = 74 : 1
read_buffer_size seems to be fine

TABLE LOCKING
Current Lock Wait ratio = 0 : 7080
Your table locking seems to be fine


---> query_cache_size habe ich auf 50 M verringert



mysqltuner
Code:
h1600184:/usr/local/bin # ./mysqltuner.pl

 >>  MySQLTuner 1.0.1 - Major Hayden <major@mhtx.net>
 >>  Bug reports, feature requests, and downloads at http://mysqltuner.com/
 >>  Run with '--help' for additional options and output filtering

-------- General Statistics --------------------------------------------------
[--] Skipped version check for MySQLTuner script
[OK] Currently running supported MySQL version 5.0.67-log
[!!] Switch to 64-bit OS - MySQL cannot currently use all of your RAM

-------- Storage Engine Statistics -------------------------------------------
[--] Status: -Archive -BDB -Federated -InnoDB -ISAM -NDBCluster
[--] Data in MyISAM tables: 14M (Tables: 3941)
[--] Data in MEMORY tables: 0B (Tables: 10)
[!!] Total fragmented tables: 25

-------- Performance Metrics -------------------------------------------------
[--] Up for: 15m 31s (7K q [7.727 qps], 304 conn, TX: 10M, RX: 1M)
[--] Reads / Writes: 85% / 15%
[--] Total buffers: 181.0M global + 63.2M per thread (50 max threads)
[!!] Allocating > 2GB RAM on 32-bit systems can cause system instability
[!!] Maximum possible memory usage: 3.3G (81% of installed RAM)
[OK] Slow queries: 0% (2/7K)
[OK] Highest usage of available connections: 14% (7/50)
[OK] Key buffer size / total MyISAM indexes: 15.0M/12.7M
[OK] Key buffer hit rate: 96.8% (21K cached / 708 reads)
[OK] Query cache efficiency: 57.0% (3K cached / 5K selects)
[OK] Query cache prunes per day: 0
[OK] Sorts requiring temporary tables: 0% (0 temp sorts / 215 sorts)
[!!] Joins performed without indexes: 24
[OK] Temporary tables created on disk: 15% (41 on disk / 264 total)
[OK] Thread cache hit rate: 97% (7 created / 304 connections)
[OK] Table cache hit rate: 99% (3K open / 3K opened)
[OK] Open file limit used: 12% (7K/65K)
[OK] Table locks acquired immediately: 100% (3K immediate / 3K locks)

-------- Recommendations -----------------------------------------------------
General recommendations:
    Run OPTIMIZE TABLE to defragment tables for better performance
    MySQL started within last 24 hours - recommendations may be inaccurate
    Adjust your join queries to always utilize indexes
Variables to adjust:
    join_buffer_size (> 50.0M, or always use indexes with joins)


---> join_buffer_size habe ich danch auf 100 M gesetzt



ab2
Code:
h1600184:/ # ab2 -n 20 -c 2  http://www.s-kids.de/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking www.s-kids.de (be patient).....done


Server Software:        Apache/2.2.10
Server Hostname:        www.s-kids.de
Server Port:            80

Document Path:          /
Document Length:        4 bytes

Concurrency Level:      2
Time taken for tests:   15.565 seconds
Complete requests:      20
Failed requests:        0
Write errors:           0
Non-2xx responses:      20
Total transferred:      10580 bytes
HTML transferred:       80 bytes
Requests per second:    1.28 [#/sec] (mean)
Time per request:       1556.490 [ms] (mean)
Time per request:       778.245 [ms] (mean, across all concurrent requests)
Transfer rate:          0.66 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0  134 279.2      0     775
Processing:   605 1412 477.6   1481    2220
Waiting:        0 1105 747.9   1380    2219
Total:        724 1546 426.0   1584    2483

Percentage of the requests served within a certain time (ms)
  50%   1584
  66%   1758
  75%   1831
  80%   1862
  90%   2220
  95%   2483
  98%   2483
  99%   2483
 100%   2483 (longest request)


server-status
Code:
Apache Server Status for www.s-kids.de

Server Version: Apache/2.2.10 (Linux/SUSE) mod_ssl/2.2.10 OpenSSL/0.9.8h PHP/5.2.13 with Suhosin-Patch mod_python/3.3.1 Python/2.6 mod_perl/2.0.4 Perl/v5.10.0
Server Built: Apr 13 2010 16:26:03

Current Time: Monday, 20-Sep-2010 10:59:39 CEST
Restart Time: Monday, 20-Sep-2010 10:57:29 CEST
Parent Server Generation: 0
Server uptime: 2 minutes 10 seconds
1 requests currently being processed, 9 idle workers

___.____.._W_...................................................
................................................................
......................

Scoreboard Key:
"_" Waiting for Connection, "S" Starting up, "R" Reading Request,
"W" Sending Reply, "K" Keepalive (read), "D" DNS Lookup,
"C" Closing connection, "L" Logging, "G" Gracefully finishing,
"I" Idle cleanup of worker, "." Open slot with no current process

PID Key:

   1675 in state: _ ,   1676 in state: _ ,   1677 in state: _ 
   1691 in state: _ ,   3533 in state: _ ,   3121 in state: _ 
   3136 in state: _ ,   3150 in state: _ ,   3151 in state: W 
   3548 in state: _ ,

To obtain a full report with current status information you need to use the ExtendedStatus On directive.
SSL/TLS Session Cache Status:
cache type: SHMCB, shared memory: 512000 bytes, current sessions: 0
subcaches: 32, indexes per subcache: 133
index usage: 0%, cache usage: 0%
total sessions stored since starting: 0
total sessions expired since starting: 0
total (pre-expiry) sessions scrolled out of the cache: 0
total retrieves since starting: 0 hit, 0 miss
total removes since starting: 0 hit, 0 miss
Apache/2.2.10 (Linux/SUSE) Server at www.s-kids.de Port 80



die wahrscheinlich wichtigen Konfigurations-Dateien und Einstellungen darin

my.conf
Code:
###########################

key_buffer = 150M
key_buffer_size = 15M

table_cache = 212992

tmp_table_size = 41943040
max_heap_table_size = 41943040

open_files_limit = 65535
#max_open_files = 1048636

query_cache_limit = 3M
query_cache_size = 50M
query_cache_type = 1

thread_cache_size = 16384

join_buffer_size =  100M

max_allowed_packet = 25M

sort_buffer_size = 5M
net_buffer_length = 8K

read_buffer_size = 5M
read_rnd_buffer_size = 3M

myisam_sort_buffer_size = 5M

concurrent_insert = 1
max_connections = 50

long_query_time = 2
low_priority_updates = 1
log_slow_queries=/var/log/mysqld.slow.log
#log_queries_not_using_indexes = off

wait_timeout = 500
bulk_insert_buffer_size = 5M

#############################

#skip-networking

server-id    = 1

#server-id       = 2

# Uncomment the following if you are using BDB tables
#bdb_cache_size = 4M
#bdb_max_lock = 10000

skip-innodb
# Uncomment the following if you are using InnoDB tables
innodb_data_home_dir = /var/lib/mysql/
innodb_data_file_path = ibdata1:10M:autoextend
innodb_log_group_home_dir = /var/lib/mysql/
innodb_log_arch_dir = /var/lib/mysql/
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
innodb_buffer_pool_size = 16M
innodb_additional_mem_pool_size = 2M
# Set .._log_file_size to 25 % of buffer pool size
innodb_log_file_size = 5M
innodb_log_buffer_size = 8M
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 50

# The safe_mysqld script
skip-bdb

[safe_mysqld]
log-error=/var/lib/mysql/mysqld.log

skip-bdb

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates

[isamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[myisamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[mysqlhotcopy]
interactive-timeout

[mysqld_multi]
mysqld     = /usr/bin/mysqld_safe
mysqladmin = /usr/bin/mysqladmin
log        = /var/log/mysqld_multi.log
# user       = multi_admin
# password   = secret


server-tuning.conf
Code:
# prefork MPM
<IfModule prefork.c>
    StartServers         3
    MinSpareServers      5
    MaxSpareServers     10
    ServerLimit       150
    MaxClients        256
    MaxRequestsPerChild  10000
</IfModule>

# worker MPM
<IfModule worker.c>
    StartServers         3
    MinSpareThreads     25
    MaxSpareThreads     75 
    ThreadLimit         64
    MaxClients        256
    ThreadsPerChild     50
    MaxRequestsPerChild  10000
</IfModule>

KeepAlive On
MaxKeepAliveRequests 150
KeepAliveTimeout 3


#EnableMMAP off
#EnableSendfile off
<IfModule mod_setenvif.c>

    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


    BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
    BrowserMatch "^WebDrive" redirect-carefully
    BrowserMatch "^WebDAVFS/1.[012]" redirect-carefully
    BrowserMatch "^gnome-vfs" redirect-carefully
</IfModule>


---> MaxClients habe ich verringert auf 150


Das ganze ist ein VServer
SuSE Linux 11.1
1 CPU
2 bzw. 4 GB RAM


Liegen die Schwächen an der "Hardware" (VServer ;) ) oder kann ich mit der richtigen (besseren) Konfiguration noch einiges an Leistung heraus holen?

Bisher habe ich noch nicht den Traffic aber wenn meine anderen Joomla Projekte auf dem Server Online gehen, habe ich bedenken????

Vielen Vielen DANK an alle die immer wieder geniale Lösungen haben :)
 
Warning: Server has not been running for at least 48hrs.
It may not be safe to use these recommendations
Du kannst noch so viele Fakten bringe. Aber dieser Teil ist essentiell. Die Statistik-Daten sagen immer nur etwas über die Zeit aus. Wenn keine Zeit verstrichen ist, sind diese Daten für den Lokus.

Liegen die Schwächen an der "Hardware" (VServer ;) )
Grundsätzlich und meist definitiv: Ja!

Bisher habe ich noch nicht den Traffic aber wenn meine anderen Joomla Projekte auf dem Server Online gehen, habe ich bedenken????
Und genau das stößt Du aktuell auch mit der Optimierungsarbeit an die Grenzen:
Denn wenn keine "natürliche Last" drauf ist, kannst Du nur künstlich optimieren. Und das geht meistens schief.

huschi.
 
Hallo,

habe im Moment leider auch ein Problem mit meinem mysql server.
Er kommt einfach nicht mehr mit den Anfragen hinterher.

Hier mal die Ausgabe vom Script:
Code:
        -- MYSQL PERFORMANCE TUNING PRIMER --
             - By: Matthew Montgomery -

MySQL Version 5.0.51a-24+lenny4-log i486

Uptime = 1 days 8 hrs 8 min 10 sec
Avg. qps = 65
Total Questions = 7598783
Threads Connected = 159

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
The slow query log is NOT enabled.
Current long_query_time = 10 sec.
You have 19651 out of 7598810 that take longer than 10 sec. to complete
Your long_query_time seems to be fine

BINARY UPDATE LOG
The binary update log is NOT enabled.
You will not be able to do point in time recovery
See http://dev.mysql.com/doc/refman/5.0/en/point-in-time-recovery.html

WORKER THREADS
Current thread_cache_size = 8
Current threads_cached = 4
Current threads_per_sec = 0
Historic threads_per_sec = 0
Your thread_cache_size is fine

MAX CONNECTIONS
Current max_connections = 10000
Current threads_connected = 159
Historic max_used_connections = 6144
The number of used connections is 61% of the configured maximum.
Your max_connections variable seems to be fine.

INNODB STATUS
Current InnoDB index space = 0 bytes
Current InnoDB data space = 0 bytes
Current InnoDB buffer pool free = 96 %
Current innodb_buffer_pool_size = 8 M
Depending on how much space your innodb indexes take up it may be safe
to increase this value to up to 2 / 3 of total system memory

MEMORY USAGE
Max Memory Ever Allocated : 15.79 G
Configured Max Per-thread Buffers : 25.63 G
Configured Max Global Buffers : 42 M
Configured Max Memory Limit : 25.67 G
Physical Memory : 7.86 G

nMax memory limit exceeds 90% of physical memory

KEY BUFFER
Current MyISAM index space = 112 M
Current key_buffer_size = 16 M
Key cache miss rate is 1 : 101
Key buffer free ratio = 88 %
Your key_buffer_size seems to be fine

QUERY CACHE
Query cache is enabled
Current query_cache_size = 16 M
Current query_cache_used = 2 M
Current query_cache_limit = 10 M
Current Query cache Memory fill ratio = 17.74 %
Current query_cache_min_res_unit = 4 K
Your query_cache_size seems to be too high.
Perhaps you can use these resources elsewhere
MySQL won't cache query results that are larger than query_cache_limit in size

SORT OPERATIONS
Current sort_buffer_size = 2 M
Current read_rnd_buffer_size = 256 K
Sort buffer seems to be fine

JOINS
Current join_buffer_size = 132.00 K
You have had 0 queries where a join could not use an index properly
Your joins seem to be using indexes properly

OPEN FILES LIMIT
Current open_files_limit = 50000 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 = 192 tables
You have a total of 147 tables
You have 192 open tables.
Current table_cache hit rate is 0%
, while 100% of your table cache is in use
You should probably increase your table_cache

TEMP TABLES
Current max_heap_table_size = 16 M
Current tmp_table_size = 32 M
Of 1077 temp tables, 3% were created on disk
Effective in-memory tmp_table_size is limited to max_heap_table_size.
Created disk tmp tables ratio seems fine

TABLE SCANS
Current read_buffer_size = 128 K
Current table scan ratio = 472 : 1
read_buffer_size seems to be fine

TABLE LOCKING
Current Lock Wait ratio = 1 : 0
You may benefit from selective use of InnoDB.
If you have long running SELECT's against MyISAM tables and perform
frequent updates consider setting 'low_priority_updates=1'
If you have a high concurrency of inserts on Dynamic row-length tables
consider setting 'concurrent_insert=2'.

Top
Code:
top - 22:42:49 up 221 days,  6:34,  2 users,  load average: 13.62, 9.82, 9.09
Tasks: 350 total,   1 running, 348 sleeping,   0 stopped,   1 zombie
Cpu(s): 14.3%us,  9.6%sy,  0.0%ni, 76.0%id,  0.0%wa,  0.1%hi,  0.0%si,  0.0%st
Mem:   8245660k total,  2780744k used,  5464916k free,   306712k buffers
Swap:  1046960k total,    39232k used,  1007728k free,  1427696k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
10178 mysql     40   0  822m 455m 5408 S  188  5.7   1620:39 mysqld
25540 www-data  40   0 25340 8128 5724 S    0  0.1   0:00.05 php-cgi
28140 root      40   0  2512 1280  872 R    0  0.0   0:00.02 top
    1 root      40   0  1972  392  372 S    0  0.0   1:04.69 init
    2 root      40   0     0    0    0 S    0  0.0   0:00.00 kthreadd
    3 root      RT   0     0    0    0 S    0  0.0   0:05.34 migration/0
    4 root      20   0     0    0    0 S    0  0.0   8:44.32 ksoftirqd/0
    5 root      RT   0     0    0    0 S    0  0.0   0:06.11 migration/1
    6 root      20   0     0    0    0 S    0  0.0   4:52.90 ksoftirqd/1
    7 root      RT   0     0    0    0 S    0  0.0   0:06.28 migration/2
    8 root      20   0     0    0    0 S    0  0.0   4:14.17 ksoftirqd/2
    9 root      RT   0     0    0    0 S    0  0.0   0:06.47 migration/3
   10 root      20   0     0    0    0 S    0  0.0   3:36.26 ksoftirqd/3
   11 root      RT   0     0    0    0 S    0  0.0   0:12.90 migration/4
   12 root      20   0     0    0    0 S    0  0.0   5:46.04 ksoftirqd/4
   13 root      RT   0     0    0    0 S    0  0.0   0:17.50 migration/5
   14 root      20   0     0    0    0 S    0  0.0   2:07.78 ksoftirqd/5
   15 root      RT   0     0    0    0 S    0  0.0   0:19.65 migration/6
   16 root      20   0     0    0    0 S    0  0.0   1:15.82 ksoftirqd/6
   17 root      RT   0     0    0    0 S    0  0.0   0:22.11 migration/7
   18 root      20   0     0    0    0 S    0  0.0   1:09.22 ksoftirqd/7
   19 root      20   0     0    0    0 S    0  0.0   0:02.42 events/0
   20 root      20   0     0    0    0 S    0  0.0   2:38.54 events/1
   21 root      20   0     0    0    0 S    0  0.0   0:05.72 events/2
   22 root      20   0     0    0    0 S    0  0.0   0:04.72 events/3
   23 root      20   0     0    0    0 S    0  0.0   0:07.55 events/4
   24 root      20   0     0    0    0 S    0  0.0   0:04.10 events/5
   25 root      20   0     0    0    0 S    0  0.0   0:03.40 events/6
   26 root      20   0     0    0    0 S    0  0.0   0:06.28 events/7
   27 root      20   0     0    0    0 S    0  0.0   0:00.00 cpuset
   28 root      20   0     0    0    0 S    0  0.0   0:00.01 khelper
   34 root      20   0     0    0    0 S    0  0.0   0:00.00 async/mgr
  249 root      20   0     0    0    0 S    0  0.0   0:00.40 sync_supers
  251 root      20   0     0    0    0 S    0  0.0   0:00.28 bdi-default
  252 root      20   0     0    0    0 S    0  0.0   0:00.00 kintegrityd/0
  253 root      20   0     0    0    0 S    0  0.0   0:00.00 kintegrityd/1
  254 root      20   0     0    0    0 S    0  0.0   0:00.00 kintegrityd/2
  255 root      20   0     0    0    0 S    0  0.0   0:00.00 kintegrityd/3
  256 root      20   0     0    0    0 S    0  0.0   0:00.00 kintegrityd/4
  257 root      20   0     0    0    0 S    0  0.0   0:00.00 kintegrityd/5
  258 root      20   0     0    0    0 S    0  0.0   0:00.00 kintegrityd/6
  259 root      20   0     0    0    0 S    0  0.0   0:00.00 kintegrityd/7
  260 root      20   0     0    0    0 S    0  0.0   0:00.14 kblockd/0
  261 root      20   0     0    0    0 S    0  0.0   0:00.52 kblockd/1
  262 root      20   0     0    0    0 S    0  0.0   0:00.18 kblockd/2

mysqltuner
Code:
 >>  MySQLTuner 1.0.1 - Major Hayden <major@mhtx.net>
 >>  Bug reports, feature requests, and downloads at http://mysqltuner.com/
 >>  Run with '--help' for additional options and output filtering

-------- General Statistics --------------------------------------------------
[--] Skipped version check for MySQLTuner script
[OK] Currently running supported MySQL version 5.0.51a-24+lenny4-log
[!!] Switch to 64-bit OS - MySQL cannot currently use all of your RAM

-------- Storage Engine Statistics -------------------------------------------
[--] Status: +Archive -BDB -Federated +InnoDB -ISAM -NDBCluster
[--] Data in MyISAM tables: 377M (Tables: 130)
[!!] InnoDB is enabled but isn't being used
[!!] Total fragmented tables: 13

-------- Performance Metrics -------------------------------------------------
[--] Up for: 1d 8h 16m 25s (7M q [65.834 qps], 31M conn, TX: 604M, RX: 436M)
[--] Reads / Writes: 67% / 33%
[--] Total buffers: 58.0M global + 2.6M per thread (10000 max threads)
[!!] Allocating > 2GB RAM on 32-bit systems can cause system instability
[!!] Maximum possible memory usage: 25.7G (326% of installed RAM)
[OK] Slow queries: 0% (19K/7M)
[OK] Highest usage of available connections: 61% (6144/10000)
[OK] Key buffer size / total MyISAM indexes: 16.0M/112.5M
[OK] Key buffer hit rate: 99.0% (12M cached / 118K reads)
[OK] Query cache efficiency: 39.9% (1M cached / 3M selects)
[OK] Query cache prunes per day: 0
[OK] Sorts requiring temporary tables: 0% (0 temp sorts / 1K sorts)
[OK] Temporary tables created on disk: 3% (38 on disk / 1K total)
[OK] Thread cache hit rate: 99% (106K created / 31M connections)
[!!] Table cache hit rate: 0% (192 open / 131K opened)
[OK] Open file limit used: 0% (203/50K)
[!!] Table locks acquired immediately: 35%
[!!] Connections aborted: 96%

-------- Recommendations -----------------------------------------------------
General recommendations:
    Add skip-innodb to MySQL configuration to disable InnoDB
    Run OPTIMIZE TABLE to defragment tables for better performance
    Enable the slow query log to troubleshoot bad queries
    Increase table_cache gradually to avoid file descriptor limits
    Optimize queries and/or use InnoDB to reduce lock wait
    Your applications are not closing MySQL connections properly
Variables to adjust:
  *** MySQL's maximum memory usage is dangerously high ***
  *** Add RAM before increasing MySQL buffer variables ***
    table_cache (> 192)

vllt. kann mir jemand ein paar tipps geben was ich ändern soll?
 
Grundsätzlich gehe ich davon aus, dass Du lesen kannst.
Daher solltest Du die Hinweise vom tuning-primer auch verstehen, oder?

Current long_query_time = 10 sec.
10 Sekunden sind extrem lang. Ich tendiere eher dahin schon 2 bis 3 Sekunden als "long" zu bezeichnen. Das lieferte Dir einen besseren statistischen Wert, wie viele Queries ggf. Andere blockieren.

Current max_connections = 10000
Current threads_connected = 159
Historic max_used_connections = 6144
Hier würde ich mal nachforschen. Dazu wäre Sinnvoll zu wissen, wie der Apache-Eingestellt ist.
Aber zusammen mit einer Ausgabe vom mysqltuner macht es Sinn:
[!!] Connections aborted: 96%
Ich tippe darauf, dass Dein MySQL von Außen zugänglich ist. Neben der Grundsätzlichen Unsicherheit ist dies natürlich auch noch der Performance abträglich.

Max Memory Ever Allocated : 15.79 G
Configured Max Memory Limit : 25.67 G
Physical Memory : 7.86 G
Das finde ich hierbei am Besten! Frei nach dem Motto "Swap ist doch nur Speicher" wundert man sich, wenn der Server schwächelt. ;)

Current query_cache_size = 16 M
Current query_cache_used = 2 M
Current Query cache Memory fill ratio = 17.74 %
Hier ist die Frage, was für eine Datenbank liegt denn drauf? Wie wird sie genutzt?

Current read_rnd_buffer_size = 256 K
Alle Read-Buffers kannst Du getrost verdoppeln bis vervierfachen.

Current open_files_limit = 50000 files
The open_files_limit should typically be set to at least 2x-3x
Das muss ich wohl nicht übersetzten, oder?

Current table_cache value = 192 tables
You have a total of 147 tables
You have 192 open tables.
Current table_cache hit rate is 0%
Diese schlechte Hit-Rate zieht natürlich Performance. Der Table-Cache muss deutlich höher als total-tables sein. Diese Hit-Rate solltest Du auf bei einer so geringen Anzahl der Tablellen auf fast 100% bringen.

huschi.
 
Hallo Huschi,

noch mal zu meinem Setup und Problem.

Kann ich davon ausgehen, das meine Konfig so fast i.O. ist?

Ist mein V-Server so schlecht? oder sind kann eine andere Konfig/Setup eine Rolle Spielen (zu viele Prozesse Module etc.)



Was kannst du empfahlen?


MFG
 
Back
Top