Hi,

I am a beginner of MySQL, I hope that my experience can help you. I faced a performance issue in record inserting, fortunately it have been solved. My OS is Ubuntu 9.04 Server, and is using EXT4.

My Problem:
Insert 20 records per second

Solution:
Edit my.cnf file as below:
# Uncomment the following if you are using InnoDB tables (*****uncomment the following*****)
innodb_data_home_dir = /usr/local/mysql/data/ (*****your data home folder*****)
innodb_data_file_path = ibdata1:2000M;ibdata2:10M:autoextend
innodb_log_group_home_dir = /usr/local/mysql/data/(*****your data home folder*****)
innodb_log_arch_dir = /usr/local/mysql/data/(*****your data home folder*****)
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
innodb_buffer_pool_size = 384M
innodb_additional_mem_pool_size = 20M
# Set .._log_file_size to 25 % of buffer pool size
innodb_log_file_size = 100M
innodb_log_buffer_size = 8M
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 50

Finally restart MySQL, it's work. It can inserts 4k to 5k records per second now....


Jeff