- Documentation
Elastic Compute Service
Elastic Compute Service
Troubleshooting
High instance load issue
Troubleshooting and solution for high memory usage of ECS instance with Linux system
High instance load issue
Troubleshooting and solution for high memory usage of ECS instance with Linux system
Troubleshooting and solution for high memory usage of ECS instance with Linux system
This topic describes how to use the free command and the Atop tool to troubleshoot the issue of high memory usage (usage exceeding 80%) on a Linux instance.
Procedure
- Execute the following command to query the real-time memory usage.
-
tip
- Memory usage = (total-free) /total. When memory usage exceeds or is equal to 80%, the usage is considered too high.
- total: Indicates memory size available to the system, that is, physical memory minus reserved memory and memory used by the kernel. The value at the intersection of this column and the Mem row is the total memory size.
- free: Indicates memory that is completely unused by the current system. The value at the intersection of this column and the Mem row is the available memory size.
- Use the Atop tool to view the memory usage ranking.
- 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.
- Execute the following command to view the real-time memory usage ranking.
-
- Based on VSIZE (virtual memory), RSIZE (actual memory), and CMD (process name), confirm whether the process with high memory usage meets expectations, and obtain the PID (process identifier) of the target process.
- If the process meets expectations
- Optimize the program processing logic for this process to reduce memory 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.
- On the Atop monitoring page, press k key to enter process termination mode.
-
- Enter the target process PID and press Enter to confirm.
-
- Enter 9 and press the Enter key to confirm and forcibly close the process.
-
Last updated: 2026.06.18 17:49:51