I always prefer bind/mount-fs over docker volume because of safety, for example if you accidentally run docker volume rm $(docker volume ls -q) this would delete all your docker volume (I did this multiple times on my own dev PC), also you can easily backup/rsync/copy/manage files if using bind/mount-fs. The conclusion is, docker volume is a bit faster (+10%) for sequential small, but significantly slower (-72% to -84%) for large sequential files compared to bind/mount-fs, for the other cases seems there's no noticeable difference. # ^ running twice because I'm not sure why it's so slowġ0737418240 bytes (11 GB, 10 GiB) copied, 12.7516 s, 842 MB/s Time cp -R /temp3/file-IO-benchmark /temp1 # bindfs ![]() Time cp -R /temp3/file-IO-benchmark /temp2 # dockvol removing file when running benchmark twice for example):Īlias time='/usr/bin/time -f "\nCPU: %Us\tReal: %es\tRAM: %MKB"' First benchmark we're gonna clone from this repository, then run copy, create 100 small files, then do 2 sequential write (small and large), here's the result of those (some steps not pasted below, eg. The docker compose file is on the sibling directory as data-root of docker to ensure using the same SSD. Which one can be the fastest? here's the docker compose: ![]() ![]() So today we're gonna benchmark between docker-volume (bind to docker-managed volume), bind/mount-fs (binding to host filesystem), and tmpfs.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |