iostat Command – Meaning of ‘Steal’ Field

iostatlinuxvirtual machine

In output of iostat there is a steal field, according to man page the field is used to:

Show the percentage of time spent in involuntary wait by the virtual CPU or CPUs while the hypervisor was servicing another virtual processor.

But what does that mean? Does it means the kernel itself is too busy to manage a cpu, and cause the cpu to be idle?

Best Answer

The hypervisor means the layer that manages a virtual environment, like VMware, XEN or VirtualBox.

So the steal field, should be an interesting field to monitor, to detect problems or oversubscription of a virtualised environment. The field itself means the time the VM CPU has to wait for others VMs (virtual machines) finishing their turn (slice), or for a task of the hypervisor itself.

The st field is present in the iostat, vmstat, sar and top commands.

However, this thread confirms the steal field is not supported in VmWare VMs (I tested it in VMware 5.5 and I corroborate it). VirtualBox doesn't provide CPU steal time data also. It is supported by Xen and KVM virtual environments.

vmstat also has the same field in the CPU area, but only after Debian 8. For sar to work sysstat data collection has to be enabled.

As per man vmstat:

st: Time stolen from a virtual machine. Prior to Linux 2.6.11, unknown.

Related thread Tools for Monitoring Steal Time (st)

Further reading: CPU Time stolen from a virtual machine?

It’s the time the hypervisor scheduled something else to run instead of something within your VM. This might be time for another VM, or for the Hypervisor host itself. If no time were stolen, this time would be used to run your CPU workload or your idle thread.

Related Question