Today, I've been setting up a new Ubuntu 20.04 DigitalOcean droplet with Docker and the like. At some point I realized docker-compose commands where extremely slow, as a matter of fact it first seemed to me docker-compose kept hanging up.

After a while of googling I hit upon a Github issue addressing the problem I was facing. There, they explain Docker needs a certain level of system entropy to function propperly:

So, sometimes it can happen that your system does not generate enough such entropy. I guess in my case it might have been due to being a completely new VM with hardly any processes running on it.

Good news: it turns out you can boost that entropy with a Linux entropy daemon called haveged.

After installing it, docker-compose is still not as fast as I'm used to on my other machines. But it's a lot better than before (2+min vs 1-2 sec delay now).

Getagged mit:
blog comments powered by Disqus