如何在Google Cloud SQL的mysql中设置innodb

编程入门 行业动态 更新时间:2024-10-11 09:25:17
本文介绍了如何在Google Cloud SQL的mysql中设置innodb_buffer_pool_size?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

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

I can not set innodb_buffer_pool_size from the edit in the console.cloud.google . 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

本文发布于:2023-10-28 10:31:22,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1536387.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:如何在   Google   Cloud   innodb   mysql

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!