Sometimes it is tricky to calculate the required memory for a docker container. To show the current allocated memory (VSZ) run this command from inside the container:
ps --no-headers -o pcpu,vsz | awk '{cpu += $1; vsz += $2} END {print cpu, vsz}'
Sometimes it is tricky to calculate the required memory for a docker container. To show the current allocated memory (VSZ) run this command from inside the container:
ps --no-headers -o pcpu,vsz | awk '{cpu += $1; vsz += $2} END {print cpu, vsz}'