What is CPU Steal and how to measure it

What is CPU Steal Time?

In Linux, CPU steal time refers to the amount of time a virtual CPU waits for a real CPU while the hypervisor is servicing another virtual processor. This measurement is often seen in virtualized environments like AWS, Azure, Google Cloud or any other hosting platform.

In simpler terms, ‘steal time’ is time that a virtual CPU is ready to execute, but it couldn’t because the underlying physical CPU was busy with other tasks.

In more direct terms, this is a measurement of how oversold your hosting provider is, and how much CPU you need that you’re not getting.  This doesn’t necessarily mean you’re not getting what you are paying for.

It’s worth noting that a small amount of steal time is normal and not a cause for concern. However, if you consistently observe high levels, please open a ticket and inform us of the situation. This should not occur on our infrastructure and might be the result of some type of misconfiguration.

 

How to measure CPU Steal Time under Linux

In Linux, you can measure CPU steal time using a variety of command line tools. Here are some of the most common ones:

  1. top: This command provides a dynamic real-time view of the running system. The steal time is shown under st in the %Cpu(s) row.
  2. vmstat: This command reports information about processes, memory, paging, block IO, traps, disks and cpu activity. You can use it to monitor the steal time with the st column.
  3. iostat: This command is used for monitoring system input/output device loading. The steal field shows the time spent in involuntary wait by the virtual CPU or CPUs while the hypervisor was servicing another virtual processor.
  4. sar: The System Activity Reporter (sar) also can provide information on CPU steal time. You can use sar -u to see it.

Specific Commands

Here’s how you might use these tools to check CPU steal time:

  • top: Simply type top in the command line. The steal time will be shown continuously.
  • vmstat: Type vmstat 1 in the command line to see system performance stats updated every second. The steal time will be shown in the st column.
  • iostat: Type iostat -c 1 in the command line to see CPU stats updated every second. The steal time will be shown in the steal column.
  • sar: You might have to install the sysstat package to get the sar command. After that, you can type sar -u 1 in the command line to see CPU stats updated every second. The steal time will be shown in the %steal column.

Remember to replace 1 with whatever update frequency you prefer.

 

Version: 1

Date: 02-12-2024

  • CPU Steal
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

DDoS Protection on Your VPS/Service

DDoS Protection and Security Features Some of our services include DDoS protection, as specified...

Enable SSH Password Login

Some of the Newer Images have only SSH Key activated by default, and to enable SSH Password...

Firewall Ports Closed with HOST-C

The following ports are currently closed across our infrastructure for enhanced security and to...

Improving VPS Performance: QEMU Guest Agent Requirement

If you experience slow speeds on your VPS, please verify that the QEMU Guest Agent is installed...

Mount ISO in VPS, change Boot order, add SSH-KEYS

If you wish to mount an ISO image, change Boot order or add SSH-KEYS, you have to login to your...