3

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?

9

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.

  • 1
    Ok, it's used when the residing system is a VM, e.g VirtualBox, right? – Eric Wang Feb 22 '16 at 8:26
  • 1
    Exactly, VirtualBox is the hypervisor layer. – Rui F Ribeiro Feb 22 '16 at 8:30
  • Thanks for asking the question, while I was aware of this happening, I never noticed I had a field/tool to monitor. – Rui F Ribeiro Feb 22 '16 at 8:32
  • 1
    So the steal field has only meaning when viewed from within a VM? To know how much time the hypervisor spent in other tasks? (i.e. other than serving the VM you are running the iostat command from? – pkaramol Aug 15 '18 at 9:00
  • 2
    @pkaramol As stated in the 4th paragraph, only inside Xen and kvm VMs. – Rui F Ribeiro Aug 15 '18 at 9:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.