- Deploy 2 VMs with RHEL7.
- Install docker v1.8.2-10.el7 on both.
- Choose a machine hosting upstream docker registry. Let's call it RegistryNode.
- Let's call the other Client.
- Remember the IP or hostname of the RegistryNode
- Enable tcp port 5000 on RegistryNode.
- Copy
setup-registry-host.sh
to RegistryNode and run it. - Copy
setup-client-host.sh
to Client and run it. - Copy
generate-load.sh
to Client and run it.
Now the interesting part. We've got two images of similar size:
$REGISTRY_NODE:5000/test/packed
$REGISTRY_NODE:5000/test/unpacked
The former has 3 layers, each containing just one file - a tarball. The latter has also 3 layers, each containing unpacked tarball of the first image.
Compare the times of running following command without any load:
time docker push "$REGISTRY_NODE:5000/test/packed"
time docker push "$REGISTRY_NODE:5000/test/unpacked"
Time of the latter will be slightly bigger due to higher complexity of the layers.
# Important - re-deploy the registry on *RegistryNode* before re-runing or continuing with other test
docker stop test-registry
./setup-regisitry-host.sh
Generate some load on the Client:
./generate-load.sh
Compare the times again:
time docker push "$REGISTRY_NODE:5000/test/packed"
time docker push "$REGISTRY_NODE:5000/test/unpacked"
This time the second push will be a lot slower.