MySQL Forums
Forum List  »  Newbie

Re: MySQL using 80-90% of CPU
Posted by: prakash gr
Date: May 19, 2009 12:11AM

Hi,

same problem we are also facing simple query consuming 80% of cpu:

i have checked the slow running queries and i felt queries doing the right thing(selecting index)




bash-2.05# uname -a
SunOS drportal 5.9 Generic_118558-08 sun4u sparc SUNW,Sun-Fire-V240

Physical ram : 2 gb

mysql> show variables like '%version%';
+-------------------------+------------------------------+
| Variable_name           | Value                        |
+-------------------------+------------------------------+
| protocol_version        | 10                           |
| version                 | 5.0.77-log                   |
| version_comment         | MySQL Community Server (GPL) |
| version_compile_machine | sparc                        |
| version_compile_os      | sun-solaris2.9               |
+-------------------------+------------------------------+
5 rows in set (0.00 sec)


my.cnf:


[client]

port            = 3306
socket          = /tmp/mysql.sock
default_character_set  = utf8


# The MySQL server
[mysqld]
transaction_isolation = READ-UNCOMMITTED
skip-name-resolve
max_connections=101
default-storage-engine=INNODB
basedir=/opt/mysql/mysql/
datadir=/oratranslog/mysql/
log-slow-queries = slow.log
long_query_time=2
log_queries_not_using_indexes
long_query_time = 5
port            = 3306
lower_case_table_names=1
socket          = /tmp/mysql.sock
skip-locking
key_buffer = 384M
max_heap_table_size = 50M
max_allowed_packet = 50M
table_cache = 512
sort_buffer_size = 15M
read_rnd_buffer_size = 15M
thread_cache_size = 8
query_cache_size = 30M
join_buffer_size = 10M
thread_concurrency = 8
collation_server=utf8_unicode_ci
character_set_server = utf8
skip-character-set-client-handshake
skip-federated
server-id       = 1
innodb_data_home_dir = /oratranslog/mysql/
innodb_data_file_path = ibdata1:2000M;ibdata2:10M:autoextend
innodb_log_group_home_dir = /oratranslog/mysql/
innodb_log_arch_dir = /oratranslog/mysql/
innodb_buffer_pool_size = 1000M
innodb_additional_mem_pool_size = 10M
innodb_log_file_size = 100M
innodb_log_buffer_size = 50M
innodb_flush_log_at_trx_commit = 2
innodb_thread_concurrency= 10
innodb_flush_method = O_DIRECT
[mysqldump]
quick
[mysql]
no-auto-rehash
default-character-set=utf8
[isamchk]
key_buffer = 256M
sort_buffer_size = 256M
read_buffer = 2M
write_buffer = 2M

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

[mysqlhotcopy]
interactive-timeout

appreciated is some one advice to tune.

Thanks

Prakash GR

Options: ReplyQuote


Subject
Written By
Posted
May 11, 2009 11:53AM
Re: MySQL using 80-90% of CPU
May 19, 2009 12:11AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.