I have a 30GB 15M rows InnoDB MySQL 5.5.15 table. It is running on a server with many other MyISAM tables (300GB db). The system has 48GB RAM. Besides the default configurations, I've changed the following values:
- InnoDB buffer pool to 10GB
- log file size 5M
Note that my key_buffer_size
of MyISAM is 8GB and I'm also allowing Memcache to use 8GB, and have Redis installed (not sure how much he takes).
Are there any more values I should try to configure?
Best Answer
MyISAM Key Cache
You said you have key_buffer_size at 8GB.
Question: Do you really have 8GB of MyISAM indexes?
Please run this query
This will reveal how big your key_buffer_size would need to be IF ALL MYI PAGES WERE LOADED. To get a realistic picture run these please:
This will give you how many MB (megabytes) the key_buffer_size is in use. You should round this up to the nearest GB.
Log File Size
5MB
is the default size for innodb_log_file_size. Percona's mysqlperformanceblog.com gave two good articles on computing the right size for your particular MySQL instance:Basically, the blog recommends measuring how many bytes are written to the InnoDB Log Files in one hour. This is what I run to figure that out
Whatever number comes back for
@MB_WL_HR
, take half of it and resize innodb_log_file_size to it : See my post How to safely change MySQL innodb variable 'innodb_log_file_size'?