Home » Performance » MySQL » Performance Optimizing INNODB
Performance Optimizing INNODB [message #1554] Wed, 25 July 2007 08:53 Go to next message
digisec  is currently offline digisec
Messages: 1
Registered: July 2007
Junior Member
Hi ,
we are having a problem with a Mysql-Server which is having a hugh database and a lot of problems.

The Server is running under SuSE SLES9 all patches installed.
The Server is a Intel DualCore 3.66ghz with 12GB RAM. We have Gigabit attached network and the filesystem ist ReiserFS over a Raid 5 Storagesystem.

The Problem :
sometimes the Server hangs a while and is running on a load of 2.00 . A small SELECT is running at this time more than 10 Minutes - normaly 15 sec. -. And all other users got a Timeout if they running an UPDATE command.

We are a little astonished of the perfomance of that server, but there is nothing to see why.

So my question. Is there anything to see inside the config, if there is a problem, we did not notice.

/etc/my.cnf:
# The following options will be passed to all MySQL clients
[client]
#password       = your_password
port            = 3306
socket          = /var/lib/mysql/mysql.sock

# Here follows entries for some specific programs

# The MySQL server
[mysqld]
port            = 3306
socket          = /var/lib/mysql/mysql.sock
skip-locking
key_buffer = 1M
max_allowed_packet = 128M
table_cache = 1000
sort_buffer_size = 1M
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 1M

transaction-isolation = READ-COMMITTED

default-collation = latin1_german2_ci
log_slow_queries
default-table-type = INNODB
max_connections = 200

##  
# log             = /var/log/mysql/mysqld.log
log-error       = /var/log/mysql/mysqlderror.log

#
# skip-networking

# Replication Master Server (default)
# binary logging is required for replication
#
log-bin=/srv/mysql/vewa-dba1
binlog-ignore-db=BE_JUH_TEST

# required unique id between 1 and 2^32 - 1
# defaults to 1 if master-host is not set
# but will not function as a master if omitted
server-id       = 1

# Point the following paths to different dedicated disks
tmpdir          = /tmp/

# Uncomment the following if you are using InnoDB tables
innodb_data_home_dir = /srv/mysql/
innodb_data_file_path = ibdata1:150G
innodb_log_group_home_dir = /srv/mysql/
innodb_log_arch_dir = /srv/mysql/
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
innodb_buffer_pool_size = 8000M
innodb_additional_mem_pool_size = 8M
# Set .._log_file_size to 25 % of buffer pool size
innodb_log_file_size = 512M
innodb_log_buffer_size = 8M
# innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 180

# Query cache
query_cache_size = 64M
query_cache_limit = 8M
query_cache_type = 1

old_passwords=1

skip_name_resolve

[safe_mysqld]
err-log=/var/lib/mysql/mysqld.log

[mysqldump]
quick
max_allowed_packet = 64M

[mysql]
no-auto-rehash

[isamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

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

[mysqlhotcopy]
interactive-timeout




INNODB-STATUS:
=====================================
070725 13:32:09 INNODB MONITOR OUTPUT
=====================================
Per second averages calculated from the last 58 seconds
----------
SEMAPHORES
----------
OS WAIT ARRAY INFO: reservation count 93484, signal count 93481
Mutex spin waits 608735, rounds 561357, OS waits 4012
RW-shared spins 177256, OS waits 88527; RW-excl spins 535, OS waits 379
------------
TRANSACTIONS
------------
Trx id counter 0 89626168
Purge done for trx's n:o < 0 89626167 undo n:o < 0 0
History list length 14
Total number of lock structs in row lock hash table 0
LIST OF TRANSACTIONS FOR EACH SESSION:
---TRANSACTION 0 89626052, not started, process no 1062, OS thread id 1092864352
MySQL thread id 10947, query id 170644 192.168.120.23 mysqluser
show innodb status
FILE I/O
--------
I/O thread 0 state: waiting for i/o request (insert buffer thread)
I/O thread 1 state: waiting for i/o request (log thread)
I/O thread 2 state: waiting for i/o request (read thread)
I/O thread 3 state: waiting for i/o request (write thread)
Pending normal aio reads: 0, aio writes: 0,
 ibuf aio reads: 0, log i/o's: 0, sync i/o's: 0
Pending flushes (fsync) log: 0; buffer pool: 0
381056 OS file reads, 21266 OS file writes, 8553 OS fsyncs
0.00 reads/s, 0 avg bytes/read, 0.25 writes/s, 0.18 fsyncs/s
-------------------------------------
INSERT BUFFER AND ADAPTIVE HASH INDEX
-------------------------------------
Ibuf for space 0: size 1, free list len 5, seg size 7, is empty
Ibuf for space 0: size 1, free list len 5, seg size 7,
0 inserts, 0 merged recs, 0 merges
Hash table size 18479729, used cells 3598606, node heap has 5904 buffer(s)
0.21 hash searches/s, 0.67 non-hash searches/s
---
LOG
---
Log sequence number 256 1698086532
Log flushed up to   256 1698086532
Last checkpoint at  256 1698086532
0 pending log writes, 0 pending chkp writes
5375 log i/o's done, 0.11 log i/o's/second
----------------------
BUFFER POOL AND MEMORY
----------------------
Total memory allocated 9174318658; in additional pool allocated 8388608
Buffer pool size   512000
Free buffers       0
Database pages     506096
Modified db pages  0
Pending reads 0
Pending writes: LRU 0, flush list 0, single page 0
Pages read 5238001, created 77983, written 95982
0.00 reads/s, 0.00 creates/s, 0.13 writes/s
Buffer pool hit rate 1000 / 1000
--------------
ROW OPERATIONS
--------------
0 queries inside InnoDB, 0 queries in queue
Main thread process no. 1062, id 1088448864, state: sleeping
Number of rows inserted 2814203, updated 5208, deleted 0, read 482349881
0.00 inserts/s, 0.09 updates/s, 0.00 deletes/s, 0.29 reads/s
----------------------------
END OF INNODB MONITOR OUTPUT
============================



Would be very nice, if there is someoune outside to help me.
greetings
digisec
Re: Performance Optimizing INNODB [message #1605 is a reply to message #1554 ] Thu, 16 August 2007 09:00 Go to previous message
Peter  is currently offline Peter
Messages: 405
Registered: August 2006
Senior Member
Super Guru
You should have posted SHOW INNODB STATUS from the time server is suffering and takes a lot of time to run that query.

This one is from Idle server so it is hard to tell what that could be

Likely Innodb Concurrency issues but may be something else.

MySQL version is also helpful


Peter Zaitsev, MySQL Performance Expert
MySQL Performance Blog - http://www.mysqlperformanceblog.com
MySQL Consulting http://www.mysqlperformanceblog.com/mysql-consulting/
Previous Topic:Query uses long time
Next Topic:Optimizing a search query
Goto Forum:
  


Current Time: Thu Jul 9 20:56:40 EDT 2009

Total time taken to generate the page: 0.00963 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 2.7.7.
Copyright ©2001-2007 FUD Forum Bulletin Board Software

MySQL is a trademark of Sun Microsystems.
InnoDB is a trademark of Oracle Corp.

Percona Performance Forums are a service of Percona, Inc.
Not affiliated with Sun Microsystems or Oracle Corp.