MySQL Study之--MySQL体系结构深入解析
MySQL体系架构
由连接池组件、管理服务和⼯工具组件、sql接口组件、查询分析器组件、优化器组件、缓冲组件、插件式存储引擎、物理⽂文件组成。mysql是独有的插件式体系结构,各个存储引擎有自己的特点。
watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="">
Mysql 进程结构
Mysql不像oracle那样是通过多进程来完毕其功能的。默认情况下,InnoDB存储引擎的后台线程有7个:
4个IO thread,
1个master thread,
1个锁(lock)监控线程。
1个错误监控线程。
在InnoDB Plugin版本号開始添加了默认IO thread的数量,默认的read thread和write thread分别增大到了4个。而且不再使用innodb_file_ io_threads參数,而是分别使用innodb_read_io_threads和innodb_write_io_threads參数。
查看mysql thread:
<strong><span style="font-size:14px;">mysql> show variables like 'innodb_%version%';</span></strong>
+----------------+-------+
| Variable_name | Value |
+----------------+-------+
| innodb_version | 1.2.4 |
+----------------+-------+
1 row in set (0.00 sec)
<strong><span style="font-size:14px;">mysql> show engine innodb status;</span></strong>
=====================================
150709 15:26:40 INNODB MONITOR OUTPUT
=====================================
Per second averages calculated from thelast 12 seconds
-----------------
BACKGROUND THREAD
-----------------
srv_master_thread loops: 0 srv_active, 0srv_shutdown, 804 srv_idle
srv_master_thread log flush and writes: 804
----------
SEMAPHORES
----------
OS WAIT ARRAY INFO: reservation count 2
OS WAIT ARRAY INFO: signal count 2
Mutex spin waits 0, rounds 0, OS waits 0
RW-shared spins 2, rounds 60, OS waits 2
RW-excl spins 0, rounds 0, OS waits 0
Spin rounds per wait: 0.00 mutex, 30.00RW-shared, 0.00 RW-excl
------------
TRANSACTIONS
------------
Trx id counter 5377
Purge done for trx's n:o < 4872 undo n:o< 0
History list length 1
LIST OF TRANSACTIONS FOR EACH SESSION:
---TRANSACTION 0, not started
MySQL thread id 3, OS thread handle0x7f1656c75700, query id 5 localhost root init
show engine innodb status
--------
FILE I/O
--------
<strong>I/O thread 0 state: waiting for completedaio requests (insert buffer thread)
I/O thread 1 state: waiting for completedaio requests (log thread)
I/O thread 2 state: waiting for completedaio requests (read thread)
I/O thread 3 state: waiting for completedaio requests (read thread)
I/O thread 4 state: waiting for completedaio requests (read thread)
I/O thread 5 state: waiting for completedaio requests (read thread)
I/O thread 6 state: waiting for completedaio requests (write thread)
I/O thread 7 state: waiting for completedaio requests (write thread)
I/O thread 8 state: waiting for completedaio requests (write thread)
I/O thread 9 state: waiting for completedaio requests (write thread)
Pending normal aio reads: 0 [0, 0, 0, 0] ,aio writes: 0 [0, 0, 0, 0] ,</strong>
ibufaio reads: 0, log i/o's: 0, sync i/o's: 0
Pending flushes (fsync) log: 0; bufferpool: 0
283 OS file reads, 5 OS file writes, 5 OSfsyncs
0.00 reads/s, 0 avg bytes/read, 0.00writes/s, 0.00 fsyncs/s
-------------------------------------
INSERT BUFFER AND ADAPTIVE HASH INDEX
-------------------------------------
Ibuf: size 1, free list len 0, seg size 2,0 merges
merged operations:
insert 0, delete mark 0, delete 0
discarded operations:
insert 0, delete mark 0, delete 0
Hash table size 276707, node heap has 0buffer(s)
0.00 hash searches/s, 0.00 non-hashsearches/s
---
LOG
---
Log sequence number 1611537
Log flushed up to 1611537
Pages flushed up to 1611537
Last checkpoint at 1611537
0 pending log writes, 0 pending chkp writes
8 log i/o's done, 0.00 log i/o's/second
----------------------
BUFFER POOL AND MEMORY
----------------------
Total memory allocated 137363456; inadditional pool allocated 0
Dictionary memory allocated 39010
Buffer pool si
MySQL Study之--MySQL体系结构深入解析的更多相关文章
- MySQL Study之--MySQL用户及权限管理
MySQL Study之--MySQL用户及权限管理 MySQLserver通过MySQL权限表来控制用户对数据库的訪问.MySQL权限表存放在mysql数据库里.由mysql_install ...
- MySQL Study之--Mysql无法启动“mysql.host”
MySQL Study之--Mysql无法启动"mysql.host" 系统环境: 操作系统:RedHat EL55 DB Soft: Mysql 5.6.4-m7 通过源代码包 ...
- MySQL Study之--MySQL schema_information数据库
MySQL Study之--MySQL schema_information数据库 information_schema数据库是在mysql的版本号5.0之后产生的,一个虚拟数据库,物理上 ...
- MySQL Study之--MySQL普通用户无法本地登陆
MySQL Study之--MySQL普通用户无法本地登陆 在安装完毕MySQL后,我们通常加入拥有对应权限的普通用户用来訪问数据库.在使用用户本地登录数据库的时候,常常会出现怎么登录也无 ...
- MySQL Study之--MySQL下图形工具的使用(MySQL Administrator)
MySQL Study之--MySQL下图形工具的使用(MySQL Administrator) 系统环境: 操作系统: Windows 7(64) 下载地址:http://www.soft ...
- MySQL Study之--MySQL压力測试工具mysqlslap
MySQL Study之--MySQL压力測试工具mysqlslap 一.Mysqlslap介绍 mysqlslap是MySQL5.1之后自带的benchmark基准測试工具,类似Apache ...
- MySQL学习笔记-MySQL体系结构总览
MySQL体系结构总览 不管是用哪种数据库,了解数据库的体系结构都是极为重要的.MySQL体系结构主要由数据库和数据库实例构成. 数据库:物理操作系统文件或者其它文件的集合,在mysql中,数据库文件 ...
- MySQL的JDBC驱动源码解析
原文: MySQL的JDBC驱动源码解析 大家都知道JDBC是Java访问数据库的一套规范,具体访问数据库的细节有各个数据库厂商自己实现 Java数据库连接(JDBC)由一组用 Java 编程语言 ...
- MySQL中的xtrabackup的原理解析
xtrabackup的官方下载地址为 http://www.percona.com/software/percona-xtrabackup. xtrabackup包含两个主要的工具,即xtraback ...
随机推荐
- [SDOI2004]打鼹鼠
...... 心血来潮,手打abs 结果...BZOJ上CE,洛谷上WA... 把宏定义换成函数就过了 显然一个点可以走到另一个点,当且仅当两点鼹鼠出现时间$\leq$两点间距离的曼哈顿距离 显然是D ...
- Oracle 当输入参数允许为空时
场景: 有一个存储过程p_test 带有多个输入参数code.name.number p_test(code IN VARCHAR2,nameIN VARCHAR2,number IN VARCHAR ...
- Laravel5.1学习笔记5 请求
HTTP 请求 #取得请求实例 #基本的请求信息 #PSR-7 请求 #取出输入数据 #旧的输入 #Cookies #文件 #取得请求实例(此部分文档5.1完全重写,注意) 要通过依赖注入获取当前HT ...
- animation与transition的简单讲述
CSS动画分为两大组成部分:transition和animation 在CSS 3引入Transition(过渡)这个概念之前,CSS是没有时间轴的.也就是说,所有的状态变化,都是即时完成. tran ...
- Android,加载离线Android API文档缓慢问题!
解决方法:在host文件末添加如下信息! 0.0.0.0 www.googleapis.com 0.0.0.0 www.google.com 0.0.0.0 www.google-analytics. ...
- Embedded之Stack之二
1 Function Programming languages make functions easy to maintain and write by giving each function i ...
- 【sqli-labs】 less28 GET- Error based -All you Union&Select Belong to us -String -Single quote with parenthesis(GET型基于错误的去除了Union和Select的单引号带括号字符串型注入)
这个不是基于错误的吧,看源码可以知道错误并没有输出 那就使用;%00和order by试一下 http://192.168.136.128/sqli-labs-master/Less-28/?id=1 ...
- 小程序text组件内部上边距的问题
index.wxml: <view class="slogan"> <text> 建立跨文化的全球视野,做世界公民 </text> </v ...
- Jquery隐藏和显示Div的控制
html页面代码: <input type="checkbox" name="searchType" value="searchNews&quo ...
- Django的Error汇总
title: Django学习笔记 catalog: true subtitle: 11. Django_Error汇总 date: 2018-12-14 10:17:28 --- Django的Er ...