如何在Google Cloud SQL的mysql中设置innodb_buffer_pool_size? [英] How to set innodb_buffer_pool_size in mysql in google cloud sql?

查看:110
本文介绍了如何在Google Cloud SQL的mysql中设置innodb_buffer_pool_size?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法在 https://console.cloud.google的edit中设置innodb_buffer_pool_size. .com .只是没有这个参数.

I can not set innodb_buffer_pool_size from the edit in the https://console.cloud.google.com . It just do not have this parameter.

我也无法使用sql设置innodb_buffer_pool_size:

I also can not set innodb_buffer_pool_size with the sql:

mysql> SET GLOBAL innodb_buffer_pool_size=2147483648;
ERROR 1227 (42000): Access denied; you need (at least one of) the SUPER privilege(s) for this operation

推荐答案

当前不可能-我们始终将innodb_buffer_pool_size设置为计算机RAM的75%之类.

It is not currently possible - we always set innodb_buffer_pool_size to something like 75% of machine RAM.

在您的情况下,您似乎需要更多的内存用于每个连接缓冲区,而在innodb_buffer_pool_size中则更少.我们对如何自动检测这种情况并减少innodb_buffer_pool_size有想法,但是在实践中什么都没有.

In your case it seems you need more memory for some per-connection buffers and less in innodb_buffer_pool_size. We have ideas on how to automatically detect such conditions and reduce innodb_buffer_pool_size but nothing in practice yet.

目前为您提供的实际解决方法是增加实例大小:随着内存的增加,每个事务缓冲区的空闲时间将更多.另一种可能不太实际的解决方法是通过运行较少的并发查询(尝试使用连接数量有限的连接池)或简化连接(减少JOIN等)来减少数据库的负载.

The practical workaround for you right now is to increase instance size: with more memory you will have more slack for per-transaction buffers. The other probably less practical workaround is to decrease load on the database by either having less concurrent queries running (try using connection pool with limited number of connections) or by simplifying them (less JOINs, etc).

这篇关于如何在Google Cloud SQL的mysql中设置innodb_buffer_pool_size?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