| With the rapid development of container technology,Docker has been widely used as the best solution for Linux containers.Docker Registry service is one of the core technologies of the Docker ecosystem,assisting users to quickly pull and publish Docker images,thereby creating containers flexibly for development,testing,and deployment.With its lightweight and efficient,Docker attracts large number of user community,resulting in an explosive growth in the number of user requests and the number of customized container images.The traditional Docker Registry cannot support the massive user requests and storage pressure,so many cloud service providers have redesigned the public Docker Registry to be able to scale horizontally,while using the object storage service to solve the Docker image storage problem.Although the loosely coupled Registry structure relieves the request pressure to a certain extent,it will cause a delay overhead that cannot be ignored for the user to pull the image,which eventually leads to a slower container startup speed.Therefore,how to optimize the start-up time of the container has become the focus of academia and industry.In order to solve the problem of increased delay in container startup,existing solutions have made improvements on Docker's components,storage drivers,and architecture,but there are certain security issues.This article cuts in from a new perspective,selects the registry server as the research object,and proposes a caching strategy for backing up some small hotspot Docker images from the object storage server to the registry server memory by studying the access mode of the docker image when users create the container,which improves the registry server resource utilization and shortens the delay of pulling images,and research the storage structure of the image layer,design a prefetching strategy based on correlation of image layers,and further improve the registry cache hit ratio.The main work and innovations are as follows:(1)Memory-redundant A cache strategy for small hotspot images based on Memory-redundant--L-Cache.This article implements a caching strategy for storing hotspot images in registry server memory.Prove the feasibility of the caching strategy by analyzing the normal resource usage of the registry server and the characteristics of the real workload on theregistry server,and modify the storage driver of the registry server to cache hot image storage,and set the memory of the object storage server to two Level cache,remove redundant images with the registry server memory,thereby storing other effective images to save time overhead of disk I/O.Experimental results show that the caching strategy saves 7.7%~19.9% delay compared to the native Docker image pull process.(2)Layer correlation prefetching strategy(LCPA)based on correlation model.This article collects and analyzes manifest of images to build the storage structure of the mirror layer,and establishes a correlation model to calculate the correlation between the layers.When the registry server cache misses,the related mirror layer set is calculated from the miss request and storage structure by the correlation model,and the registry server is proactively prefetching the set from the object storage server,thereby further optimizing the cache hit ratio.Experiments show that LCPA achieves accurate prediction of mirrors,and while reducing unnecessary network traffic overhead,the cache hit ratio of the registry server is increased by 12%~29%,and the delay overhead of 21.1%~49.4%is reduced on average. |