When the system runs slowly, you need to view the fault in terms of CPU, memory, I/O, and system load.
Viewing CPU Usage
The top command
- Total CPU and memory usage (
shift+E
Switching memory units)
Us indicates the CPU occupied by user processes. Id is idle CPU occupied. Wa indicates the CPU occupied by I/O waiting. The following table shows the CPU memory usage of each process (e Changing the memory unit). RES indicates the physical memory usage. %MEM indicates the physical memory usage/total memory usage
Viewing Memory Usage
top
Available memory is available, not free
free -h
Available memory isavailable
If the swap usage is too high, it also indicates that the physical memory is insufficient.
If in Ubuntu, the memory used and the available memory are-/+ buffers/cache:
Used and free as indicated in.
Checking I/O Usage
iostat -x 1 10
Refresh every second for a total of 10 times. If the util part is always greater than 100%, the I/O usage is too high.
Viewing system load (number of processes running at the same time)
In the load Average section, the number of processes running in the latest 1 minute, the number of processes running in the latest 5 minutes, and the number of processes running in the latest 15 minutes respectively. If the number is larger than the number of system cores, the load is too high. You should mainly observe the “15-minute system load” as an indicator of the normal running of the computer