MySQL : Allocating memory for caches
Allocating memory for caches in MySQL If the server is dedicated to MySQL, any memory you don’t reserve for the operating system or for query processing is available for caches. MySQL needs more memory for caches than anything else. It uses caches to avoid disk access, which is orders of magnitude slower than accessing data in memory. The operating system may cache some data on MySQL’s behalf (especially for MyISAM),but MySQL needs lots of memory for itself too. The following are the most important caches to consider for the majority of installations: • The operating system caches for MyISAM data • MyISAM key caches • The InnoDB buffer pool • The query cache There are other caches, but they generally don’t use much memory. It is much easier to tune a server if you’re using only one storage engine. If you’re using only MyISAM tables, you can disable InnoDB completely, and if you’re using only InnoDB, you need to allocate only minimal resources for MyISAM (MySQL uses MyISAM tables intern