标签:int cti size 数据结构 complete value span csdn buffer
InnoDB存储引擎是第一个完整支持ACID事务的MySql存储引擎,其特点是行锁设计、支持MVCC、支持外键、提供一致性非锁定读,同时被设计用来最有效地利用以及使用CPU和内存。
上图是InnoDB存储引擎的体系结构,可以看到InnoDB存储引擎有很多内存块,这些内存块组成了一个大的内存池,负责如下工作:
后台线程的主要作用是负责刷新内存池中的数据,保证缓冲池中的内存缓存是最近的数据 。此外,还将已经修改的数据文件刷新到磁盘文件,同时保证在数据库发生异常的情况下InnoDB能恢复到正常运行状态。
InnoDB存储引擎是多线程的模型,后台有多个不同的后台线程,负责处理不同的任务。
mysql> show engine innodb status\G
下面是部分输出:
show engine innodb status
--------
FILE I/O
--------
I/O thread 0 state: waiting for completed aio requests (insert buffer thread)
I/O thread 1 state: waiting for completed aio requests (log thread)
I/O thread 2 state: waiting for completed aio requests (read thread)
I/O thread 3 state: waiting for completed aio requests (read thread)
I/O thread 4 state: waiting for completed aio requests (read thread)
I/O thread 5 state: waiting for completed aio requests (read thread)
I/O thread 6 state: waiting for completed aio requests (write thread)
I/O thread 7 state: waiting for completed aio requests (write thread)
I/O thread 8 state: waiting for completed aio requests (write thread)
I/O thread 9 state: waiting for completed aio requests (write thread)
[mysqld]
innodb_purge_threads=1
从版本1.2开始,InnoDB支持多个Purge Thread,这样的目的是为了进一步加快undo页的回收。
通过下面命令可以查看InnoDB开启了多少个purge thread:
mysql> show variables like ‘innodb_purge_threads‘;
+----------------------+-------+
| Variable_name | Value |
+----------------------+-------+
| innodb_purge_threads | 0 |
+----------------------+-------+
1 row in set (0.00 sec)
可以看到我的没有配置purge thread为独立的线程。
标签:int cti size 数据结构 complete value span csdn buffer
原文地址:http://blog.csdn.net/linux_ever/article/details/61210322