How to Monitor CPU and Memory Usage in Docker Desktop

Monitor Resources Using Docker Desktop

Being able to monitor the CPU and memory usage in Docker Desktop gives you a better understanding of how your containers perform, and how they affect your system’s performance. Docker Desktop provides various ways to track and manage these resources. Here, we show you how to monitor CPU and memory usage effectively in Docker Desktop.

Why There is a Need to Manage Resources in Docker Desktop

Docker Desktop runs containers inside a virtualized environment. On Windows, this may be Hyper-V or WSL2, and on macOS, it uses HyperKit. The virtual machine layer makes container behavior consistent across systems, but it also adds overhead. This means that both the container workloads and Docker Desktop’s own background processes can take up plenty of system resources.

To keep your computer responsive, Docker provides controls for CPU, memory, and disk. You can limit how many CPU cores Docker can use, set a memory cap to prevent containers from consuming all available RAM, and limit storage or run cleanup to remove unused images, containers, and volumes.

Knowing how Docker Desktop manages CPU, memory, and disk resources gives a clearer picture of where usage comes from. Sometimes heavy consumption is linked to a specific container. However, sometimes it results from Docker’s own background processes. This makes monitoring resource usage essential. It helps you track CPU and memory activity in Docker Desktop, identify what is consuming the most, and keep your system running smoothly.

Monitor CPU and Memory Usage Using Docker Dashboard

The Docker Desktop Dashboard offers a built-in, user-friendly interface for monitoring your containers. It’s the easiest way to check real-time CPU and memory usage without using command-line tools.

To keep track of how your containers are performing, open Docker Desktop and navigate to the Containers section. You’ll see each running container along with real-time CPU and memory usage. This helps you to quickly identify if a container is using too many resources. 

Monitor Resources Docker Desktop UI

For more details, you can click on any container to view its logs, environment variables, and running processes, including real-time details of its CPU, memory, disk, and network usage.

Monitor Resource Usage Of Specific Container

This makes it easy to spot performance issues or troubleshoot problems without any complex commands.

Enhance Monitoring with the Docker Desktop Resource Usage Extension

Another way to monitor container performance in Docker Desktop is by using the Resource Usage extension. While the built-in dashboard already shows CPU and memory usage, this extension takes monitoring a step further by giving you a dedicated dashboard with more detailed insights.

To install it, go to the Extensions section in the left sidebar of Docker Desktop, search for Resource Usage in the search bar, and click the Install button.

Install Resource Usage Extension

Once the extension is successfully installed, you can find it in the left sidebar of Docker Desktop. Click the extension icon to see a clear overview of each container’s CPU and memory usage, along with disk I/O and network activity. You can also filter and sort containers, making it much easier to identify which ones are consuming the most resources. 

Access Resource Usage Extension

Moreover, you can navigate to the Chart View to see resource usage in graphs, which makes it easier to notice spikes or unusual activity in your containers.

View Resource Usage Graphs

Overall, this extension makes monitoring simpler than the default UI. It helps you quickly spot performance issues and manage resources better, especially when running multiple containers.

Track Real-Time Resource Usage with the docker stats Command

The docker stats command lets you track real-time CPU, memory, disk, and network usage of your containers from the terminal. You can open the terminal right inside Docker Desktop and run this command to monitor real-time resource usage for all your running containers.

docker stats

When you run the docker stats command, it streams live container metrics like CPU, memory, etc. To stop the stream and return to the normal terminal prompt, you need to press Ctrl + C

Monitor Resources With Docker Stats

You can also target a specific container by adding its name or ID. For example, specifying the openwebui container in the command will show usage details only for that container.

docker stats openwebui
Monitor Specific Container With Docker Stats

The docker stats command is useful if you prefer command-line monitoring over the graphical dashboard.

Wrapping up

Monitoring CPU and memory usage in Docker Desktop keeps your containers running smoothly and your system responsive. With tools like the built-in dashboard, the Resource Usage extension, and the docker stats command, you can track performance in real time, spot heavy resource users, and troubleshoot issues quickly. These features simplify managing container workloads, giving you clear insights and full control over CPU, memory, and disk usage while staying within Docker Desktop. For more advanced monitoring, you can also use tools like Portainer or Prometheus with Grafana.

Subscribe to our newsletter!

Our latest tutorials delivered straight to your inbox

Anees Asghar Avatar

Read next

The Roman aqueduct at Segovia, built around the first century AD without mortar, still carried water into the 1970s, its 167 granite arches held together by nothing but the precise weight distribution of stones cut to fit each other within fractions of a millimeter.
In 1843, Ada Lovelace described a brass-and-punched-card engine that could act on symbols as well as numbers, even composing music if harmony could be reduced to rules, inside seven translator’s notes three times longer than the paper itself
ARPANET sent its first message on 29 October 1969 from a lab at UCLA to a machine at Stanford, and the message was supposed to read ‘LOGIN’ — but the system crashed after the L and the O, meaning the first word ever transmitted over the network that became the internet was, by accident, ‘LO’.
In 1995, Microsoft shipped a cartoon-house interface called Bob, led by Melinda French, who married Bill Gates while it was in development — it demanded twice the memory of a typical home PC, sold roughly 30,000 copies, and was dead within a year, leaving behind the font Comic Sans and the animated assistant that became Clippy.
Apple’s original 1984 Macintosh keyboard had no arrow keys, no function keys, and no numeric pad because Steve Jobs wanted users to reach for the mouse first. Then Apple quietly sold the missing keys as an accessory.
In 1965, Mary Allen Wilkes wrote LAP6 for the LINC computer from her parents’ Baltimore home, testing an interactive operating system on a 250-pound machine in the living room and becoming the first known person to use a personal computer at home, twelve years before the Apple II reached buyers
In 1969, László Bélády and two IBM colleagues published a paging-machine anomaly showing FIFO could make four memory frames suffer ten page faults after three frames suffered nine, leaving generations of operating-systems students staring at the moment more memory became the wrong answer
In 1964, IBM risked its entire corporate empire on the System/360, a chaotic gamble to make all of its future machines compatible with the same software — and the architecture proved so robust that modern enterprise mainframes today are still running sections of binary code written more than sixty years ago