moby: Slow IO performance inside container compared with the host.
Output of docker version
:
docker version
Client:
Version: 1.9.1
API version: 1.21
Go version: go1.4.2
Git commit: a34a1d5
Built:
OS/Arch: linux/amd64
Server:
Version: 1.9.1
API version: 1.21
Go version: go1.4.2
Git commit: a34a1d5
Built:
OS/Arch: linux/amd64
Output of docker info
:
docker info
Containers: 2
Images: 3
Server Version: 1.9.1
Storage Driver: devicemapper
Pool Name: docker-254:1-4458480-pool
Pool Blocksize: 65.54 kB
Base Device Size: 10.74 GB
Backing Filesystem:
Data file: /dev/loop0
Metadata file: /dev/loop1
Data Space Used: 2.52 GB
Data Space Total: 107.4 GB
Data Space Available: 96.38 GB
Metadata Space Used: 2.081 MB
Metadata Space Total: 2.147 GB
Metadata Space Available: 2.145 GB
Udev Sync Supported: true
Deferred Removal Enabled: false
Deferred Deletion Enabled: false
Deferred Deleted Device Count: 0
Data loop file: /var/lib/docker/devicemapper/devicemapper/data
Metadata loop file: /var/lib/docker/devicemapper/devicemapper/metadata
Library Version: 1.03.01 (2011-10-15)
Execution Driver: native-0.2
Logging Driver: json-file
Kernel Version: 3.16.6-2-desktop
Operating System: openSUSE 13.2 (Harlequin) (x86_64)
CPUs: 4
Total Memory: 7.722 GiB
Name: gustavo-host
ID: MRRI:5WIP:JOYH:4KZT:BVMU:HMMR:4BL6:6NKP:VM5H:36AN:6LFR:YHK7
WARNING: No swap limit support
Additional environment details (AWS, VirtualBox, physical, etc.):
- Physical Environment (8GB RAM, Core i5-4590, ext4)
Steps to reproduce the issue:
- Install openSuSE 13.2
- Install docker
- run Iometer benchmark on the host
- run Iometer benchmark on a container based on SuSE. A data volume was used as the partition were to execute the benchmark.
- Compare results
Describe the results you received: Below is a table showing the results. For all tests, the performance inside the container was around 40% of the performance of the host.
Describe the results you expected: I expected the performance of the container be closer to the host.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 4
- Comments: 62 (30 by maintainers)
Here are the testings. I attached an external disk with 1GB size for this.
Results: 31.8 kB/s on docker and 293 kB/s on host
Results: 406 kB/s on docker and 409 kB/s on host
Results: 757 kB/s on docker and 722 kB/s on host
Results: 330 kB/s on docker and 317 kB/s on host
Basically, there should be no impact; when using a bind-mounted directory, or a volume, there’s nothing between the process and the disk, it’s just a mounted directory. The only thing that docker can do, is set a constraint (but these are disabled by default), such as;