1

(I have checked similar questions, none of them cover my situation)

I'm trying to increase MySQL 5.7 memory usage on my Ubuntu 16.04. Before my changes mysqld was using about 8% of RAM out of 8GB available which means the InnoDB buffer pool was probably set to 512MB.

I set innodb_buffer_pool_size to 4G, I restart mysqld, then I check the @@innodb_buffer_pool_size variable: it shows 4294967296 which is correct.

However top is telling me that the memory usage is still at 8%! I have some pretty large tables with millions of records, I run heavy queries but no matter what, mysqld never seems to go over 8%. And yes, all my tables use InnoDB.

I tried to also play with innodb_buffer_pool_instances and innodb_buffer_pool_chunk_size but again, the changes are reflected in the @@ variables but nothing makes mysqld go over 8%, so I reverted these two variables to their defaults.

Every article or SO answer on the subject says that changing innodb_buffer_pool_size and restarting MySQL should be sufficient. What am I doing wrong?

mojuba
  • 121
  • 6
  • 1
    Maybe MySQL just hasn't put a large amount of data in the buffer pool yet? Check with `SHOW STATUS WHERE Variable_name = 'Innodb_buffer_pool_bytes_data';` – Michael Hampton Aug 06 '18 at 17:58
  • 1
    @MichaelHampton it currently shows `625442816`. What does it mean though, does mysql grow the buffers gradually? Even despite that the server is already under high load? That's a bit odd. – mojuba Aug 06 '18 at 18:05
  • 1
    If that's your entire working set, then you don't really need much more memory than that, no matter how many queries per second you have. – Michael Hampton Aug 06 '18 at 18:26
  • 1
    @MichaelHampton that might be true actually. Thanks a lot! – mojuba Aug 06 '18 at 19:00
  • Additional information request. Post on pastebin.com and share the links. Text results of: B) SHOW GLOBAL STATUS; after minimum 24 hours UPTIME C) SHOW GLOBAL VARIABLES; D) SHOW FULL PROCESSLIST; E) complete MySQLTuner report for server workload tuning analysis. – Wilson Hauck Jul 28 '19 at 19:27

0 Answers0