All Products
Search
Document Center

Elastic Compute Service:What do I do if the memory usage of a Windows instance is high?

Last Updated:Apr 17, 2025

If high memory usage causes issues such as system stuttering on a Windows Elastic Compute Service (ECS) instance, you can follow the procedure described in this topic to identify the causes and resolve the issue.

Note

In the following example, Windows 2022 is used. The operations may vary based on the Windows version.

Problem description

On an ECS instance that runs the Windows operating system, you may experience system stuttering or slow internal service response. When you query the instance memory in the ECS console, memory usage is high or alerts about high memory usage appear.

Causes

This issue may be caused by one of the following reasons:

  • Abnormal processes or services consume large amounts of memory.

  • Applications on the instance are under heavy loads, and the physical memory of the instance is insufficient.

Solutions

To resolve the high memory usage issue, perform the following operations.

View the total memory usage of the instance

You can use Task Manager pre-installed in Windows to view memory usage.

  1. Use Workbench to connect to a Windows instance over RDP.

  2. In the search box of the Windows taskbar, enter Task Manager and press the Enter key to open Task Manager.

  3. In the Task Manager window, click the Performance tab, and then click Memory in the left pane to view memory usage.

    image

View details about memory used by processes

You can use Resource Monitor pre-installed in Windows to query the usage of resources such as memory. You can view memory usage of individual processes.

  1. In the search box of the Windows taskbar, enter Resource Monitor and press the Enter key to open Resource Monitor.

  2. In the Resource Monitor window, click the Memory tab to view memory usage of each process. You can view the memory size in the Commit (KB) column to identify processes that consume more memory, and then determine whether the processes are normal based on your actual business scenarios.

    image

    Physical memory includes the following memory:

    • Hardware reserved memory: The physical memory reserved for hardware devices. These devices include GPUs, sound cards, network interface cards (NICs), and Bluetooth modules. The reserved memory can be assigned to hardware devices to ensure normal operations, but cannot be directly used by ordinary applications.

    • Memory in use: The memory that is used by processes, drivers, and operating systems.

    • Modified memory: The memory whose data must be written to a disk before being assigned.

    • Standby memory: The memory that contains unused cache data and code.

    • Free memory: The memory that does not contain valid data and is preferentially used when processes, drivers, or operating systems request more memory.

    • Cache memory: When a file is opened, the system saves the file in the cache for subsequent quick read and write operations. In Windows 2008 R2 and later versions, some physical memory cannot be used by the cache. This ensures sufficient physical memory for applications even if the cache is too large.

View details about memory used by system processes

If no processes consume large amounts of memory in Task Manager and Resource Monitor and the instance memory usage remains high, system processes may consume too much memory. In this case, use the RamMap tool provided by Microsoft for further analysis. For example, use this tool to query the volume of file data cached in Random Access Memory (RAM) for system processes and the volume of RAM used by the kernel and device drivers.

  1. Download and decompress the RamMap package.

    Download the RamMap tool on the Microsoft official website and then decompress the package.

  2. Double-click the RamMap tool to start RamMap and view memory usage details.

    image

    RamMap displays the following resource usage information:

    • Use Counts: displays the memory usage summary by memory type and page.

    • Processes: displays the sizes of the process working sets.

    • Priority Summary: displays the sizes of memory by memory priority.

    • Physical Pages: displays the per-page usage of all physical memory.

    • Physical Ranges: displays physical memory addresses.

    • File Summary: displays data in RAM by file.

    • File Details: displays individual physical pages by file.

Resolve high memory usage issues

The following table describes the causes of and solutions to high memory usage issues.

Issue

Cause

Solution

A single program or process consumes a large amount of memory for a long period of time.

The program is abnormal and its processes consume too much memory.

Find the program or process in Task Manager or Resource Monitor, right-click the program or process, and then click End task.

Warning

Before you end a program or process, check information about the program or process to prevent business interruptions. Proceed with caution.

  • No individual program or process consumes a large amount of memory.

  • The program or process that consumes a large amount of memory is normal.

The services on the instance require memory whose capacity exceeds the physical memory capacity of the instance.

We recommend that you evaluate and upgrade the instance type to increase physical memory. For more information, see Change instance types.

A single program or process occasionally consumes a large amount of memory within a short period of time.

The program or process has instantaneous traffic or performs scheduled tasks.

References

What do I do if the memory usage of a Linux instance is high?