简体   繁体   中英

Memory usage in cloud sql is very high

We are using cloud sql mysql 8.0.18 in gcp, the total memory of the instance is 20gb, 18.5 gb is the limit and the current utilization is nearly 17.5 gb due to which our database instance keeps getting crash.

In one month it has crashed 3 times.

Why my db instance RAM utilization is high, Is there any solution of this scenario.

vCPUs:- 8, Memory:- 20gb, SSD storage - 410gb

在此处输入图像描述

Rate Per Second = RPS

Suggestions to consider for your Google Cloud Database Flags (all dynamic today)

innodb_lru_scan_depth=100  # from 2048 to conserve 90% of CPU cycles used for function
read_rnd_buffer_size=32768  # from 256K to reduce handler_read_rnd_next RPS of 195,877
thread_cache_size=1024  # from 48 to reduce threads_created RPS > 3 
read_buffer_size-262144  # from 131072 to reduce handler_read_next RPS of 8,487

Please view profile for contact info. Many more Global Variables need ajustment.

Observations

  1. handler_rollback avg about 30 per day need to be prevented to conserve resources.
  2. innodb_buffer_pool_dump_pct of 90 (percent) would shorten 'warm up' delays.
  3. select_scan RPS of 122 can be avoided with appropriate indexes and expedite query completion. Thanks for sharing your data.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM