Docker Community Forums

Share and learn in the Docker community.

Docker's VM memory usage

I’m using a Docker to run 3 containers for Wordpress i.e. Wordpress, PHP & mysql, nothing else. I’m seeing in task manager that I’m using 1.7GB of memory which seems higher than what I normally see which I’m pretty sure is typically about 800MB. CPU usage is low. So is this normal?

Win 10
Dell XPS 13 laptop
8GB memory
Docker v19.03.12

At the moment I have a MariaDB, Adminer and Perl application container running and 1.8 GB are used by Vmmem, so to me this looks normal (Fujitsu Celsius, 16 GB RAM, Win 10 2004.20180, Docker Desktop 2.3.4.0).

Thanks to these 2 links I resolved my issue

1 Like

When using the --format option, the stats command either outputs the data exactly as the template declares or, when using the table directive, includes column headers as well.

The following example uses a template without headers and outputs the Container and CPUPerc entries separated by a colon (:slight_smile: for all images:

$ docker stats --format “{{.Container}}: {{.CPUPerc}}”

09d3bb5b1604: 6.61%
9db7aa4d986d: 9.19%
3f214c61ad1d: 0.00%
To list all containers statistics with their name, CPU percentage and memory usage in a table format you can use:

$ docker stats --format “table {{.Container}}\t{{.CPUPerc}}\t{{.MemUsage}}”

CONTAINER CPU % PRIV WORKING SET
1285939c1fd3 0.07% 796 KiB / 64 MiB
9c76f7834ae2 0.07% 2.746 MiB / 64 MiB
d1ea048f04e4 0.03% 4.583 MiB / 64 MiB
The default format is as follows:

On Linux:

“table {{.ID}}\t{{.Name}}\t{{.CPUPerc}}\t{{.MemUsage}}\t{{.MemPerc}}\t{{.NetIO}}\t{{.BlockIO}}\t{{.PIDs}}”
On Windows:

“table {{.ID}}\t{{.Name}}\t{{.CPUPerc}}\t{{.MemUsage}}\t{{.NetIO}}\t{{.BlockIO}}”