您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

Mysql InnoDB笔记内存_MySQL

2024/8/25 10:06:01发布25次查看
bitscn.com
mysql innodb笔记内存
innodb 状态
sql代码  
show engine innodb status/g;  
    执行结果
type: innodb
name:
status:
per second averages calculated from the last 6 seconds
-----------------
background thread
-----------------
srv_master_thread loops: 0 srv_active, 0 srv_shutdown, 17509 srv_idle
srv_master_thread log flush and writes: 17509
----------
semaphores
----------
os wait array info: reservation count 2
os wait array info: signal count 2
mutex spin waits 5, rounds 12, 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: 2.40 mutex, 30.00 rw-shared, 0.00 rw-excl
------------
transactions
------------
trx id counter 17154
purge done for trx's n:o
history list length 588
list of transactions for each session:
---transaction 0, not started
mysql thread id 1, os thread handle 0x8ac, query id 15 localhost 127.0.0.1 root
init
show engine innodb status
--------
file i/o
--------
i/o thread 0 state: wait windows aio (insert buffer thread)
i/o thread 1 state: wait windows aio (log thread)
i/o thread 2 state: wait windows aio (read thread)
i/o thread 3 state: wait windows aio (read thread)
i/o thread 4 state: wait windows aio (read thread)
i/o thread 5 state: wait windows aio (read thread)
i/o thread 6 state: wait windows aio (write thread)
i/o thread 7 state: wait windows aio (write thread)
i/o thread 8 state: wait windows aio (write thread)
i/o thread 9 state: wait windows aio (write thread)
pending normal aio reads: 0 [0, 0, 0, 0] , aio writes: 0 [0, 0, 0, 0] ,
ibuf aio reads: 0, log i/o's: 0, sync i/o's: 0
pending flushes (fsync) log: 0; buffer pool: 0
312 os file reads, 5 os file writes, 5 os fsyncs
0.00 reads/s, 0 avg bytes/read, 0.00 writes/s, 0.00 fsyncs/s
-------------------------------------
insert buffer and adaptive hash index   性能  插入缓冲与自适应哈希    插入缓冲不是缓冲池的一部分.它使用于索引是辅助索引,且索引不是唯一的.因为如主键自增长则插入这个聚集索引按顺序插入很快完成,但是如表另有不是唯一的非聚集索引,就需要对非聚集索引的叶子节点插入离散存储b+树.
-------------------------------------
ibuf: size 1, free list len 0, seg size 2, 0 merges     segsize:当前插入缓冲大小为2*16kb. free list 为空闲列表长度 size 为 已合并记录页为数量    insert 为插入记录数,merged 合并的页数量,merges合并次数
merged operations:
insert 0, delete mark 0, delete 0
discarded operations:
insert 0, delete mark 0, delete 0
hash table size 553253, node heap has 1 buffer(s)
0.00 hash searches/s, 0.00 non-hash searches/s
---
log
---
log sequence number 2122026419
log flushed up to 2122026419
pages flushed up to 2122026419
last checkpoint at 2122026419
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 135987200; in additional pool allocated 0
dictionary memory allocated 32514
buffer pool size 8192
free buffers 7892
database pages 299
old database pages 0
modified db pages 0
pending reads 0
pending writes: lru 0, flush list 0 single page 0
pages made young 0, not young 0
0.00 youngs/s, 0.00 non-youngs/s
pages read 299, created 0, written 1
0.00 reads/s, 0.00 creates/s, 0.00 writes/s
no buffer pool page gets since the last printout
pages read ahead 0.00/s, evicted without access 0.00/s, random read ahead 0.00/s
lru len: 299, unzip_lru len: 0
i/o sum[0]:cur[0], unzip sum[0]:cur[0]
--------------
row operations
--------------
0 queries inside innodb, 0 queries in queue
0 read views open inside innodb
main thread id 2708, state: sleeping
number of rows inserted 0, updated 0, deleted 0, read 0
0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s
----------------------------
end of innodb monitor output
============================
innodb的内存
由缓冲池,重做日志缓冲池及额外的内存构成.
sql代码  
show variables like 'innodb_buffer_pool_size'/g;   134217728  
show variables like 'innodb_log_buffer_size'/g;     8388608  
show variables like 'innodb_additional_mem_pool_size'/g;     8388608  
 缓冲池是最大的部分,用来存放各种数据的缓存.引擎按页16kb/每页读取到缓冲池,然后按lru保留缓冲池中的数据.如果数据库文件需要修改,先修改缓冲池中的页,修改后即为脏页,然后按一定的频率将脏页刷新到文件.
buffer pool size 8192 中的大小即可算出缓冲区 8192*16(kb/page)/1024 =?
缓冲池中缓存的数据类型有:索引页,数据页,undo页,插入缓冲,自适应哈希索引,innodb锁信息,数据字典等.
awe 开启后引擎自动禁用自适应哈希索引.
日志缓冲将重做日志信息先放入这个缓冲区,再按一定的频率将其刷新到重做日志文件.
bitscn.com
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product