中文字幕av专区_日韩电影在线播放_精品国产精品久久一区免费式_av在线免费观看网站

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

mysql 5.5 -- innodb buffer pool優化

發布時間:2020-08-11 21:02:51 來源:ITPUB博客 閱讀:127 作者:Steven1981 欄目:MySQL數據庫
InnoDB buffer pool 被設為兩個SUBLIST:
一個是存放大部分查詢所需用到的塊;
另一個是存放小量查詢所需用到的塊;并可以被回收;
[@more@]

The InnoDB buffer pool is divided into two sublists:
A new sublist containing blocks that are heavily used by queries,
and an old sublist containing less-used blocks and from which candidates for eviction are taken.

InnoDB buffer pool 被設為兩個SUBLIST:
一個是存放大部分查詢所需用到的塊;
另一個是存放小量查詢所需用到的塊;并可以被回收;

In the default operation of the buffer pool,
a block when read in is loaded at the midpoint and then moved immediately to the head of the new sublist as soon as an access occurs.
In the case of a table scan (such as performed for a mysqldump operation),
each block read by the scan ends up moving to the head of the new sublist because multiple rows are accessed from each block.
This occurs even for a one-time scan, where the blocks are not otherwise used by other queries.
Blocks may also be loaded by the read-ahead background thread and then moved to the head of the new sublist by a single access.
These effects can be disadvantageous because they push blocks that are in heavy use by other queries out of the new sublist
to the old sublist where they become subject to eviction.

默認情況下,一個數據塊只要被訪問,那么這個塊將立刻被放到“最新訪問列表”的頭部;
像MYSQLDUMP,需求全表掃描一次,那么BUFFERPOOL里的塊將被重新換一次;
這樣做的一個缺點就是BUFFERPOOL里的塊換進換出特別的頻繁,而且有可能把一些熱塊給換出去;最終導致頻繁IO;

InnoDB now provides two system variables that enable LRU algorithm tuning:

innodb_old_blocks_pct
Specifies the approximate percentage of the buffer pool used for the old block sublist.
The range of values is 5 to 95. The default value is 37 (that is, 3/8 of the pool).

innodb_old_blocks_time
Specifies how long in milliseconds (ms) a block inserted into the old sublist must stay there after its first access
before it can be moved to the new sublist.
The default 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 ms 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

BLOCK 被第一次訪問的后,先呆在”old sublist“,的等待”innodb_old_blocks_time“ms后會移到“new sublist”;
這樣一個大的全表掃描查詢就不會馬上把熱塊給踢出去;

詳見: http://dev.mysql.com/doc/refman/5.5/en/innodb-buffer-pool.html

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

中江县| 榆林市| 河间市| 禹城市| 芜湖市| 丹东市| 罗山县| 卢湾区| 会泽县| 新民市| 阳山县| 贺兰县| 光山县| 德令哈市| 垫江县| 广灵县| 上虞市| 交城县| 清丰县| 迭部县| 深水埗区| 宁城县| 武城县| 德兴市| 綦江县| 三明市| 赣州市| 石首市| 齐齐哈尔市| 宿迁市| 依兰县| 巴青县| 云安县| 江门市| 肥乡县| 定日县| 四平市| 自治县| 利川市| 黄平县| 张家口市|