AWS EC2 中的窃取时间太长 [英] The steal time was too high in AWS EC2

查看:21
本文介绍了AWS EC2 中的窃取时间太长的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经习惯于使用 AWS EC2 来部署一个 Python 应用程序,该应用程序使用来自 Apache Kafka 的数据.最近几天,我发现当传入的数据变大时,CPU的窃取时间会变得太高(大约35%).

I have used to AWS EC2 to deploy a Python App which consuming data from Apache Kafka. And recently several day, I found that the steal time of CPU would become too high (about 35%) when the incoming data become large.

使用的EC2实例为t2.medium,2个CPU和4G内存.任何人都可以告诉我为什么会发生这种情况,有什么办法可以避免.

The EC2 instance used is t2.medium, 2 CPU and 4G memory. Anybody could tell me why this would be happen and is there any way to avoid it.

推荐答案

如果不查看您的应用程序和指标,就很难发表评论.我的猜测是 T2 实例是 burstable performance instances 它们在正常情况下提供基准 CPU 性能.但是当负载增加时,Burstable Performance Instances 会爆发,这意味着提高 CPU 性能.

It would rather be difficult to comment on without looking at your application and metrics. My guess here is that T2 instances are burstable performance instances They give a baseline CPU performance under normal conditions. But when the load is increased Burstable Performance Instances burst out which means to increase the CPU performance.

CPU Credit 表示实例中 CPU 的突发量.您可以使用此 CPU Credit 来提高 Burst 期间的 CPU 性能.

CPU Credit tells the amount of burst of CPU in an instance. You can spend this CPU Credit to increase the CPU performance during the Burst period.

当你的 CPU 积分用完时,它会降低整体性能,而不仅仅是阻止你的性能爆发.事实上,您将观察到几乎 90+% 的 CPU 窃取时间,这意味着当您的积分不足时,虚拟机管理程序不允许您的实例占用 CPU.您可以查看更多 http:///docs.aws.amazon.com/AWSEC2/latest/UserGuide/t2-instances.html#t2-instances-cpu-credits

When you are out of CPU credits, it will degrade the overall performance, not just preventing you from bursting performance. In fact, you will observe almost 90+% CPU steal time, meaning that the hypervisor does not allow your instance on the CPU when you are out of credits. You can see more http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/t2-instances.html#t2-instances-cpu-credits

希望这会有所帮助.

这篇关于AWS EC2 中的窃取时间太长的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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