MySQL Study之--MySQL体系结构深入解析

MySQL体系架构

由连接池组件、管理服务和⼯工具组件、sql接口组件、查询分析器组件、优化器组件、缓冲组件、插件式存储引擎、物理⽂文件组成。mysql是独有的插件式体系结构,各个存储引擎有自己的特点。

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
posted @
2017-06-26 08:23 
wzzkaifa 
阅读(...) 
评论(...) 
编辑 
收藏

MySQL Study之--MySQL体系结构深入解析的更多相关文章

  1. MySQL Study之--MySQL用户及权限管理

    MySQL Study之--MySQL用户及权限管理     MySQLserver通过MySQL权限表来控制用户对数据库的訪问.MySQL权限表存放在mysql数据库里.由mysql_install ...

  2. MySQL Study之--Mysql无法启动“mysql.host”

    MySQL Study之--Mysql无法启动"mysql.host" 系统环境: 操作系统:RedHat EL55 DB Soft:  Mysql 5.6.4-m7 通过源代码包 ...

  3. MySQL Study之--MySQL schema_information数据库

    MySQL Study之--MySQL schema_information数据库       information_schema数据库是在mysql的版本号5.0之后产生的,一个虚拟数据库,物理上 ...

  4. MySQL Study之--MySQL普通用户无法本地登陆

    MySQL Study之--MySQL普通用户无法本地登陆       在安装完毕MySQL后,我们通常加入拥有对应权限的普通用户用来訪问数据库.在使用用户本地登录数据库的时候,常常会出现怎么登录也无 ...

  5. MySQL Study之--MySQL下图形工具的使用(MySQL Administrator)

    MySQL Study之--MySQL下图形工具的使用(MySQL Administrator) 系统环境:     操作系统: Windows  7(64) 下载地址:http://www.soft ...

  6. MySQL Study之--MySQL压力測试工具mysqlslap

    MySQL Study之--MySQL压力測试工具mysqlslap 一.Mysqlslap介绍     mysqlslap是MySQL5.1之后自带的benchmark基准測试工具,类似Apache ...

  7. MySQL学习笔记-MySQL体系结构总览

    MySQL体系结构总览 不管是用哪种数据库,了解数据库的体系结构都是极为重要的.MySQL体系结构主要由数据库和数据库实例构成. 数据库:物理操作系统文件或者其它文件的集合,在mysql中,数据库文件 ...

  8. MySQL的JDBC驱动源码解析

    原文:   MySQL的JDBC驱动源码解析 大家都知道JDBC是Java访问数据库的一套规范,具体访问数据库的细节有各个数据库厂商自己实现 Java数据库连接(JDBC)由一组用 Java 编程语言 ...

  9. MySQL中的xtrabackup的原理解析

    xtrabackup的官方下载地址为 http://www.percona.com/software/percona-xtrabackup. xtrabackup包含两个主要的工具,即xtraback ...

随机推荐

  1. 【poj1995】快速幂

    题目大意 求a^b %p 1≤a,b,p≤10^9 思路 时间O(10^9)一定会爆T,采用数学方法+位运算,得到O(log b)的快速幂算法 代码 #include<cstdio> #i ...

  2. [SGU 199] Beautiful People

    [SGU 199] Beautiful People The most prestigious sports club in one city has exactly N members. Each ...

  3. django模型层(二)

    多表操作 创建模型 实例:我们来假定下面这些概念,字段和关系 作者模型:一个作者有姓名和年龄. 作者详细模型:把作者的详情放到详情表,包含生日,手机号,家庭住址等信息.作者详情模型和作者模型之间是一对 ...

  4. JavaScript 关于DOM的事件操作

    一.JavaScript的组成 JavaScript基础分为三个部分: ECMAscript:JavaScript的标准语法.包括变量,表达式,运算符,函数,if语句,for语句等. DOM:文档对象 ...

  5. RabbitMQ 官方NET教程(四)【路由选择】

    在上一个教程中,我们构建了一个简单的日志记录系统. 我们能够广播日志消息给所有你的接收者. 在本教程中,我们将为其添加一个功能 - 我们将让日志接收者可以仅订阅一部分消息. 例如,我们将能够仅将关键的 ...

  6. Spring Cloud (2) 服务消费者-基础

    LoadBalancerClient 使用Spring Cloud提供的负载均衡器客户端来实现服务的消费. 首先创建一个服务消费者工程,命名为com.david.consumer,并在pom.xml中 ...

  7. electron 学习

    index.html <!DOCTYPE html> <html lang="en"> <head> <meta charset=&quo ...

  8. 【C++】四种排序算法的时间比较

    四种排序算法的时间比较 [注]clock函数对输入(用户输入)元素N排序的计时 #include<iostream> #include<time.h> using namesp ...

  9. ASP.NE 上传文件控件

    protected void Button1_Click(object sender, EventArgs e) { //if (Request["id"]==null & ...

  10. BZOJ 1738: [Usaco2005 mar]Ombrophobic Bovines 发抖的牛 网络流 + 二分 + Floyd

    Description FJ's cows really hate getting wet so much that the mere thought of getting caught in the ...