1

A quick way to speed up Docker

 1 year ago
source link: https://barryvanveen.nl/articles/db584055-a-quick-way-to-speed-up-docker
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

A quick way to speed up Docker

Oct 15, 2022

I've heard many devs working on MacOS that their Docker development environment is slow. Enabling these experimental features can be a quick and easy improvement.

Experimental features

In Docker Desktop, go to Settings and then to Experimental features.

Enable "Use the new Virtualization framework" and "Enable VirtioFS accelerator directory sharing".

Press "Apply & Restart".

Screenshot of Docker (version 4.12.0) settings screen with experimental features enabled
Docker's experimental features

Performance

Apache Benchmark can be used to test the performance increase of these features. Using my recently created ab-runner tool simplifies the process.

For each setup, the script made 500 requests to the about page of this blog (running locally on Docker, of course). Response times are averaged over all runs. Docker is running version 4.12.0, MacOS is on version 12.6.

The first run (left) was done with default settings. For the second run (middle) only the new Virtualization framework feature was enabled. The third run (right) also enabled the VirtioFS feature.

Comparison plot of 3 ab-runner tests

The results are very clear: response times went down from 785 ms to 232 ms. That is more than 3 times as fast as before!

Naturally, your milage may very, depending on your project and on your machine.

Just give it a go. It takes less 5 minutes to change and might make your developer experience a lot better.

Did this help you out? Share the improvement you saw on your project in the comments. Thanks for reading!


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK