社区所有版块导航
Python
python开源   Django   Python   DjangoApp   pycharm  
DATA
docker   Elasticsearch  
aigc
aigc   chatgpt  
WEB开发
linux   MongoDB   Redis   DATABASE   NGINX   其他Web框架   web工具   zookeeper   tornado   NoSql   Bootstrap   js   peewee   Git   bottle   IE   MQ   Jquery  
机器学习
机器学习算法  
Python88.com
反馈   公告   社区推广  
产品
短视频  
印度
印度  
Py学习  »  DATABASE

google cloud mysql托管实例使用100 procent cpu数小时。它在用什么?

Lars Bingchong • 6 年前 • 1889 次点击  

在我们的google云管理mysql实例上,我们有以下问题。

enter image description here …从图中可以看出,CPU使用率已100%超过5小时。这不正常。

尝试 -通过google cloud shell连接到mysql实例。执行 show full processlist; 和; show processlist …没什么有趣的。 -执行 SHOW ENGINE INNODB STATUS\G; . 我看没有问题。 -google stackdriver监控没有给我任何我可以使用的额外信息。只是相同的CPU使用图。

总之,我看不到mysql实例本身是不好的。在mysql实例上有数据的服务通常都是这样执行的。


那么,我怎样才能得到mysql托管实例上实际使用cpu的信息呢?

当然,我可以重新启动实例,问题可能会再次消失,但我想深入了解这里的内容。


信息: - MySQL V5.7


非常感谢你。


更新181206

Python社区是高质量的Python/Django开发社区
本文地址:http://www.python88.com/topic/43398
 
1889 次点击  
文章 [ 2 ]  |  最新文章 6 年前
Wilson Hauck
Reply   •   1 楼
Wilson Hauck    6 年前

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)6天内56133个中止的客户 b)com_stmt_prepare比com_stmt_close大213倍,意味着资源在完成后的6天内未释放213次 c)是否有必要在标志中显示innodb_log_compressed_页面? 这会导致每1/2小时记录1GB日志的一部分,这些日志文件在系统上每14分钟旋转一次。

使用名为findfragtables.sql的实用程序脚本将帮助您确认表已被压缩,因此使用CPU对每个活动进行解压缩/压缩。在innodb_compression_level=6时,您在压缩上花费了大量的cpu时间。 删除,插入,更新,以6538平均每秒6天似乎是非常繁忙。

你可以在我的个人资料中找到我的联系信息,网络个人资料。

David
Reply   •   2 楼
David    6 年前

尝试 restarting the instance 看看有没有帮助。