说明:
因画图布景空间不足,显示太小,第二张图以下用文字说明。
03 Purge Thread
目的为加快undo页的回收,Innodb支持多个Purge thread,同时由于Purge thread需要离散地读取undo页,这样也能更进一步利用磁盘的随机性能。
[email protected]:3306 [(none)]>show variables like "innodb_purge_threads";
+----------------------+-------+
| Variable_name | Value |
+----------------------+-------+
| innodb_purge_threads | 4 |
+----------------------+-------+
1 row in set (0.01 sec)
4.Page Cleaner Threader
其作用是将之前版本中脏页的刷新操作放入到单独的线程中来完成,而其目的是为了减轻原Master Thread的工作及对于用户查询线程的阻塞,进一步提高InnoDB存储的性能。
[email protected]:3306 [(none)]>show variables like "%Page%";
+--------------------------------------+-----------+
| Variable_name | Value |
+--------------------------------------+-----------+
| innodb_log_compressed_pages | ON |
| innodb_max_dirty_pages_pct | 75.000000 |
| innodb_max_dirty_pages_pct_lwm | 0.000000 |
| innodb_page_cleaners | 1 |
| innodb_page_size | 16384 |
| innodb_stats_persistent_sample_pages | 20 |
| innodb_stats_sample_pages | 8 |
| innodb_stats_transient_sample_pages | 8 |
| large_page_size | 0 |
| large_pages | OFF |
+--------------------------------------+-----------+
LRU
不插入首部,防止热数据被刷出。midpoint后的为旧列表。
(1)
[email protected]:3306 [(none)]>show variables like "%innodb_old_blocks_pct%";
+-----------------------+-------+
| Variable_name | Value |
+-----------------------+-------+
| innodb_old_blocks_pct | 37 |
+-----------------------+-------+
1 row in set (0.01 sec)
表示新读取的页插入到LRU列表尾端的37%位置
(2)以下表示页读取到mid位置后需要等待多久才会被加入到列表的热端。
[email protected]:3306 [(none)]>show variables like "%innodb_old_blocks_time%";
+------------------------+-------+
| Variable_name | Value |
+------------------------+-------+
| innodb_old_blocks_time | 1000 |
+------------------------+-------+
1 row in set (0.00 sec)