# Percona eats SWAP

**URL:** <https://forums.percona.com/t/percona-eats-swap/4846>\
**Category:** Other MySQL® Questions\
**Created:** [April 19, 2016, 4:11am UTC](https://forums.percona.com/t/percona-eats-swap/4846 "2016-04-19T04:11:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Timur\_Solodovnikov](https://avatars.discourse-cdn.com/v4/letter/t/9dc877/32.png) [@Timur\_Solodovnikov](https://forums.percona.com/u/Timur_Solodovnikov)\
**Post date:** [April 19, 2016, 4:11am UTC](https://forums.percona.com/t/percona-eats-swap/4846/1 "2016-04-19T04:11:50Z")

</div>

Hello, I’m using Percona vesrion 5.6.26-74.0-56-log and SWAP usage increases day by day. I thought that may be INNODB\_BUFER\_POOL SIZE is too hight but after restart with changing 16GB-\>12GB nothing changed. Please help to understand root cause and fix an issue.

CentOS release 6.6 (Final)

free command:  
$ free  
total used free shared buffers cached  
Mem: 32886804 32540372 346432 8 176036 15069528  
-/+ buffers/cache: 17294808 15591996  
Swap: 4194300 715520 3478780

Part of top command:  
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ SWAP COMMAND  
XXX mysql 20 0 22.1g 15g 7932 S 1.6 48.0 5231:45 648m mysqld

part of my.cnf:  
table\_open\_cache=6000  
table\_definition\_cache=6000  
performance\_schema=off

query\_cache\_type = 1  
query\_cache\_size = 100M  
query\_cache\_limit = 1M

innodb\_buffer\_pool\_size = 12G

key\_buffer\_size = 8M  
max\_allowed\_packet = 2M  
sort\_buffer\_size = 1M  
read\_buffer\_size = 1M  
read\_rnd\_buffer\_size = 1M

---

<div class="post-metadata">

**Author:** ![Timur\_Solodovnikov](https://avatars.discourse-cdn.com/v4/letter/t/9dc877/32.png) [@Timur\_Solodovnikov](https://forums.percona.com/u/Timur_Solodovnikov)\
**Post date:** [April 19, 2016, 4:13am UTC](https://forums.percona.com/t/percona-eats-swap/4846/2 "2016-04-19T04:13:16Z")

</div>

## Per second averages calculated from the last 50 seconds

## BACKGROUND THREAD

## srv\_master\_thread loops: 1365747 srv\_active, 0 srv\_shutdown, 283904 srv\_idle srv\_master\_thread log flush and writes: 1649651

## SEMAPHORES

OS WAIT ARRAY INFO: reservation count 2120473  
OS WAIT ARRAY INFO: signal count 3088607  
Mutex spin waits 64475311, rounds 100673779, OS waits 1367152  
RW-shared spins 3289855, rounds 43501912, OS waits 526830  
RW-excl spins 1138913, rounds 17042294, OS waits 192934  
Spin rounds per wait: 1.56 mutex, 13.22 RW-shared, 14.96 RW-excl

* * *

truncated…

* * *

## 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) 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 24155208 OS file reads, 60308499 OS file writes, 19814338 OS fsyncs 0.18 reads/s, 16384 avg bytes/read, 25.14 writes/s, 6.64 fsyncs/s

## INSERT BUFFER AND ADAPTIVE HASH INDEX

## Ibuf: size 1, free list len 5, seg size 7, 2291308 merges merged operations: insert 2514953, delete mark 0, delete 0 discarded operations: insert 0, delete mark 0, delete 0 0.00 hash searches/s, 154.50 non-hash searches/s

## LOG

## Log sequence number 2048570513521 Log flushed up to 2048570513521 Pages flushed up to 2048570513521 Last checkpoint at 2048570513521 Max checkpoint age 636297156 Checkpoint age target 616412870 Modified age 0 Checkpoint age 0 0 pending log writes, 0 pending chkp writes 1680492 log i/o’s done, 0.78 log i/o’s/second

## BUFFER POOL AND MEMORY

Total memory allocated 13186891776; in additional pool allocated 0  
Total memory allocated by read views 14472  
Internal hash tables (constant factor + variable factor)  
Adaptive hash index 204000736 (203996536 + 4200)  
Page hash 1594568 (buffer pool 0 only)  
Dictionary cache 158817462 (51000592 + 107816870)  
File system 84040 (82672 + 1368)  
Lock system 31917992 (31875512 + 42480)  
Recovery system 0 (0 + 0)  
Dictionary memory allocated 107816870  
Buffer pool size 786424  
Buffer pool size, bytes 12884770816  
Free buffers 8192  
Database pages 778232  
Old database pages 287112  
Modified db pages 0  
Pending reads 0  
Pending writes: LRU 0, flush list 0, single page 0  
Pages made young 43327033, not young 1800408902  
0.02 youngs/s, 0.22 non-youngs/s  
Pages read 24155139, created 2466748, written 56179490  
0.18 reads/s, 0.02 creates/s, 23.64 writes/s  
Buffer pool hit rate 1000 / 1000, young-making rate 0 / 1000 not 0 / 1000  
Pages read ahead 0.00/s, evicted without access 0.00/s, Random read ahead 0.00/s  
LRU len: 778232, unzip\_LRU len: 0  
I/O sum[9520]:cur[0], unzip sum[0]:cur[0]

---

<div class="post-metadata">

**Author:** ![Timur\_Solodovnikov](https://avatars.discourse-cdn.com/v4/letter/t/9dc877/32.png) [@Timur\_Solodovnikov](https://forums.percona.com/u/Timur_Solodovnikov)\
**Post date:** [April 19, 2016, 4:15am UTC](https://forums.percona.com/t/percona-eats-swap/4846/3 "2016-04-19T04:15:45Z")

</div>

can’t upload graphs here =(
