Mysql server optimization for InnoDB and MyISAM

→ Are you a new visitor? Please visit the page guidance for new visitors ←

Optimizing mysql for InnoDB storage engine

With the latest mysql version 5.5 the default mysql storage engine is now InnoDB, this has been worked on a lot more now and performance on this engine is now really good, if not impressive!

You do need to keep some track of a few important things about it, by default it is not optimized and you should at least give enough innodb storage, although this is design to grow as much as needed even if its hitting the limit set. But its better to know what you’ve set then finding out your disk is full.

Ok, so InnoDB settings you need to make sure are optimized properly are:

innodb_buffer_pool_size  — This one is easy to guess, the size of the InnoDB storage
innodb_additional_mem_pool_size — This is the thing I said that if you are hitting the limit for your pool size, it will start increasing so that mysql will still work as normal.
innodb_log_buffer_size — This is basically a size that will always buffer when writing to a log file
innodb_write_io_threads and innodb_read_io_threads — This is the number of threads used to read and write data from your InnoDB pool size. Default is set to 4. Normally you don’t need more.

Now that’s for InnoDB, mysql optimization does not start there. For example if you have different services running on the same server, you may want mysql to have top priority over all, so you can maybe use option nice to give it top priority. This is done by adding the below values to your [mysqld_safe] section:

This will get mysql up and running with high priority over all services that are running.

You may want to skip the following ones as you probably don’t use them:

That’s all for Innodb storage engine that you need be careful of. Its not really that hard, right? Default settings would suffice.

But that’s not just it, the ram usage that is being used by some application may need adjusted a bit more.

Optimizing Mysql for MyISAM storage engine.

MyISAM is basically using your ram memory to execute sql queries and cache them for speed overall. What I found you need to make sure you keep track is the bellow ones:

  • Buffer settings for MyISAM

  •  Cache settings for MyISAM

  • Disable what you don’t need

There are a few more things that could still be done here, but most them have been explained already. If you need anything else specific, just comment below and if possible I’ll help out. If anything you see is mistyped or wrong, please do note and let me know for me to update.

That’s it for today, hope you enjoyed it, see next time!

Pages: 1 2

Request an article ←