MySQL的InnoDB buffer_pool_size不增加?

日志文件中没有错误,但是这似乎并没有加在我身上。 也许我误解了一些东西:

mysql> show variables like '%buffer_pool%'; +-------------------------+-----------+ | Variable_name | Value | +-------------------------+-----------+ | innodb_buffer_pool_size | 268435456 | +-------------------------+-----------+ 1 row in set (0.00 sec) mysql> show innodb status\G [...] ---------------------- BUFFER POOL AND MEMORY ---------------------- Total memory allocated 307469458; in additional pool allocated 1046016 Dictionary memory allocated 1258016 Buffer pool size 16384 Free buffers 10303 Database pages 5702 Modified db pages 30 Pending reads 0 Pending writes: LRU 0, flush list 0, single page 0 Pages read 2818, created 2884, written 659615 0.00 reads/s, 0.03 creates/s, 3.48 writes/s Buffer pool hit rate 1000 / 1000 

Buffer pool size是否与configuration设置不同? 我期待他们是相同的,或者非常接近…

我不是一个MySQL专家,但乍一看,它看起来像variablesinnodb_buffer_pool_size是以字节为单位,而下面的值是在页面中。 InnoDB的默认页面大小是16KB,所以以字节为单位,你会得到相同的值:

 16384 * 16 * 1024 = 268435456