we are using percona mysql 5.7 version.

MySQL not releasing the memory after operation complete.

we are very much grateful if anyone can guide us to resolve issue.


  • Percona can't help you? – Gerard H. Pille Oct 8 at 12:19
  • @GerardH.Pille ok I should raise the question on percona mysql forum. – devops Oct 8 at 12:23
  • If it isn't swapping, don't worry. – Rick James Oct 17 at 21:45

MySQL doesn't "release memory" that is allocated statically, for example innodb_buffer_pool_size. These allocations will consume more memory until they reach the configured limit and then stay there. The only way to "release it" is to reduce the size of those variables. You can reduce innodb_buffer_pool_size at runtime without restarting mysqld on 5.7.

| improve this answer | |
  • Thanks for quick reply. we have reduced innodb buffer pool from 13 GB to 8 GB. we have hosted it on 16GB RAM machine. when I am doing any backup operation and truncate operation on db tables I found sudden increase of RAM I have also attached db config if any config require let me know thanks. pastebin.com/PuiLqgSK – devops Oct 8 at 12:46
  • Enable innodb_file_per_table if it isn't already on, I don't see it in your config. This should help avoid any anomalies with TRUNCATE operation, it should be a DROP+CREATE operation. Backups read the entire database, so yes, they will result in the buffer pool being filled with the data being backed up. – Gordan Bobic Oct 8 at 13:00
  • Thanks I will add it – devops Oct 8 at 13:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.