91超碰碰碰碰久久久久久综合_超碰av人澡人澡人澡人澡人掠_国产黄大片在线观看画质优化_txt小说免费全本

溫馨提示×

溫馨提示×

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

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

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

靖宇县| 河间市| 北碚区| 泰兴市| 苍山县| 江阴市| 长海县| 浮山县| 浦北县| 临沭县| 临洮县| 灌云县| 台江县| 河南省| 左贡县| 扎兰屯市| 陇川县| 宜黄县| 鹤岗市| 商城县| 灯塔市| 达州市| 汨罗市| 邮箱| 宣城市| 鲁山县| 枣庄市| 浑源县| 武定县| 隆子县| 桑日县| 华宁县| 黔江区| 昌乐县| 东平县| 卓资县| 德格县| 宝清县| 雷波县| 大厂| 翁源县|