MySQL Forums
Forum List  »  Performance

Re: High memory usage on mysql 5.6.36-log on linux server
Posted by: Peter Brawley
Date: January 28, 2018 11:43PM

As configured now, MySQL can use this much RAM ...

innodb_buffer_pool_size + key_buffer_size +
((read_buffer_size + read_rnd_buffer_size + sort_buffer_size + join_buffer_size) * max_connections)

... which on the numbers you posted is > 22G RAM. You only have 7G, so it's swapping. And as you see below, key_buffer_size looks too small. So if you really need max_connections=550, the machine needs 24G of RAM or more.

Reduce innodb_log_file_size such that it holds about an hour's data on average.

Some queries are doing table scans. They probably need optimisation to improve index use. Turn on the slow query log to find them, use Explain to diagnose them.

The MyISAM query cache is using memory but isn't doing much. It's gone as of 8.0. Try turning it off.

The MyISAM key_read_requests / key_reads ratio is outlandishly high. It should be close to 1. Try making key_buffer-size much larger.

key_write_requests / key_writes and Innodb_log_write_requests / Innodb_log_writes are way high, indicating a disk write bottleneck. You'll need to get rid of the awapping before concluding that the disk itself needs an upgrade.

Performance_schema is using RAM, do you need it?

Options: ReplyQuote

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.