igr
igr

Reputation: 10604

One docker container on AWS - resource usage?

If I setup just one Docker container on my AWS - and use only default configuration - would this docker container use the whole memory and all the processors?

Or do I need to configure it?

Upvotes: 1

Views: 74

Answers (1)

spectre007
spectre007

Reputation: 1539

Memory

There is no memory limit for the container be default, it can use as much as it can.

You can configure the memory usage as below using "-m" flag of docker run command

-m, --memory=""            Memory limit (format: <number><optional unit>, where unit = b, k, m or g)

$docker run -t -i -m 500M centos6_my /bin/bash

Processors

Containers can by default run on any of the available CPUs, CPU usage can be configured using below "-c" and "--cpuset" flag of docker run command

 -c, --cpu-shares=0         CPU shares (relative weight)
  --cpuset=""                CPUs in which to allow execution (0-3, 0,1)

please read Docker documentation for more details : link

Upvotes: 1

Related Questions