日志文件中没有错误,但这似乎对我没什么帮助。也许我误解了什么:
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
不同?我原本以为它们是一样的,或者非常接近……
答案1
我不是 MySQL 专家,但乍一看,变量innodb_buffer_pool_size
以字节为单位,而下面的值以页为单位。默认的 InnoDB 页面大小为 16KB,因此以字节为单位,您将获得相同的值:
16384 * 16 * 1024 = 268435456