You need to enable JavaScript to run this app.
Elastic Compute Service

Elastic Compute Service

Copy page
Download PDF
High instance load issue
Troubleshooting and solution for high CPU usage or load of ECS instance with Linux system
Copy page
Download PDF
Troubleshooting and solution for high CPU usage or load of ECS instance with Linux system
This topic describes how to use the Atop tool to troubleshoot high CPU usage or CPU load on a Linux instance.​
Procedure​
  1. Log in to the target instance. For operation details, refer to Logging in to Linux instances.​
  1. Make sure that the Atop tool is installed on the target instance. If the Atop tool is not installed, execute the following commands to complete the installation.​
  • CentOS​
  • ​
    yum -y install atop​
    ​
  • Ubuntu, Debian​
  • ​
    apt -y install atop​
    ​
  1. Use the Atop tool to identify processes affecting CPU usage or CPU load.​
  1. Execute the following command in the target instance to view the real-time CPU usage ranking.​
  • ​
    atop​
    ​
  • Sample output​
  • ​​​
  1. View historical system usage.​
  1. Execute the following command to view the system usage at the target time point.​
tip​
  • In this example, the time point of March 5, 2024, is used as the time when the problem occurred. Replace it with the actual time point.​
  • Make sure that the specified abnormal time point is after you installed the Atop tool.​
  • ​
    atop -r /var/log/atop/atop_20240305​
    ​
  1. Press t key to adjust and view later times. Press shift + t key to adjust and view earlier times.​
  1. View the CPU usage at the abnormal time point.​
  • ​​​
  1. Identify the PID of the process that may cause issues based on real-time and historical usage.​
  1. Based on your current business, confirm whether the running status of the process that caused issues meets expectations.​
  • If the process meets expectations​
  • Optimize the program processing logic for this process to reduce CPU usage. You can also upgrade your instance configuration to prevent program operations from being affected due to low instance specifications. For details, see Changing instance types.​
  • If the process fails to meet expectations​
  • You can execute the following commands to manually terminate the abnormal process.​
warning​
  • Terminating the process may cause data loss of the target process.​
  • Terminating key operating system processes may cause the system to restart. Please proceed with caution.​
  1. On the Atop monitoring page, press the k key to enter process termination mode.​
  • ​​​
  1. Enter the target process PID, and press the Enter key to confirm.​
  • ​​​
  1. Press the 9 key and press Enter to confirm and forcibly close the process.​
  • ​​​
​
Last updated: 2026.06.18 17:49:51