Submit Search
Upload
MySQL AIO详解
•
2 likes
•
793 views
M
mysqlops
Follow
mysql,AIO,innodb
Read less
Read more
Technology
Business
Report
Share
Report
Share
1 of 20
Recommended
MySQL aio
MySQL aio
zhaolinjnu
Kissy design
Kissy design
yiming he
Kissy简介
Kissy简介
jay li
MySQL新技术探索与实践
MySQL新技术探索与实践
Lixun Peng
内部MySQL培训.3.基本原理
内部MySQL培训.3.基本原理
Lixun Peng
Moodle 项目帮助手册:程序编写准则
Moodle 项目帮助手册:程序编写准则
YUCHENG HU
HailDB: A NoSQL API Direct to InnoDB
HailDB: A NoSQL API Direct to InnoDB
stewartsmith
InnoDB Magic
InnoDB Magic
sunnygleason
Recommended
MySQL aio
MySQL aio
zhaolinjnu
Kissy design
Kissy design
yiming he
Kissy简介
Kissy简介
jay li
MySQL新技术探索与实践
MySQL新技术探索与实践
Lixun Peng
内部MySQL培训.3.基本原理
内部MySQL培训.3.基本原理
Lixun Peng
Moodle 项目帮助手册:程序编写准则
Moodle 项目帮助手册:程序编写准则
YUCHENG HU
HailDB: A NoSQL API Direct to InnoDB
HailDB: A NoSQL API Direct to InnoDB
stewartsmith
InnoDB Magic
InnoDB Magic
sunnygleason
深入解析MySQL之锁机制应用
深入解析MySQL之锁机制应用
banping
Making Backups in Extreme Situations
Making Backups in Extreme Situations
Sveta Smirnova
Innodb 和 XtraDB 结构和性能优化
Innodb 和 XtraDB 结构和性能优化
YUCHENG HU
XtraDB 5.7: key performance algorithms
XtraDB 5.7: key performance algorithms
Laurynas Biveinis
Mysql Optimization
Mysql Optimization
Renato Shirakashi
OUGLS 2016: How profiling works in MySQL
OUGLS 2016: How profiling works in MySQL
Georgi Kodinov
Mysql features for the enterprise
Mysql features for the enterprise
Giuseppe Maxia
Understanding MySql locking issues
Understanding MySql locking issues
Om Vikram Thapa
Metadata locking in MySQL 5.5
Metadata locking in MySQL 5.5
Kostja Osipov
Pldc2012 innodb architecture and internals
Pldc2012 innodb architecture and internals
mysqlops
Percon XtraDB Cluster in a nutshell
Percon XtraDB Cluster in a nutshell
Frederic Descamps
MySQL Scalability Mistakes - OTN
MySQL Scalability Mistakes - OTN
Ronald Bradford
Perf Tuning Short
Perf Tuning Short
Ligaya Turmelle
Locking and Concurrency Control
Locking and Concurrency Control
Morgan Tocker
MySQL Monitoring Mechanisms
MySQL Monitoring Mechanisms
Mark Leith
Mysql tech day_paris_ps_and_sys
Mysql tech day_paris_ps_and_sys
Mark Leith
Haute disponibilité my sql avec group réplication
Haute disponibilité my sql avec group réplication
Frederic Descamps
MySQL InnoDB Cluster - Group Replication
MySQL InnoDB Cluster - Group Replication
Frederic Descamps
InnoDB Locking Explained with Stick Figures
InnoDB Locking Explained with Stick Figures
Karwin Software Solutions LLC
SQL Transactions - What they are good for and how they work
SQL Transactions - What they are good for and how they work
Markus Winand
S1: InnoDB AIO原理及相关bug分析
S1: InnoDB AIO原理及相关bug分析
Hui Liu
Uliweb cheat sheet_0.1
Uliweb cheat sheet_0.1
modou li
More Related Content
Viewers also liked
深入解析MySQL之锁机制应用
深入解析MySQL之锁机制应用
banping
Making Backups in Extreme Situations
Making Backups in Extreme Situations
Sveta Smirnova
Innodb 和 XtraDB 结构和性能优化
Innodb 和 XtraDB 结构和性能优化
YUCHENG HU
XtraDB 5.7: key performance algorithms
XtraDB 5.7: key performance algorithms
Laurynas Biveinis
Mysql Optimization
Mysql Optimization
Renato Shirakashi
OUGLS 2016: How profiling works in MySQL
OUGLS 2016: How profiling works in MySQL
Georgi Kodinov
Mysql features for the enterprise
Mysql features for the enterprise
Giuseppe Maxia
Understanding MySql locking issues
Understanding MySql locking issues
Om Vikram Thapa
Metadata locking in MySQL 5.5
Metadata locking in MySQL 5.5
Kostja Osipov
Pldc2012 innodb architecture and internals
Pldc2012 innodb architecture and internals
mysqlops
Percon XtraDB Cluster in a nutshell
Percon XtraDB Cluster in a nutshell
Frederic Descamps
MySQL Scalability Mistakes - OTN
MySQL Scalability Mistakes - OTN
Ronald Bradford
Perf Tuning Short
Perf Tuning Short
Ligaya Turmelle
Locking and Concurrency Control
Locking and Concurrency Control
Morgan Tocker
MySQL Monitoring Mechanisms
MySQL Monitoring Mechanisms
Mark Leith
Mysql tech day_paris_ps_and_sys
Mysql tech day_paris_ps_and_sys
Mark Leith
Haute disponibilité my sql avec group réplication
Haute disponibilité my sql avec group réplication
Frederic Descamps
MySQL InnoDB Cluster - Group Replication
MySQL InnoDB Cluster - Group Replication
Frederic Descamps
InnoDB Locking Explained with Stick Figures
InnoDB Locking Explained with Stick Figures
Karwin Software Solutions LLC
SQL Transactions - What they are good for and how they work
SQL Transactions - What they are good for and how they work
Markus Winand
Viewers also liked
(20)
深入解析MySQL之锁机制应用
深入解析MySQL之锁机制应用
Making Backups in Extreme Situations
Making Backups in Extreme Situations
Innodb 和 XtraDB 结构和性能优化
Innodb 和 XtraDB 结构和性能优化
XtraDB 5.7: key performance algorithms
XtraDB 5.7: key performance algorithms
Mysql Optimization
Mysql Optimization
OUGLS 2016: How profiling works in MySQL
OUGLS 2016: How profiling works in MySQL
Mysql features for the enterprise
Mysql features for the enterprise
Understanding MySql locking issues
Understanding MySql locking issues
Metadata locking in MySQL 5.5
Metadata locking in MySQL 5.5
Pldc2012 innodb architecture and internals
Pldc2012 innodb architecture and internals
Percon XtraDB Cluster in a nutshell
Percon XtraDB Cluster in a nutshell
MySQL Scalability Mistakes - OTN
MySQL Scalability Mistakes - OTN
Perf Tuning Short
Perf Tuning Short
Locking and Concurrency Control
Locking and Concurrency Control
MySQL Monitoring Mechanisms
MySQL Monitoring Mechanisms
Mysql tech day_paris_ps_and_sys
Mysql tech day_paris_ps_and_sys
Haute disponibilité my sql avec group réplication
Haute disponibilité my sql avec group réplication
MySQL InnoDB Cluster - Group Replication
MySQL InnoDB Cluster - Group Replication
InnoDB Locking Explained with Stick Figures
InnoDB Locking Explained with Stick Figures
SQL Transactions - What they are good for and how they work
SQL Transactions - What they are good for and how they work
Similar to MySQL AIO详解
S1: InnoDB AIO原理及相关bug分析
S1: InnoDB AIO原理及相关bug分析
Hui Liu
Uliweb cheat sheet_0.1
Uliweb cheat sheet_0.1
modou li
HTML+COIMOTION 開發跨平台 app
HTML+COIMOTION 開發跨平台 app
Ben Lue
rebar erlang
rebar erlang
致远 郑
Mysql体系结构及原理(innodb)公开版
Mysql体系结构及原理(innodb)公开版
longxibendi
基于Ivy ant的java构建初探
基于Ivy ant的java构建初探
Anson Yang
Install oracle ebs r12.1.1 on OEL5.6 x86(include demo)
Install oracle ebs r12.1.1 on OEL5.6 x86(include demo)
acqua young
rebar erlang 2
rebar erlang 2
致远 郑
OPOA in Action -- 使用MagixJS简化WebAPP开发
OPOA in Action -- 使用MagixJS简化WebAPP开发
leneli
2018 8 18_play_framework
2018 8 18_play_framework
Lorn Jhu
Java2新觀念教本投影片ch1
Java2新觀念教本投影片ch1
5045033
Ibatis技术讲座
Ibatis技术讲座
xujie
開放源碼的ASP.NET Core & ADO.NET (for VS2015)
開放源碼的ASP.NET Core & ADO.NET (for VS2015)
MIS2000 Lab.
Spring ioc详解
Spring ioc详解
ygj_2008
Symfony簡介
Symfony簡介
Ricky Su
安博士Asec 2010年7月安全报告
安博士Asec 2010年7月安全报告
ahnlabchina
Erlang Practice
Erlang Practice
litaocheng
摘星
摘星
zenyuhao
用Raspberry PI學Linux驅動程式
用Raspberry PI學Linux驅動程式
Stanley Ho
iOS App 開發 -- Storybard 基礎練習、APP 上架、IAP
iOS App 開發 -- Storybard 基礎練習、APP 上架、IAP
Ming-Sian Lin
Similar to MySQL AIO详解
(20)
S1: InnoDB AIO原理及相关bug分析
S1: InnoDB AIO原理及相关bug分析
Uliweb cheat sheet_0.1
Uliweb cheat sheet_0.1
HTML+COIMOTION 開發跨平台 app
HTML+COIMOTION 開發跨平台 app
rebar erlang
rebar erlang
Mysql体系结构及原理(innodb)公开版
Mysql体系结构及原理(innodb)公开版
基于Ivy ant的java构建初探
基于Ivy ant的java构建初探
Install oracle ebs r12.1.1 on OEL5.6 x86(include demo)
Install oracle ebs r12.1.1 on OEL5.6 x86(include demo)
rebar erlang 2
rebar erlang 2
OPOA in Action -- 使用MagixJS简化WebAPP开发
OPOA in Action -- 使用MagixJS简化WebAPP开发
2018 8 18_play_framework
2018 8 18_play_framework
Java2新觀念教本投影片ch1
Java2新觀念教本投影片ch1
Ibatis技术讲座
Ibatis技术讲座
開放源碼的ASP.NET Core & ADO.NET (for VS2015)
開放源碼的ASP.NET Core & ADO.NET (for VS2015)
Spring ioc详解
Spring ioc详解
Symfony簡介
Symfony簡介
安博士Asec 2010年7月安全报告
安博士Asec 2010年7月安全报告
Erlang Practice
Erlang Practice
摘星
摘星
用Raspberry PI學Linux驅動程式
用Raspberry PI學Linux驅動程式
iOS App 開發 -- Storybard 基礎練習、APP 上架、IAP
iOS App 開發 -- Storybard 基礎練習、APP 上架、IAP
More from mysqlops
The simplethebeautiful
The simplethebeautiful
mysqlops
Oracle数据库分析函数详解
Oracle数据库分析函数详解
mysqlops
Percona Live 2012PPT:mysql-security-privileges-and-user-management
Percona Live 2012PPT:mysql-security-privileges-and-user-management
mysqlops
Percona Live 2012PPT: introduction-to-mysql-replication
Percona Live 2012PPT: introduction-to-mysql-replication
mysqlops
Percona Live 2012PPT: MySQL Cluster And NDB Cluster
Percona Live 2012PPT: MySQL Cluster And NDB Cluster
mysqlops
Percona Live 2012PPT: MySQL Query optimization
Percona Live 2012PPT: MySQL Query optimization
mysqlops
DBA新人的述职报告
DBA新人的述职报告
mysqlops
分布式爬虫
分布式爬虫
mysqlops
MySQL应用优化实践
MySQL应用优化实践
mysqlops
eBay EDW元数据管理及应用
eBay EDW元数据管理及应用
mysqlops
基于协程的网络开发框架的设计与实现
基于协程的网络开发框架的设计与实现
mysqlops
eBay基于Hadoop平台的用户邮件数据分析
eBay基于Hadoop平台的用户邮件数据分析
mysqlops
对MySQL DBA的一些思考
对MySQL DBA的一些思考
mysqlops
QQ聊天系统后台架构的演化与启示
QQ聊天系统后台架构的演化与启示
mysqlops
腾讯即时聊天IM1.4亿在线背后的故事
腾讯即时聊天IM1.4亿在线背后的故事
mysqlops
分布式存储与TDDL
分布式存储与TDDL
mysqlops
MySQL数据库生产环境维护
MySQL数据库生产环境维护
mysqlops
Memcached
Memcached
mysqlops
DevOPS
DevOPS
mysqlops
MySQL数据库开发的三十六条军规
MySQL数据库开发的三十六条军规
mysqlops
More from mysqlops
(20)
The simplethebeautiful
The simplethebeautiful
Oracle数据库分析函数详解
Oracle数据库分析函数详解
Percona Live 2012PPT:mysql-security-privileges-and-user-management
Percona Live 2012PPT:mysql-security-privileges-and-user-management
Percona Live 2012PPT: introduction-to-mysql-replication
Percona Live 2012PPT: introduction-to-mysql-replication
Percona Live 2012PPT: MySQL Cluster And NDB Cluster
Percona Live 2012PPT: MySQL Cluster And NDB Cluster
Percona Live 2012PPT: MySQL Query optimization
Percona Live 2012PPT: MySQL Query optimization
DBA新人的述职报告
DBA新人的述职报告
分布式爬虫
分布式爬虫
MySQL应用优化实践
MySQL应用优化实践
eBay EDW元数据管理及应用
eBay EDW元数据管理及应用
基于协程的网络开发框架的设计与实现
基于协程的网络开发框架的设计与实现
eBay基于Hadoop平台的用户邮件数据分析
eBay基于Hadoop平台的用户邮件数据分析
对MySQL DBA的一些思考
对MySQL DBA的一些思考
QQ聊天系统后台架构的演化与启示
QQ聊天系统后台架构的演化与启示
腾讯即时聊天IM1.4亿在线背后的故事
腾讯即时聊天IM1.4亿在线背后的故事
分布式存储与TDDL
分布式存储与TDDL
MySQL数据库生产环境维护
MySQL数据库生产环境维护
Memcached
Memcached
DevOPS
DevOPS
MySQL数据库开发的三十六条军规
MySQL数据库开发的三十六条军规
MySQL AIO详解
1.
MySQL AIO 丹臣/赵林
2011/8/16
2.
content aio参数,以及aio线程状态 5个os_aio_array_struct结构体,以及初始化
aio的消费者-IO线程的启动及运行流程 aio的生产者
3.
aio参数 一些控制参数: innodb_thread_concurrency=16
innodb_read_io_threads=8 innodb_write_io_threads=8
4.
查看aio线程状态 Show innodb
status中FILE I/O部份
5.
5个aio arrays的定义
6.
os_aio_array_struct
7.
aio初始化,以及创建I/O线程 os_aio_init(io_limit, srv_n_read_io_threads,
srv_n_write_io_threads, SRV_MAX_N_PENDING_SYNC_IOS); /* Create i/o-handler threads: */ for (i = 0; i < srv_n_file_io_threads; i++) { n[i] = i; os_thread_create(io_handler_thread, n + i, thread_ids + i); }
8.
这5个aio arrays数组初始化,请注意这个函数最上面的注解
9.
10.
n_reserved是指这个array中正在使用的slot有多少个
11.
12.
fil_aio_wait函数
13.
os_aio_simulated_handle函数
14.
mutex为什么可以提前释放?
15.
os_aio_write_array 一个segment包含很多个slots,这里每个只画了2个,是一个示例.每个segment会有对应的一个IO线程来处理. Segment
2 Segment 3 几个io线程消费slots,以及连接线程将aio请求放入slots中,每个线程都要去获得os_aio_write_array->mutex,所以这里存在争用,各个线程需要减少持有mutex的时间 Segment 4 Segment 5
16.
Mutex再次获得,修改slot状态
17.
好处与前提 最耗时的os i/o操作,io
thread不会持有mutex,减少了mutex争用 read/write aio array里存在多个segments,提高了并发 os_aio_read_array os_aio_write_array 前提:一个io线程只能操作对应的一个segment,其它io线程无法访问这个segment
18.
aio的生产者 Fil_io /*
Queue the aio request */ ret = os_aio(type, mode | wake_later, node->name, node->handle, buf,offset_low, offset_high, len, node, message);
19.
aio的生产者 fio_io调用os_aio函数
20.
os_aio_simulated_wake_handler_thread
21.
About me 新浪微博:http://weibo.com/zhaolinjnu
个人blog:http://zhaolinjnu.blog.sohu.com/ Email: danchen@taobao.com