innerDBA 发表于 2023-7-26 09:48:48

请问两个表统计BUF POOL大小不一样?

information_schema.innodb_buffer_pool_stats 和 information_schema.innodb_buffer_page统计大小不一样
状态池中用BUF_MB对比
select
sum(pool_size)*16/1024 as POOL_MB,
sum(free_buffers)*16/1024 as FREE_MB,
sum(database_pages)*16/1024 as BUF_MB,
sum(old_database_pages)*16/1024 as OLD_LIST_MB,
sum(modified_database_pages)*16/1024 as FLUSH_MB ,
(sum(database_pages)-sum(old_database_pages)) *16/1024 as NEW_LIST_MB
from information_schema.innodb_buffer_pool_stats;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA6UAAABLCAYAAACIhyEpAAAYAUlEQVR4nO3db2gbZ54H8G/3li2Fhlu27JYeDR4pWL7jem/OelMEGUVJ1MDduyMsiWhkucaEvLhXR8g69lqqXVPybuHWFDexrASVK9l97zq2rAno+kbHvtkXZ6WWxrhct7tbs6UNx+WN7sWMpGdG80eSRxrJ/n7AJJZGz4z1/Ob5N88z89LR0VEdgm+fv8AbP/0xRtFXf/rLyB47eYdxQIwBAhgH5D/GILlhjJDfhiUGf+D3ARAREREREdHpxU4pERERERER+YadUiIiIiIiIvINO6VERERERETkG3ZKiYiIiIiIyDfslBIREREREZFv2CklIiIiIiIi37BTSkRERERERL45fqe0kEFkKgfVdgMFmUgEEdufFHLVYx9FB17g9x+lkMraHykNj8PDQxweHvYhZcbBqGAMEMA4IP8xBskNY4T81r8YHJwfdvsBJR3B3JP21xORNeML47PIbyQhmf9voCI3len2EHr0I7wVkoADfc/ZFBL3K84fubyCUlq2eENBJjKHLbftqzmk3l1Dxe79RmqG7zSE2UdZJINiGkVExdfcNPbb9r2ryE0lsPassQ+rv8O0fx8cHh7iyy+/bP5+9uxZD1MfQBzo3zts0o4vlbAYc/g8nPJHfN/hmAsZRBa2LI69kWYcK6VFyOYY1Y5Qe88h+X4b7RgQ80d7H808F/Z5MKWlaZkHTvvUjXged2J04kDnUuar2RQSStSiPrQ+1+OmuLHjnO4GJKG8M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Bhq3VygsL5qaJi2BBAUOjCGiuachICwZmS30LopQUAKCDdBERvEDunR8djFgbkTur+LHZvKPRAQb5JVwKZw8xpv44B65lQW2OWFQwyYO6HadGCrypZlwVDZNl7RFgcXzI+Lan23BeMsie0HWK3o5/j+OhJ3arj1aQdXSG22M+7XGJuMgxPIoR1hvhFMYXdTb/jXsH79Nmo3H9tcIW2xrY8cYt+ePlukuYZaW2vdUYeFemfKq8L6qvHKpXmtpraVsZwSywu39Aysb2jEcor6ppdHwjQeCzNSj4SpC48BMT0KpHHrc8OP+Zb/XzyoX2+7/bn2qIBJ8+Ni2rYVtrNMt/2YzMdrvPW2Q3rU8a2tqx9f7yIOxLwWb6e+U79rekxLKx3z41u8jgOy02tZUK/XHfLCLgbq+m3wLfKdZYGvuooDU/luKA/E71bMp0nTYxfM5Yfh0Qja/x23M++XcTDy3Osjm3ZE3SY+DfE3aYqHzusjp9gXP2t8dIhDGUg966qcMp/fdo+oMsWJWF7YpmeuryzbvRqWUyfLsDwS5qWjo6O62En99vkL/OwnZ/zqIx/LH4++g/Tm634fBvlM/fJrxsEpxxgggHFA/mMMkhvGCPltWGLw9EzfJSIiIiIioqHDTikRERERERH5hp1SIiIiIiIi8g07pUREREREROQbdkqJiIiIiIjIN+yUEhERERERkW/YKSUiIiIiIiLfsFNKREREREREvmGnlIiIiIiIiHzDTikRERERERH5hp1SIiIiIiIi8g07pUREREREROQbdkqJiIiIiIjIN+yUEhERERERkW9eOjo6qosvfPv8hV/HQkRERERERAMkvfm634eAH5pfGIaDIiIiIiIiotOB03eJiIiIiIjIN+yUEhERERERkW/YKSUiIiIiIiLf/D8+9Poxx604wwAAAABJRU5ErkJggg==

