Journal Home > Volume 26 , Issue 3

Docker, as a mainstream container solution, adopts the Copy-on-Write (CoW) mechanism in its storage drivers. This mechanism satisfies the need of different containers to share the same image. However, when a single container performs operations such as modification of an image file, a duplicate is created in the upper read-write layer, which contributes to the runtime overhead. When the accessed image file is fairly large, this additional overhead becomes non-negligible. Here we present the concept of Dynamic Prefetching Strategy Optimization (DPSO), which optimizes the CoW mechanism for a Docker container on the basis of the dynamic prefetching strategy. At the beginning of the container life cycle, DPSO pre-copies up the image files that are most likely to be copied up later to eliminate the overhead caused by performing this operation during application runtime. The experimental results show that DPSO has an average prefetch accuracy of greater than 78% in complex scenarios and could effectively eliminate the overhead caused by the CoW mechanism.


menu
Abstract
Full text
Outline
About this article

Optimizing the Copy-on-Write Mechanism of Docker by Dynamic Prefetching

Show Author's information Yan JiangWei LiuXuanhua Shi( )Weizhong Qiang
National Engineering Research Center for Big Data Technology and System, Services Computing Technology and System Lab, Huazhong University of Science and Technology, Wuhan 430074, China.

Abstract

Docker, as a mainstream container solution, adopts the Copy-on-Write (CoW) mechanism in its storage drivers. This mechanism satisfies the need of different containers to share the same image. However, when a single container performs operations such as modification of an image file, a duplicate is created in the upper read-write layer, which contributes to the runtime overhead. When the accessed image file is fairly large, this additional overhead becomes non-negligible. Here we present the concept of Dynamic Prefetching Strategy Optimization (DPSO), which optimizes the CoW mechanism for a Docker container on the basis of the dynamic prefetching strategy. At the beginning of the container life cycle, DPSO pre-copies up the image files that are most likely to be copied up later to eliminate the overhead caused by performing this operation during application runtime. The experimental results show that DPSO has an average prefetch accuracy of greater than 78% in complex scenarios and could effectively eliminate the overhead caused by the CoW mechanism.

Keywords: Docker, container, Copy-on-Write (CoW), storage driver, prefetch strategy

References(16)

[1]
W. Felter, A. Ferreira, R. Rajamony, and J. Rubio, An updated performance comparison of virtual machines and Linux containers, presented at IEEE Int. Symp. Performance Analysis of Systems and Software, Philadelphia, PA, USA, 2015.
DOI
[2]
B. Xavier, T. Ferreto, and L. Jersak, Time provisioning evaluation of KVM, Docker and unikernels in a cloud platform, in Proc. 16th IEEE/ACM Int. Symp. Cluster, Cloud and Grid Computing, Cartagena, Colombia, 2016.
DOI
[3]
C. Anderson, Docker [Software engineering], IEEE Softw., .
[4]
J. Okajima, Aufs5-advanced multi layered unification filesystem version 5.x, http://aufs.sourceforge.net/, 2013.
[5]
V. Tarasov, D. Jain, G. Kuenning, S. Mandal, K. Palanisami, P. Shilane, S. Trehan, and E. Zadok, Dmdedup: Device mapper target for data deduplication, presented at Ottawa Linux Symposium, Ottawa, Canada, 2014.
[6]
O. Rodeh, J. Bacik, and C. Mason, BTRFS: The Linux B-tree filesystem, ACM Trans. Storage, vol. 9, no. 3, p. 9, 2013.
[7]
O. Rodeh and A. Teperman, zFS—A scalable distributed file system using object disks, in Proc. 20th IEEE/11th NASA Goddard Conf. Mass Storage Systems and Technologies, San Diego, CA, USA, 2003.
[8]
T. Harter, B. Salmon, R. Liu, A. C. Arpaci-Dusseau, and R. H. Arpaci-Dusseau, Slacker: Fast distribution with lazy Docker containers, in Proc. 14th USENIX Conf. File and Storage Technologies, Santa Clara, CA, USA, 2016.
[9]
S. Soltesz, H. Pötzl, M. E. Fiuczynski, A. Bavier, and L. Peterson, Container-based operating system virtualization: A scalable, high-performance alternative to hypervisors, in Proc. 2nd ACM SIGOPS/EuroSys European Conf. Computer Systems, Lisbon, Portugal, 2007.
DOI
[10]
N. Mizusawa, K. Nakazima, and S. Yamaguchi, Performance evaluation of file operations on OverlayFS, in Proc. 15th Int. Symp. Computing and Networking, Aomori, Japan, 2017.
DOI
[11]
D. Jaramillo, D. V. Nguyen, and R. Smart, Leveraging microservices architecture by using Docker technology, presented at SoutheastCon 2016, Norfolk, VA, USA, 2016.
DOI
[12]
R. Dua, V. Kohli, S. Patil, and S. Patil, Performance analysis of union and cow file systems with Docker, presented at Int. Conf. Computing, Analytics and Security Trends, Pune, India, 2016.
DOI
[13]
V. Tarasov, L. Rupprecht, D. Skourtis, A. Warke, D. Hildebrand, M. Mohamed, N. Mandagere, W. J. Li, R. Rangaswami, and M. Zhao, In search of the ideal storage configuration for Docker containers, in Proc. 2nd Int. Workshops on Foundations and Applications of Self Systems, Tucson, AZ, USA, 2017.
DOI
[14]
X. B. Wu, W. G. Wang, and S. Jiang, TotalCOW: Unleash the power of copy-on-write for thin-provisioned containers, in Proc. 6th Int. Asia-Pacific Workshop on Systems, Tokyo, Japan, 2015, p. 15.
DOI
[15]
F. Zhao, K. Xu, and R. Shain, Improving copy-on-write performance in container storage drivers, presented at Storage Developers Conference, Santa Clara, CA, USA, 2016.
[16]
N. Mizusawa, J. Kon, Y. Seki, J. Tao, and S. Yamaguchi, Performance improvement of file operations on OverlayFS for containers, presented at IEEE International Conference on Smart Computing, Taormina, Italy, 2018.
DOI
Publication history
Copyright
Acknowledgements
Rights and permissions

Publication history

Received: 19 July 2019
Accepted: 26 July 2019
Published: 12 October 2020
Issue date: June 2021

Copyright

© The author(s) 2021.

Acknowledgements

The work was supported by the National Key Research and Development Program of China (No. 2018YFB1003203), the National Natural Science Foundation of China (Nos. 61772218 and 61433019), the Outstanding Youth Foundation of Hubei Province (No. 2016CFA032), and the Chinese Universities Scientific Fund (No. 2019kfyRCPY030).

Rights and permissions

The articles published in this open access journal are distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/).

Return