Hi there,
I’m using the above MySQL and the memory usage is bigger than what mysqltunner reports.According to mysqltuner the max memory usage can go up to [OK] Maximum possible memory usage: 6.6G (43.44% of installed RAM)
but currently the rss RAM used 10G and the VSZ is even bigger 30GB
According to some of your articles
https://www.percona.com/blog/2016/05…-memory-usage/
If the VSZ size is above 90% of the installed memory that can be a problem.
ps -eo pmem,pcpu,vsize,rss,pid,cmd | sort -k 1 -nr | head -1
65.5 11.9 30545552 10509912 13037 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/var/log/mysqld.log --open-files-limit=10000 --pid-file=/var/lib/mysql/db2.pid --socket=/var/lib/mysql/mysql.sock --port=3306
I see that almost 500MB are used from performance schema but where are the other 3GB being used?What I saw is that there are a lot of Sleep Threads.Example:
±------------------±------+
| Variable_name | Value |
±------------------±------+
| Threads_cached | 12 |
| Threads_connected | 101 |
| Threads_created | 38480 |
| Threads_running | 2 |
±------------------±------+
So from 101 Threads_connected only 2 from them are running and the other 99 are in Sleep State.If I change the default values on wait_timeout and interactive_timeout to 60 seconds is that going to effect the replication since I’m using master/master active-passive replication?So the main questions are where are these 3GB being used from 7GB to 10GB and is there be problem with the replication if I reduce the timeouts to 60 seconds?Please advise.
When I run flush tables the VSZ memory goes rapidly down.It was 30GB and after flush tables it went to 22GB.Please advise .There are no slow queries detected in my slow log.
P.S.
perl /home/ocsupport/numa-maps-summary.pl < /proc/$(pidof mysqld)/numa_maps
N0 : 1377443 ( 5.25 GB)
N1 : 1201461 ( 4.58 GB)
active : 1336345 ( 5.10 GB)
anon : 2575571 ( 9.83 GB)
dirty : 2575575 ( 9.83 GB)
kernelpagesize_kB: 2404 ( 0.01 GB)
mapmax : 657 ( 0.00 GB)
mapped : 3424 ( 0.01 GB)
my_cnf.txt (2.16 KB)
mysqltuner.txt (8.24 KB)
pt-mysql-summar.txt (20.6 KB)
pt-summary.txt (17.3 KB)