I am not sure if this is a bug so will start here vs. opening a GitHub issue.
I have noticed, more so in the past year though I can't say I have documented this with any specificity, that at times downloads of updates take excruciatingly long. Mind you the frustration is that this isn't consistent. Most of the time downloads are reasonably quick. But sometimes, like this morning, they are brutally slow.
Now originally I attributed this to various things:
- The munki server is a small 1vCore/1GB RAM Linux/50GB SSD cloudserver (one of those shared resource deals like a Digital Ocean droplet, not a dedicated server) with unlimited transfer and a states rate of 400Mbps throughput, where I have tuned things using NGINX and it has worked swimmingly for years
- "The Internet"... as in there's something going on with the backbone or somewhere in between my client device and the server
- etc.
even though I sit at home with a 1Gbps symmetric fiber connection on my end.
However, this morning I got it in my head to check some things when, upon having Managed Software Center update, once again it was showing in its progress bar that it was downloading updates (about 6 of them) but was doing each one at an unbelievably slow pace. It is still going on as I type this. I'm talking taking minutes to download a 50MB file.
SSHing to the cloud server and running `top`, I see it was bored out of its skull, with the CPU topped out at < 1% and RAM usage at ~30%. Ok, so the server itself isn't busy.
Next I decided to test by running iPerf3 from the same client that is doing the downloads of updates to the same server providing those updates. I averaged 180Mbps! Ok, so it's not the path nor the shared resources or something within the cloud provider's network, because at 180Mbps that 50MB file should have downloaded in about 3 seconds.
Next I checked my client device. Now the only thing that jumps out at me is that managedsoftwareupdate is pegged at 100%. This seems... odd, considering that all that is going on are file downloads. And not quickly either.
I know Python due to the GIL is limited to running in 1 core, but even so, this client is an M3 iMac. And again, most of the time these downloads go reasonably quickly.
Of course it is entirely possible that this is something on the client side. But what if it's intermittent like this?
If there is anything I can do whenever this is occurring to help diagnose this, please let me know. Usually updates take but a minute. But when this happens, it's like it's operating in molasses.
To be clear, I keep everything up-to-date. So currently I am running
- Managed Software Center 7.0.5.5446 (5446)
- munkitools_python 3.12.2.4689 (the output of `munki-python --version` is 3.12.2)
NOTE: Just to be clear, this is NOT a recent issue, as in something that just manifested with one of the latest updates. This has occurred for a bit now. It is just that only this morning did I dig into it.