mysql 5.5 -- innodb buffer pool最佳化
一個是存放大部分查詢所需用到的塊;
另一個是存放小量查詢所需用到的塊;並可以被回收;[@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
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/703656/viewspace-1042373/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- MySQL 引擎特性:InnoDB Buffer PoolMySql
- 【Mysql】mysql快速預熱innodb_buffer_poolMySql
- MySQL innodb_buffer_pool_size 變數MySql變數
- MySQL監控InnoDB Buffer Pool命中率MySql
- MySQL innodb buffer pool 命中率以及快取了哪些 InnoDB TableMySql快取
- mysql引數之innodb_buffer_pool_size大小設定MySql
- MySQL服務端innodb_buffer_pool_size配置引數MySql服務端
- 給從庫預熱innodb buffer pool
- MySQL 5.7新特性之動態修改innodb_buffer_pool大小MySql
- 計算innodb_buffer_pool使用率
- ubuntu 命令列更改innodb_buffer_pool_sizeUbuntu命令列
- MySQL5.7 線上調整Innodb_Buffer_Pool_size不用重啟mysql程式薦MySql
- 【Mysql】讀書筆記之--innodb_buffer_pool記憶體的管理MySql筆記記憶體
- MySQL 5.5 -- innodb_purge_threadsMySqlthread
- MySQL 8.0 Reference Manual(讀書筆記72節--InnoDB Buffer Pool Configuration (3))MySql筆記
- MySQL 8.0 Reference Manual(讀書筆記71節--InnoDB Buffer Pool Configuration (2))MySql筆記
- MySQL 8.0 Reference Manual(讀書筆記70節--InnoDB Buffer Pool Configuration (1))MySql筆記
- MySQL入門--記憶體buffer poolMySql記憶體
- Innodb特性之Read-Ahead(Buffer Pool Prefetching)
- fast recovery for innodb1.07 in Mysql 5.5ASTMySql
- MySQL中讀頁緩衝區buffer poolMySql
- MySQL 5.5 -- innodb_lock_wait 鎖 等待MySqlAI
- MySQL 5.5 InnoDB表鎖行鎖測試MySql
- mysql innodb_log_file_size 和innodb_log_buffer_size引數MySql
- Mysql核心:INNODB儲存引擎--《十一》Insert BufferMySql儲存引擎
- MySQL怎麼緩解讀的壓力的?---buffer poolMySql
- Innodb特性之change buffer
- 【Mysql】Mysql額外記憶體池 innodb_additional_mem_pool_sizeMySql記憶體
- mysql 5.5 innodb事務隔離級別之開篇MySql
- mySQL5.6新特性快速預熱Buffer_Pool緩衝池MySql
- mysql 5.5引數--innodb_read(write)_io_threadsMySqlthread
- Mysql innodb儲存引擎的效能最佳化MySql儲存引擎
- MYSQL innodb buffer 狀態資料的儲存和載入MySql
- 最佳化mysql之key_buffer_size設定MySql
- percona save/restore buffer pool特性記錄REST
- 關於BUFFER POOL的一些總結
- New in Mysql 5.5MySql
- MySQL Join BufferMySql