Re: Mysql memory usage increasing until it hits the RAM limit and starts using swap
Posted by: Peter Brawley
Date: December 11, 2018 08:15PM

Re "bug2" on that page we find ...

"We're facing a similar issue like this while using MySQL 5.7.18 Community edition in our CentOS 7 systems(CentOS Linux release 7.3.1611 (Core), Linux 172.20.19.194 3.10.0-514.26.2.el7.x86_64).

"After many concurrent connections to the server, there seems a substantial increase in the amount of memory being used by mysql process & eventually results in OS crash due to memory overflow. Think, the memory allocated for each connection(s) are not set to free properly.

"So, we tried using the TCMalloc(http://goog-perftools.sourceforge.net/doc/tcmalloc.html) for memory allocation. We found the memory is under control & everything seems normal after that."

... (emphasis added) so I'd want to pursue that despite https://dev.mysql.com/doc/refman/5.7/en/mysqld-safe.html#option_mysqld_safe_malloc-lib

Re how much RAM, I'd try one thing at a time, first fix the queries requiring scans & temp tables and adjust settings so there's RAM headroom, second the mem alloc options above. Then when it's reasonably optimised, I'd increase RAM by 50-100% depending on what size of request is likely to make a beancounter's head explode.

I agree about partitioning.

Re hardware I'd start with RAM.



Edited 1 time(s). Last edit at 12/11/2018 08:16PM by Peter Brawley.

Options: ReplyQuote




Sorry, only registered users may post in this forum.

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.