Ich hoffe hier kann mir jemand sagen woran ich drehen kann, aber erstmal ein paar Infos:
Top Ausgabe 136m VIRT und 46m RES. Ein wenig hoch wie ich finde oder?
Code: Select all
24468 mysql 15 0 136m 46m 4896 S 0.3 1.2 16:26.85 mysqld
Tuning Primer. Nicht ganz 48 Stunden aber das sollte auch reichen
s15219942:/home # ./tuning-primer.sh
-- MYSQL PERFORMANCE TUNING PRIMER --
- By: Matthew Montgomery -
MySQL Version 4.1.10a i686
Uptime = 1 days 16 hrs 39 min 47 sec
Avg. qps = 4
Total Questions = 710444
Threads Connected = 6
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/4.1/en/server-system-variables.html
SLOW QUERIES
Current long_query_time = 10 sec.
You have 0 out of 710456 that take longer than 10 sec. to complete
The slow query log is NOT enabled.
Your long_query_time may be too high, I typically set this under 5 sec.
WORKER THREADS
Current thread_cache_size = 0
Current threads_cached = 0
Current threads_per_sec = 1
Historic threads_per_sec = 0
Your thread_cache_size is fine
MAX CONNECTIONS
Current max_connections = 300
Current threads_connected = 6
Historic max_used_connections = 20
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 : 98 M
Configured Max Per-thread Buffers : 952 M
Configured Max Global Buffers : 34 M
Configured Max Memory Limit : 987 M
Total System Memory : 22.47 G
Max memory limit seem to be within acceptable norms
KEY BUFFER
Current MyISAM index space = 46 M
Current key_buffer_size = 16 M
Key cache miss rate is 1 : 3207
Key buffer fill ratio = 74.00 %
Your key_buffer_size seems to be fine
QUERY CACHE
Query cache is enabled
Current query_cache_size = 16 M
Current query_cache_used = 15 M
Current query_cach_limit = 1 M
Current Query cache fill ratio = 96.97 %
However, 31403 queries have been removed from the query cache due to lack of memory
Perhaps you should raise query_cache_size
MySQL won't cache query results that are larger than query_cache_limit in size
SORT OPERATIONS
Current sort_buffer_size = 512 K
Current record/read_rnd_buffer_size = 1020 K
Sort buffer seems to be fine
JOINS
Current join_buffer_size = 512.00 K
You have had 7151 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 = 1510 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 = 512 tables
You have a total of 515 tables
You have 450 open tables.
The table_cache value seems to be fine
TEMP TABLES
Current max_heap_table_size = 31 M
Current tmp_table_size = 32 M
Of 54759 temp tables, 42% 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 = 1020 K
Current table scan ratio = 1117 : 1
read_buffer_size seems to be fine
TABLE LOCKING
Current Lock Wait ratio = 1 : 4787
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'
Meine my.cnf
Code: Select all
# The MySQL server
[mysqld]
set-variable=local-infile=0
port = 3306
socket = /var/lib/mysql/mysql.sock
skip-locking
skip-name-resolve
key_buffer = 16MB
max_allowed_packet = 1M
table_cache = 512
join_buffer_size = 512K
sort_buffer_size = 512K
net_buffer_length = 1M
read_buffer_size = 1M
read_rnd_buffer_size = 1M
query_cache_limit = 1M
query_cache_size = 16M
query_cache_type = 1
myisam_sort_buffer_size = 8M
max_connections = 300
max_heap_table_size = 32M
Ich sehe gerade das sich mein Apache auch ne Menge Speicher reserviert. Meiner Meinung nach auch viel zu viel:
Code: Select all
6058 wwwrun 15 0 51844 26m 6448 S 0.0 0.7 0:12.77 httpd2-prefork
7552 wwwrun 16 0 51864 26m 6424 S 0.0 0.7 0:23.14 httpd2-prefork
14047 wwwrun 16 0 52956 26m 5620 S 0.0 0.7 0:07.77 httpd2-prefork
14167 wwwrun 17 0 52888 26m 5612 S 0.0 0.7 0:08.27 httpd2-prefork
14209 wwwrun 16 0 51140 25m 6144 S 0.0 0.6 0:06.79 httpd2-prefork
17999 wwwrun 16 0 53128 26m 5600 S 0.0 0.7 0:03.17 httpd2-prefork
18399 wwwrun 16 0 51588 25m 5588 S 0.0 0.6 0:01.30 httpd2-prefork
18401 wwwrun 16 0 51580 25m 5592 S 0.0 0.6 0:01.67 httpd2-prefork
18402 wwwrun 16 0 45692 19m 5340 S 0.0 0.5 0:00.14 httpd2-prefork
18403 wwwrun 16 0 49644 23m 5444 S 0.0 0.6 0:00.41 httpd2-prefork
18425 wwwrun 16 0 48136 21m 5464 S 0.0 0.6 0:00.23 httpd2-prefork
Ich bitte um Vorschläge!