Bug #105101 | MySQL DB Server continuous memory and swap consumption increase | ||
---|---|---|---|
Submitted: | 1 Oct 2021 15:29 | Modified: | 6 Oct 2021 3:16 |
Reporter: | Cristiano Silva | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | 5.7.29 | OS: | Red Hat |
Assigned to: | CPU Architecture: | Any |
[1 Oct 2021 15:29]
Cristiano Silva
[4 Oct 2021 12:32]
MySQL Verification Team
Hi Mr. Silva, Thank you for your bug report. However, it is not a bug. First of all, you are using an old release of 5.7. Between 5.7.29 and 5.7.35 there are a number of bugs fixed that are dealing with some small memory leaks, that might accumulate over the time. Next, we can not process any bug report without a proper proof. Usually, we require a test case, but in your case, the output from the reports by Valgrind or GNU malloc (in diagnostic mode), Memwatch or similar. We would also accept the analysis of our code that proves that memory is not appropriately returned to the OS. Next, Linux malloc libraries have a tendency of keeping memory, that is deallocated, to the process that consumes most memory, which in your case is MySQL server. You can easily reclaim the memory by writing a short C program that would just calloc() some amount of memory that you have seen increasing. It is also expected behaviour that memory increases after starting MySQL, for the reasons described in the previous paragraph, but also due to the larger number of connections. It is also true that our I_S schema uses mostly memory-based tables for the output, but those are deallocated as soon as the query finishes. Not a bug.
[6 Oct 2021 3:16]
Cristiano Silva
Hi, Thanks for the feedback. I'm scheduling an update immediately for this. We have performed a restart of the server and for 10 hours it was good until it spiked again. Memory is a slow spike climb and swap is a huge spike. Right now the MySQL update is our next hope.