MySQL Optimierung - vServer

nnikolay
Posts: 4
Joined: 2008-11-19 21:34

MySQL Optimierung - vServer

Post by nnikolay »

Hallo zusammen!

Ich habe mich in einen anderen Forum mal ein bisschen umgeschaut und diesen interesanten Post gesehen: CLICK

Ich habe mal das auf meine Server gemacht und folgendes bekommen, was auch ein bisschen unzufrieden war, weil viel rotess das ist :-)

Hier der Log:

------------------------

MySQL Version 5.0.45-log i686

Uptime = 7 days 9 hrs 51 min 22 sec
Avg. qps = 34
Total Questions = 21849852
Threads Connected = 4

Server has been running for over 48hrs.
It should be safe to follow these recommendations

To find out more information on how each of these
runtime variables effects performance visit:
MySQL :: MySQL 5.0 Reference Manual :: 5.1.3 System Variables
Visit MySQL :: MySQL Enterprise Advisors
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 4073 out of 21849873 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 MySQL :: MySQL 5.0 Reference Manual :: 6.3 Point-in-Time Recovery

WORKER THREADS
Current thread_cache_size = 25
Current threads_cached = 24
Current threads_per_sec = 0
Historic threads_per_sec = 0
Your thread_cache_size is fine

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

MEMORY USAGE
Max Memory Ever Allocated : 881 M
Configured Max Per-thread Buffers : 1 G
Configured Max Global Buffers : 34 M
Configured Max Memory Limit : 1 G
Physical Memory : 512.17 M

Max memory limit exceeds 90% of physical memory


KEY BUFFER
Current MyISAM index space = 79 M
Current key_buffer_size = 16 M
Key cache miss rate is 1 : 2416
Key buffer fill ratio = 97.00 %
You could increase key_buffer_size
It is safe to raise this up to 1/4 of total system memory;
assuming this is a dedicated database server.

QUERY CACHE
Query cache is enabled
Current query_cache_size = 8 M
Current query_cache_used = 3 M
Current query_cache_limit = 1 M
Current Query cache Memory fill ratio = 46.60 %
Current query_cache_min_res_unit = 4 K
MySQL won't cache query results that are larger than query_cache_limit in size

SORT OPERATIONS
Current sort_buffer_size = 8 M
Current read_rnd_buffer_size = 7 M
Sort buffer seems to be fine

JOINS
Current join_buffer_size = 2.00 M
You have had 381 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 = 2133 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 305 tables
You have 487 open tables.
The table_cache value seems to be fine

TEMP TABLES
Current max_heap_table_size = 48 M
Current tmp_table_size = 48 M
Of 1350211 temp tables, 58% were created on disk
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 = 1 M
Current table scan ratio = 536 : 1
read_buffer_size seems to be fine

TABLE LOCKING
Current Lock Wait ratio = 1 : 832
You may benefit from selective use of InnoDB.

--------------------

So, jetzt an den Profis, wie kann ich das möglichst gut optimieren. Ich würde mich über konkrete Vorschläge freuen, da ich mich hiermit nicht auskenne :-)

Vielen Dank!

Gruss
Nik
Top

Roger Wilco
Administrator
Administrator
Posts: 6001
Joined: 2004-05-23 12:53

Re: MySQL Optimierung - vServer

Post by Roger Wilco »

1. http://serversupportforum.de/forum/virt ... erung.html
2. Bitte CODE-Tags verwenden
3. Das Skript gibt dir schon entsprechende Vorschläge. Zusätzlich solltest du die Sticky Threads in diesem Unterforum lesen.
Top