1. View System Load
If your computer is slow, you may want to check whether it is too heavy.
In Linux, we generally use the uptime command to view (w command and top command ). (They also apply to Apple's Mac computers .)
If you type uptime in the terminal window, the system will return a line of information.
The second half of this line shows "load average", which means "average system load". There are three numbers, from which we can determine whether the system load is large or small.
Why is there three numbers? You can see from the manual that they mean the average load of the system within 1 minute, 5 minutes, and 15 minutes.
If you continue reading the manual, it will tell you that when the CPU is completely idle, the average load is 0; when the CPU workload is saturated, the average load is 1.
Obviously, the lower the value of "load average", such as 0.2 or 0.3, indicates that the smaller the computer workload, the lighter the system load.
But when can we see that the system load is heavy? When 1 is equal to 0.5 or 1.5? What if the values of 1 minute, 5 minutes, and 15 minutes are different?
2. An analogy
To determine whether the system load is too heavy, you must understand the true meaning of load average. Next, based on the Understanding Linux CPU Load article, I try to explain this problem in the most popular language.
First, assume that your computer has only one CPU, and all the operations must be completed by this CPU.
We may think of this CPU as a bridge with only one driveway and all vehicles must pass through the driveway. (Obviously, this bridge can only be used for one-way access .)
The system load is 0, which means there is no vehicle on the bridge.
The system load is 0.5, which means there is a car in half of the road section of the bridge.