I am just using a very few InnoDB tables (e.g. less than 1MB), but during MySQL startup, it said
InnoDB: Initializing buffer pool, size = 128.0M
Does it mean even I am using in such a small size, the server still use 128M RAM?
|
|
|
According to the MySQL Documentation, the InnoDB Buffer Pool is set to 128MB by default in MySQL 5.5. You can show how much of the InnoDB Buffer Pool is in use and reserved as follows:
I have it set to 256M in MySQL 5.5.12 for Windows. Here is my output:
You can set this value when MySQL starts up. For example: To set it to use 1G of RAM
To set it to use 256MB of RAM
After changing it in my.cnf, you must restart mysql for it to take effect. |
||||
|
|
|
128 M was historically great buffer pool size. but it is now really history :) Consider to give a much more pool size. Many patterns says that you must or may give innodb buffer pool 70-80% of your server's total memory. Optimizing InnoDB buffer pool is common practice in MySQL Optimization stage. But be aware to mis-estimate your RAM. you must keep enough RAM for another tasks. Apache for eg. First of all generate an optimal my.cnf (config file) for you server. You can do this using simple but great Percona online Tool. it will very useful start point for you: percona online tools |
|||
|
|
|
MySQL allocates the memory for the bufferpool at startup, but only actually occupies the memory as needed. This means that the MySQL will not start if it cannot grab ahold of 128M of RAM, but your server will not initially use that 128M of memory. Until the bufferpool is fully utilized, the RAM will be available to other applications. |
|||
|
|
|
Yes - at its maximum! The point of buffer pool - is to use memory cache, not any other 8-) |
||||
|
|
|
The buffer pool is used by MySQL for caching InnoDB data and indexes in memory. It is not the total memory used but your MySQL DB If your InnoDB tables are that small 128MB is more than enough and effectively all InnoDB tables will be treated as in-memory tables. The 128Mb is a limit of how large the buffer can be and it is only filled when needed. You can read about it here |
|||
|
|