google云mysql管理示例使用100 procent cpu运行数小时什么在用它?

btqmn9zl  于 2021-06-15  发布在  Mysql
关注(0)|答案(2)|浏览(406)

在googlecloud管理的mysql示例上,我们有以下问题。

…从图中可以看出,cpu使用率已经100%增长了5个多小时。这不正常。
尝试-通过google cloud shell连接到mysql示例。执行 show full processlist; & show processlist ... 那里没有什么有趣的东西。-执行 SHOW ENGINE INNODB STATUS\G; . 我看没有问题谷歌stackdriver监控没有给我任何额外的信息,我可以使用。只是相同的cpu使用率图表。
总之,我看不出mysql示例本身是不正常的。在mysql示例上拥有数据的服务的性能与通常一样。
那么,我该如何获得mysql托管示例上实际使用cpu的信息呢?
当然,我可以重新启动这个示例,问题很可能会再次消失,但我想深入到这里发生的事情。
信息:-mysql v5.7
非常感谢你。
更新181206
执行 SHOW GLOBAL STATUS; ,在此处查找->https://pastebin.com/m67fd5vk
执行 SHOW GLOBAL VARIABLES; ,在此处查找->https://pastebin.com/cvsytbmy
目前使用的产品是googlecloud的cloudsql解决方案,它是一个托管mysql示例。更多信息请点击此处->https://cloud.google.com/sql/docs/mysql/ (我想我也说过,这也是原来的问题。不过,现在还有一个指向产品文档的链接)。
示例是 db-n1-standard-1 . 更多信息->https://cloud.google.com/sql/docs/mysql/pricing#2nd-发电机示例定价
执行 SHOW FULL PROCESSLIST; ,在此处查找->https://pastebin.com/xnpgcbms

6vl6ewon

6vl6ewon1#

rate per second=rps-为您的google云数据库标志考虑的建议

log_error=/mysql/logs/error.log  # from default of stderr will allow you to view your entries and take corrective action
max_connections=512  # from 4000 to conserve RAM and your max_used_connections was 110 in 6 days
thread_cache_size=100  # from 48 to reduce threads_created of 204 (for CPU busy reduction)
innodb_flush_neighbors=0  # from 2  you have SSD and should be using 0 per refman
innodb_lru_scan_depth=100  # from 2048 to reduce CPU busy every second
innodb_page_cleaners=4  # from 1 to expedite cleaning and reduce innodb_buffer_pool_pages_dirty of 791
open_files_limit=10000  # from 1,048,576 will conserve RAM and be adequate
query_cache_size=0  # from 1M to conserve RAM - you are NOT using QC
query_cache_limit=0  # from 1M to conserve RAM - you are NOT using QC

研究需要探索为什么a)56133个在6天内中止的\u客户端b)com\u stmt\u prepare比com\u stmt\u close大213意味着资源在完成后的6天内没有释放213次c)是否有必要将innodb\u log\u压缩的\u页面放在您的标志中?这将导致系统上每14分钟旋转一次的日志文件每1/2小时记录一部分1gb的日志。
使用名为findfragtables.sql的实用程序脚本可以帮助您确认表已压缩,因此可以使用cpu对每个活动进行解压缩/压缩。在innodb_compression_level=6时,您在压缩方面花费了大量cpu时间。删除,插入,更新在6天内平均每秒6538似乎是非常繁忙。
你可以在我的个人资料,网络资料上找到我的联系方式。

rqmkfv5c

rqmkfv5c2#

尝试重新启动示例,看看是否有帮助。

相关问题