据说如果页是16K 那么PAGE 是每一行就是16K
select SUM(PAGE_NUMBER) AS PAGE_NUM,SUM(NUMBER_RECORDS) AS CACHE_RECORDS,ROUND(count(*)*16/1204 ,2) AS MEM_SIZE_MB
from information_schema.innodb_buffer_page;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA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jd83yn+pn8g0kMYQiTD5TeHpdrqDp5cUvCBkYQOI9K61d9AB5ra9Xen2ZxQydJCcVCdUKtpn6M1K/7lIm61V5HZXiyxblw9epIoha89D0ujWjjqze9unFWzyQe3h/DwgMZIV3LeeTTvPrUzgIeyiFdy3kES3l1aOD8ApZ2vJX3hm48RKqm+78F5xfw8EYIl7ze2m1BfeLEPKHufIPyIWDcL88kHqpj1GP3l5RJu+qnjl12pzMfR88kHt7XVbClYp0J253lGk9hqaTFlJLQBAB1qEgXGxeXkNeGoZrEDZ0gaoIdMCcXDWKkbt2HMaQ+LcJbeW+oOry+v4bQx0Vcr2kE1m63o3UknUivHB0dlQHg52fP8c6bp/pdnrZ8d/QLhNPv9rsY5DDy028ZN+RojGHqt37E4Es/VEREREQvDyYuRERE5BhMXIiIiMgxmLgQERGRYzBxISIiIsdg4kJERESOwcSFiIiIHIOJCxERETkGExciIiJyDCYuRERE5BhMXIiIiMgxmLgQERGRYzBxISIiIsdg4kJERESO8crR0VEZAH5+9rzfZSEiIiKHEU6/29PtvdqvDRMRERG1ikNFRERE5BhMXIiIiMgxmLgQERGRYzBxISIiIsdg4kJERESOwcSFiIiIHIOJCxERETkGExciIiJyDCYuRERE5BhMXIiIiMgxmLgQERGRY/w/X1brSmJ3Q74AAAAASUVORK5CYII=
9088 和 7838 少了1025MB   是我统计错了, 还是BUF_POOL和BUF_PAGE是有差异?

KAiTO 发表于 2023-7-26 14:23:30

一点见解:

information_schema.innodb_buffer_pool_stats和information_schema.innodb_buffer_page
的确会显示不同的信息,因为它们描述的是不同的方面。两者在概念和实际数据存储方面都有差异。
innodb_buffer_pool_stats
这个表表示的是InnoDB缓冲池的总体统计信息,包括总的缓冲池大小、使用情况等。
innodb_buffer_page
表显示的是缓冲池中每个页面的详细信息,包括页面的类型、表空间ID、页面号、页面大小等。
当我们使用information_schema.innodb_buffer_pool_stats表的database_pages字段计算使用的缓冲池大小时,我们得到的是InnoDB缓冲池已经分配给各种页面(包括索引页、undo页、数据页、系统页等)的总量。而在information_schema.innodb_buffer_page表中,我们可能只统计了特定类型的页面(如数据页或索引页),或者在计算时未能包括所有已使用的页面,这可能会导致计算结果的不同。此外,这两个表的数据更新频率可能不同。在某些情况下,information_schema.innodb_buffer_pool_stats表可能会比information_schema.innodb_buffer_page表更新得更频繁,因此在计算时可能会出现偏差。-------------------------另:您第二个查询PAGE_NUMBER代表的是页码,不应该被加总,如果你要统计buffer pool的使用情况,你应该计算记录条数。即,使用COUNT(*)代替SUM(PAGE_NUMBER)

innerDBA 发表于 2023-7-26 14:45:43

KAiTO 发表于 2023-7-26 14:23
一点见解:

information_schema.innodb_buffer_pool_stats和information_schema.innodb_buffer_page


请问下 你的意思是说 此表 而在information_schema.innodb_buffer_page
可能只统计了 数据页和索引页 对吗?
页: [1]
查看完整版本: 请问两个表统计BUF POOL大小不一样?