How to reproduce
https://pastila.nl/?00123e33/0be4d9ab8f8bcfe06091dd6d26e7ba53#Bs1ioDaY/ldZ3NTY7nBx0w==
It shows Peak memory usage (for query): 1.69 GiB.
The query took 0.8 seconds, while curl does it in 0.3 seconds: time curl https://api.github.com/repos/mongodb/mongo/stargazers
Also,
ReadWriteBufferFromHTTPRequestsSent 21
Why 21 requests? It should be one.
Note: I tried to disable max_download_threads, but it didn't help.