Larger images are pulled at normal speed and then hang towards the end

Whenever I pull an image, all the layers beyond a certain size download almost to the end, before getting stuck for multiple minutes, then eventually finishing. Here’s a video demonstrating the issue:

I don’t think this is a rate-limiting issue, because it also occurs when pulling images from GitHub’s GHCR repository, and it doesn’t affect all images, only large ones. I don’t think it’s a networking issue, as the machine is connected directly to the router via Ethernet, and I’ve successfully pulled images to other devices on the network (namely my MacBook). I also don’t think it’s running out of resources, as it’s an old workstation PC and the overhead of running Debian shouldn’t be enough to cripple it.

The machine is a Lenovo workstation with an Intel Xeon E31230 and 8GB of RAM. It’s running Debian 11, Docker Engine 20.10.21, containerd 1.6.12, runc 1.1.4 and docker-init 0.19.0.

The issue turned out to be my router. It must be some weird difference between how it treats ethernet and wireless devices, but plugging it into a different router solved the problem.