Last active
January 20, 2017 10:05
-
-
Save motin/488998820e31f65c4ae01b4bf4d42146 to your computer and use it in GitHub Desktop.
Benchmark script related to https://github.com/docker/for-mac/issues/77
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -o errexit | |
#set -x | |
echo "Benchmark - dd if=/dev/zero of=speedtest bs=1024 count=100000" | |
echo "* On host" | |
time dd if=/dev/zero of=speedtest bs=1024 count=100000 | |
echo | |
echo "* Within Docker for Mac without a host volume" | |
docker run --rm -it alpine time dd if=/dev/zero of=speedtest bs=1024 count=100000 | |
echo | |
echo "* Within Docker for Mac within a host volume" | |
docker run --rm -it -v "$(PWD):/pwd" -w /pwd alpine time dd if=/dev/zero of=speedtest bs=1024 count=100000 | |
echo | |
echo "* Within Docker for Mac within a host volume using NFS" | |
export PWDNFS="${PWD/\/Users\/$USER//mnt}" | |
docker run --rm -it -v "$PWDNFS:/pwd" -w /pwd alpine time dd if=/dev/zero of=speedtest bs=1024 count=100000 | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment