控制InnoDB LRU链表的两个参数——innodb_old_blocks_time和innodb_old_blocks_pct

innodb_old_blocks_timeinnodb_old_blocks_pct

innodb_old_blocks_pct:

    1)全局、动态变量,默认值 37,取值范围为5~95。
    2)Specifies the approximate percentage of the InnoDB buffer pool used for the old block sublist

innodb_old_blocks_time:

    1)全局、动态变量,默认值 1000,取值范围为0~2**32-1,单位ms。
    2)Specifies how long in milliseconds a block inserted into the old sublist must stay there after its first access before it can be moved to the new sublist.
         If the value is 0, a block inserted into the old sublist moves immediately to the new sublist the first time it is accessed, no matter how soon after insertion the access occurs.
         If the value is greater than 0, blocks remain in the old sublist until an access occurs at least that many milliseconds after the first access. 
         For example, a value of 1000 causes blocks to stay in the old sublist for 1 second after the first access before they become eligible to move to the new sublist.

innodb_old_blocks_pct用来确定LRU链表中old sublist所占比例
innodb_old_blocks_time用来控制old sublist中page的转移策略,新的page页在进入LRU链表中时,会先插入到old sublist的头部,然后page需要在old sublist中停留innodb_old_blocks_time这么久后,下一次对该page的访问才会使其移动到new sublist的头部,
该参数的设置可以保护new sublist,尽可能的防止其being filled by page that is referenced only for a brief period。

原文出处:csdn -> https://blog.csdn.net/u014710633/article/details/94594598

本站所发布的一切资源仅限用于学习和研究目的;不得将上述内容用于商业或者非法用途,否则,一切后果请用户自负。本站信息来自网络,版权争议与本站无关。您必须在下载后的24个小时之内,从您的电脑中彻底删除上述内容。如果您喜欢该程序,请支持正版软件,购买注册,得到更好的正版服务。如果侵犯你的利益,请发送邮箱到 [email protected],我们会很快的为您处理。