my.cnf ram每4小时吃一次1公里的ram

时间:2012-05-25 04:55:54

标签: mysql ram my.cnf

请帮助

[mysql_safe]
open-files-limit = 16192
skip-name-resolve
[mysqld]
max_connections=8000
max_user_connections=8000
interactive_timeout=180
wait_timeout=180
connect_timeout=180
local-infile=0
thread_concurrency = 16
key_buffer = 2400M
max_allowed_packet = 24M
join_buffer_size = 4M
sort_buffer_size = 1M
read_buffer_size = 4M
read_rnd_buffer_size = 4M
myisam_sort_buffer_size = 16M
table_cache =  5096M
table_open_cache= 4000
table_definition_cache=  5096M
thread_cache_size = 5096M
query_cache_size = 5096M
query_cache_limit= 5096M
tmp_table_size =  5096M
max_heap_table_size =  5096M
innodb_flush_log_at_trx_commit=2
innodb_buffer_pool_size = 8G
innodb_additional_mem_pool_size = 20M
innodb_log_buffer_size = 12M
innodb_thread_concurrency = 8
innodb_flush_method = O_DIRECT

[mysql]
no-auto-rehash

[mysqlhotcopy]
interactive-timeout

在我运行tuning-primer.sh

之后
SLOW QUERIES
The slow query log is NOT enabled.
Current long_query_time = 10.000000 sec.
You have 99 out of 1395484 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.5/en/point-in-time-recovery.html

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

MAX CONNECTIONS
Current max_connections = 8000
Current threads_connected = 8
Historic max_used_connections = 55
The number of used connections is 0% 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 = 5.46 G
Current InnoDB data space = 10.26 G
Current InnoDB buffer pool free = 68 %
Current innodb_buffer_pool_size = 8.00 G
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 : 23.55 G
Configured Max Per-thread Buffers : 103.51 G
Configured Max Global Buffers : 22.84 G
Configured Max Memory Limit : 126.35 G
Physical Memory : 23.53 G

Max memory limit exceeds 90% of physical memory

KEY BUFFER
Current MyISAM index space = 2.02 G
Current key_buffer_size = 9.83 G
Key cache miss rate is 1 : 127
Key buffer free ratio = 80 %
Your key_buffer_size seems to be fine

QUERY CACHE
Query cache is enabled
Current query_cache_size = 4.97 G
Current query_cache_used = 244 M
Current query_cache_limit = 4.97 G
Current Query cache Memory fill ratio = 4.79 %
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 = 1 M
Current read_rnd_buffer_size = 4 M
Sort buffer seems to be fine

JOINS
Current join_buffer_size = 4.00 M
You have had 27 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 = 40000 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 = 4000 tables
Current table_definition_cache = 524288 tables
You have a total of 9060 tables
You have 4000 open tables.
Current table_cache hit rate is 3%
, while 100% of your table cache is in use
You should probably increase your table_cache

TEMP TABLES
Current max_heap_table_size = 4.97 G
Current tmp_table_size = 4.97 G
Of 7519 temp tables, 17% were created on disk
Created disk tmp tables ratio seems fine

TABLE SCANS
Current read_buffer_size = 4 M
Current table scan ratio = 460 : 1
read_buffer_size seems to be fine

TABLE LOCKING
Current Lock Wait ratio = 1 : 361
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=ALWAYS'.

请帮助我有一个问题,每4个小时吃一次公羊 一天之后我使用了24G的18G

请任何人帮我配置my.cnf配置我有16个核心cpu

mysql:5.5.22

1 个答案:

答案 0 :(得分:0)

如果您遇到MySQL性能问题,请在服务器上运行mysqltuner作为第一步。