Tonino
Tonino

Reputation: 1166

CloudSQL - MySql - Memory Leak after Import

Using MYSQL second generation on google CloudSQL I am struggling with a memory usage (like a memory leak) after a standard backup import

se

enter image description here

This is my configuration enter image description here

Restarting the instance, will clear the memory but it will start again after the next import.

Thanks in advance

EDIT Adding a screenshot with a bigger timespan as required (last 4 days)

4 days span

CPU Usage over the last 7 days CUP Usage

Upvotes: 2

Views: 959

Answers (2)

Wilson Hauck
Wilson Hauck

Reputation: 2343

Rate Per Second = RPS

Suggestions to consider for your Google Cloud Database flags,

read_rnd_buffer_size=128K  # from 256K to reduce handler_read_rnd_next RPS of 1,883
read_buffer_size=512K  # from 128K to reduce handler_read_next RPS of 6374
innodb_lru_scan_depth=100  # from 2048 to conserve 90% of CPU cycles used for function
thread_cache_size=100  # from 48 for less overhead to support your 169 max_used_connections

You should find these dynamic configuration changes will REDUCE CPU busy significantly.

Additional info requested today may reveal why your RAM use goes up every day before 18:00.

Upvotes: 1

Emil Gi
Emil Gi

Reputation: 1168

To me this looks like a normal behavior. Linux always tries to consume free memory for buffering.

I don't know how caching algorithms work under the hood, but may be when user imports data MySQL prompts linux to cache it because it might be needed immediately.

Please refer to this thread for better explanation.

Upvotes: 0

Related Questions