moby: devicemapper: dm.basesize should be tunable per-container

Right now when using the devicemapper graph driver, the dm.basesize daemon flag sets the default size of the CoW volume for each container to 10G by default.

If a user needs more than 10G in their CoW volume, they must completely tear down their storage backend (delete all containers and images), rm -rf /var/lib/docker customize dm.basesize, start docker and recreate all their images/containers.

We need an option to make dm.basesize tunable on a per-container basis. Keep the default of 10G, but allow an override at runtime:

i.e. this would create a new container of 32G size:

# docker run -it --basesize=32G rhel7 bash

I am explicitly NOT including resizing of existing/running containers in this PR, although that would be useful.

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 31 (22 by maintainers)

Most upvoted comments

@jeremyeder Here is the initial data with 100 container creation, 3 iterations.

10G (Time is in seconds)

Time taken to create containers is 51.707271494 Time taken to create containers is 52.670078980 Time taken to create containers is 54.176040303

100G (Time is in seconds)

Time taken to create containers is 51.592516651 Time taken to create containers is 52.896233596 Time taken to create containers is 52.387154341

10G (Data and Metadata space usage)

Data Space Used: 726.4 MB Metadata Space Used: 3.281 MB

100G (Data and Metadata Space Usage)

Data Space Used: 766.5 MB Metadata Space Used: 3.314 MB

Observations

  • Looks like nothing much has changed with basesize 100G. Container creation time is more or less same.
  • There is around 40MB of penalty in terms of data space. And I think that penalty gets applied as soon as docker start and does not scale with number of containers.