Hi, we have some problem with mysql high cpu , would like some help with MySQL Tuning
here are the mysqltuner & tuning-primer details mysqltuner: tuning-primer
Quote:
-- MYSQL PERFORMANCE TUNING PRIMER --
- By: Matthew Montgomery -
MySQL Version 5.1.56-log x86_64
Uptime = 0 days 10 hrs 17 min 59 sec
Avg. qps = 16
Total Questions = 629952
Threads Connected = 11
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:
MySQL :: MySQL 5.1 Reference Manual :: 5.1.3 Server 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 = 10.000000 sec.
You have 105 out of 629973 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 MySQL :: MySQL 5.1 Reference Manual :: 6.5 Point-in-Time (Incremental) Recovery Using the Binary Log
WORKER THREADS
Current thread_cache_size = 4
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 = 500
Current threads_connected = 11
Historic max_used_connections = 14
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 = 2 M
Current InnoDB data space = 35 M
Current InnoDB buffer pool free = 0 %
Current innodb_buffer_pool_size = 512 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 : 714 M
Configured Max Per-thread Buffers : 2.25 G
Configured Max Global Buffers : 649 M
Configured Max Memory Limit : 2.89 G
Physical Memory : 11.72 G
Max memory limit seem to be within acceptable norms
KEY BUFFER
Current MyISAM index space = 59 M
Current key_buffer_size = 7 M
Key cache miss rate is 1 : 38354
Key buffer free ratio = 0 %
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 = 128 M
Current query_cache_used = 113 M
Current query_cache_limit = 20 M
Current Query cache Memory fill ratio = 88.81 %
Current query_cache_min_res_unit = 4 K
However, 71728 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 = 2 M
Current read_rnd_buffer_size = 256 K
Sort buffer seems to be fine
JOINS
Current join_buffer_size = 2.00 M
You have had 1 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 = 8192 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 = 2048 tables
Current table_definition_cache = 1024 tables
You have a total of 970 tables
You have 1012 open tables.
The table_cache value seems to be fine
TEMP TABLES
Current max_heap_table_size = 256 M
Current tmp_table_size = 256 M
Of 28441 temp tables, 48% 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 = 128 K
Current table scan ratio = 526 : 1
read_buffer_size seems to be fine
TABLE LOCKING
Current Lock Wait ratio = 1 : 29379
Your table locking seems to be fine
It is difficult to pinpoint the problem without knowing much about your setup. What exactly do you mean by a crash? Is it hardware related because of mysql or does only mysql crash? Did you run top prior to a crash? Is the crash repeatable?
I also noticed the following: Temporary table size is already large - reduce result set size.
Just want to make sure that you are not writing temporary tables into a user file system where they do not belong?
Gd evening
I am trying to run my website made in php-mysql on a HP-UX system but dont know how to install and run services of Mysql.
Kindly provide appropriate solution.
thanks in advance. (1 Reply)
Hello
Please advise me how can I optimize my MySQL server. Or advise which way to look. Maybe someone had similar problems?
Over the past two weeks the MySQL server dropped 2 times. I began searching for ways to optimize the server.
Overall the picture like that:
There is a separate... (2 Replies)
Hi,
I have installed mysql in linux box as mysql-5.0.77-4.el5_6.6..
I would like to start the server. But there is no mysql file in this location /etc/init.d/
Please advice how to start the server now !!
Thnaks,
Mani (5 Replies)
Hi everyone,
I have an urgent requirement to get some table data from Linux-MYSQL server from HP-UX with oracle database.Is there any way we can get
connected through Shell script from HP-UX and issue select on mysql to get some table data?
Please help me out. (7 Replies)
Hi all
I have a problem where having multiple simultaneous startups in the crontab causes the entire server (running RHEL-AS3). Three process are set to be fired off at the same minute. Individually, they all start fine. As soon as they start via these cron jobs, the server halts. Doesn't turn... (2 Replies)
Hello,thanks for your help.
I can't connect my MYSQLserver , the note from my Linux System is 'Error 1130 (00000): Host 'my ip address' is not allowed to connect to this MySQL server. What could I do on this?
Thanks again! (4 Replies)