Is AWS really stealing your CPU?

Simon Bennett
Simon Bennett ยท Mar 01, 2021
Is AWS really stealing your CPU? Artwork

While browsing the GridPane Facebook group, a member, Montassar, noticed he was experiencing a high CPU load on his AWS EC2 instance. His server was hitting 80% steal.

You can see CPU steal when using the top command. In the hypervisor world, CPU steal can be seen as the hypervisor limiting your ability to use CPU cycles. In the significantly worse case, your provider could be overselling their hardware, and the steal is coming from your neighbours sharing the physical hardware.

I noticed from the screenshot that the server was a t3.medium. The T series processes at AWS are sold as burstable instances. They are not designed to be used at max capacity. If your server only sees a high load 20% of the time, it is perfect. At SnapShooter, we make hefty use of them as our ingestion load is dynamic. Most people do backups at the hour mark, so our load always peaks for 5-10minutes after every hour.

This is where you really need to keep a close eye on the CPU balance graphs; you will really know about it when you run out of credits, your server will start to crawl along.

If you have no credits your server will not perform. It's worth upgrading to a larger server, moving class to none bursting, seeing if you have a rogue process, or if you're really careful - go to unlimited mode.

In Montassar's case, there was a script running that was causing too much load and eating all of the credits, leaving nothing.

You can learn more about Montassar Agency - Hazgui WP Agancy