Friday, August 23, 2019

[google-cloud-sql-discuss] Re: Cloud MySQL Free Memory

John,

If a SQL operation requires more free memory than is available, the operation will fail but the memory will be freed.  The memory usage does ideally sit at around 80%, but I've had it go above 90% and then go back down to 20%.  The number of connections isn't an issue and the connections are pooled; many of the connections being closed is just what I've had happen when the memory goes back down. I'm guessing this is a behavior that Google has implemented behind the scenes as I cannot find documentation of it, and that the system does this because there is no swap space/virtual memory and running out of memory can cause operating system problems.   It would be nice if I could have a nightly process that triggered this behavior so that there weren't tables cached in memory that may not be needed the next day.   Restarting the database has the same effect, plus more, with more disruption, obviously.  I would think that
FLUSH TABLES

would have this effect, but it does not.  There may be more standard ways of getting MySQL to give-up the memory but it seems that there is already a behind-the-scenes feature for Cloud MySQL to get it to do that.

On Friday, August 23, 2019 at 6:13:48 PM UTC-8, Devin Homan wrote:
Is it possible to tell MySQL to free-up memory?  When the memory usage gets to a certain point, say 95% used,  Google Cloud MySQL will automatically free the memory and close most connections. Is there any way to manually trigger this behavior?

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/b56b3ff9-6eb2-4c49-803d-fc8e3fba970e%40googlegroups.com.

No comments:

Post a Comment