Steal CPU Time — ‘st’ Time in Top

CPU consumption in Unix/Linux operating systems is studied using 8 different metrics: User CPU time, System CPU time, Nice CPU time, Idle CPU time, Waiting CPU time, Hardware Interrupt CPU time, Software Interrupt CPU time, Stolen CPU time. In this article let us study ‘Steal (or Stolen) CPU time.’

What is ‘Steal’ CPU Time?

‘Steal time’ (also known as ‘Stolen’ time) is relevant only in cloud environments (like AWS) or VMWare environments, where multiple virtual machines will be run on one underlying physical host. In such circumstances, CPU resources will be shared amongst the multiple virtual machines. The hypervisor is a technology that will distribute the underlying physical host’s CPU resources and other resources amongst the virtual machines.

nice CPU Time – ‘ni’ Time in top

CPU consumption in Unix/Linux operating systems are studied using 8 different metrics: User CPU time, System CPU time, nice CPU time, Idle CPU time, Waiting CPU time, Hardware Interrupt CPU time, Software Interrupt CPU time, and Stolen CPU time. In this article, let's study ‘nice CPU time’.

What Is ‘nice’ CPU Time?

To understand ‘nice’ CPU time, one must first understand ‘nice’. When there is a CPU contention (i.e., multiple processes contend for CPU cycles), the process with higher priority are given more chances to run. In Unix/Linux operating systems, processes are launched with a priority 0 (default). However, using the ‘nice’ command, super users (like ‘root’) can set the priority for the processes as shown below:

What is ‘Load Average?’

Load average is an age-old metric, which is in existence since the 1970s to indicate whether the system is under heavy/average/low load. It is useful to indicate whether the system’s load is on an increasing trend or a decreasing trend. In this article, let’s learn more about 'Load Average.'

How to Understand 'Load Average?'

In most cases, 'Load Average' is reported as an average of 1 minute, 5 minutes, and 15 minutes. Please refer to the below screenshot:

I/O Waiting CPU Time – ‘wa’ in Top

CPU consumption in Unix/Linux operating systems is broken down into 8 different metrics: User CPU time, System CPU time, nice CPU time, Idle CPU time, Waiting CPU time, Hardware Interrupt CPU time, Software Interrupt CPU time, and Stolen CPU time. In this article, let us study ‘waiting CPU time’.

What Is ‘Waiting’ CPU Time?

Waiting CPU time indicates the amount of time the CPU spends waiting for disk I/O or network I/O operations to complete. A high waiting time indicates that the CPU is *stranded* because of the I/O operations on that device. For optimal performance, one should aim to keep the I/O waiting CPU time as low as possible. If waiting time is > 10%, then it is worth investigating it.