A Performance Analysis on Auto Scaling Using Different Image Pulling Methods in Kubernetes
Korea Computer Congress (KCC 2023)
Summary
After HPA requests scale-up, new pods still need their images before serving traffic. The study compares scale-up completion times with and without pre-pulled images.
- Role
- First authorimage readiness and autoscaling performance research
- Outcome
- For a 500MB image at HPA Thresholds of 30%, 50%, and 70%, pre-pulling reduced scaling time by 38.21%, 36.46%, and 65.78%.
Image Preparation After a Scale-Up Request
After HPA requests scale-up, a worker without the container image must download it from a remote registry. Waiting for that pull under high load can prolong overload. The study measured how pre-pulled images changed the time needed to complete scale-up.
Scale-Up Time with and Without Prepared Images
The cluster used one master with an Intel Core i9-10900K, DDR4 32GB, and Ubuntu 20.04, plus three workers. wget sent an HTTP request to php-apache every 0.02 seconds while metrics were monitored for five minutes.
Single-pod startup was first compared for 300MB, 500MB, and 1GB images. HPA experiments then used a 500MB image at CPU Thresholds of 30%, 50%, and 70%. Initially, one of the three workers held the image and ran one pod. The comparison examined pulling images during expansion versus having them prepared beforehand.
The single-pod experiment varied image size and compared total startup time with the share spent pulling. The HPA experiment fixed size at 500MB while varying the Threshold and image preparation. This separates preparation delays associated with larger images from their effect during expansion.
Preparation between replica decisions and pod execution
HPA determines the desired replica count, and the scheduler selects nodes for new pods. Image preparation and container execution then occur on those nodes. The experiment separates the time a scale-up request is made from the time the target pod count is running.
Nodes needing an image from a remote registry incur additional preparation time. Images on some nodes do not establish the preparation state of the node receiving a new pod, so image availability is treated as a separate experimental condition.
Shorter Scale-Up Time with Pre-Pulled Images
Image pulling accounted for an average of 72.8% of container start time when the image was local, compared with 98–99% when it was absent. Without a local image, the share increased with image size. With the image present, the pulling stage took an average of 2.12 seconds regardless of size.
Without the image, reaching the target pod count took more than 60 seconds after scale-up was requested. Prepared images reached the target sooner. At 500MB and CPU Thresholds of 30%, 50%, and 70%, scaling time fell by 38.21%, 36.46%, and 65.78%, and CPU utilization by 39.53%, 31.11%, and 23.11%, respectively.
Even an earlier expansion request from a low Threshold leaves existing pods handling requests while new pods prepare their images. Image preparation reduces the time needed to make added processing capacity available after the scaling decision.
The paper proposes reinforcement-learning scheduling of where and when to pre-pull images based on actual usage patterns as future work. The observed impact of image availability on expansion delay motivates this next step toward an operational pre-pulling policy. I conducted the research as first author.