Docker Community Forums

Share and learn in the Docker community.

Large named volume slows down container start

docker

(Mxkulas) #1

// Edit#1: Added one question.
// Edit#2: Added one question more.

My docker takes a veeery long time (from 40 sec to 170 sec) to start a container when binding a large named volume (ca. 80 GiB and about 1.7 million files). Example:

docker run -ti --rm -v my_large_home:/tmp/jpy_home some_jupyterhub /bin/bash

For comparision , I have measured the docker run times with a
small named volume and no volume at all:

  • no volume: 3 sec
  • small named volume (4MiB and ~1K files): 4 sec.

These timing are fine for me.

Surprisingly, when starting a container and creating a bind mount of the named volume host directory directly, the start up time is slow and therefore, acceptable, i.e. ~ 4 sec.
In this case:

docker run -ti --rm -v /data/docker/volumes/my_large_home/_data:/tmp/jpy_home some_jupyterhub /bin/bash 

I am using docker 1.12.6 on CentOS 7.

What does docker-run slow down when creating a bind mount of a named volume?
Any idea how to speed up the container start with big named volumes?
What kind of experience do you have with big volumes?

Thank you in advance!


(Mxkulas) #2

I have the impression that I am the only one with big data volumes. Please correct me!

Is there anyone out there who uses named volumes with more than 80 GiB without any problem?
Who uses named volumes with more than 1.7 million files without any problem?


(Mxkulas) #3

Slow start is fixed: Docker in a recent version, e.g. 17.12, starts quickly, i.e. within a few seconds.