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.

How to Kill Processes in Unix/Linux

There are different options to terminate a process in Unix/Linux flavor of operating systems. This article intends to list and provide examples of each option.

kill

You can use the kill command to terminate a process by passing the process id. PID is the process ID of the process that you want to terminate. 

Different CPU Times: Unix/Linux ‘top’

CPU consumption in Unix/Linux operating systems is studied using eight 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. Let’s review each of the CPU time in this article.

User CPU Time and System CPU Time

In order to understand ‘user’ CPU Time, one should understand ‘system’ CPU time as well, since they go hand in hand. User CPU time is the amount of time the processor spends in running your application code. System CPU Time is the amount of time the processor spends in running the operating system(i.e., kernel) functions connected to your application. Let’s say your application is manipulating the elements in an array; then, it will be accounted as ‘user’ CPU time. Let’s say your application is making network calls to external applications. To make network calls, it has to read/write data into socket buffers which is part of the operating system code. This will be accounted as ‘system’ CPU time. To learn how to resolve high ‘user’ CPU time, refer to this article. To learn how to resolve high ‘system’ CPU time, refer to this article.