On 2/7/23 17:29, Richard W.M. Jones wrote:
NOTE! At least patch 4 should not be applied, and maybe the whole series is a bust. I am mainly posting this on the list for discussion and maybe to archive it.
Version 1 was here: https://listman.redhat.com/archives/libguestfs/2023-February/030610.html
This patch series introduces the concept of a pool of libcurl handles, instead of always associating one libcurl handle with one NBD connection. This gives you a bit more flexibility, eg. you can have a highly concurrent multi-conn NBD connection, but not overwhelm the remote web server with HTTP connections. Or vice versa.
Compared to the earlier version, I have pushed a couple of simple patches from the old series upstream. The remaining patches are tidied up a bit and better tested, but are largely the same.
Patches 1-3 on their own are performance neutral in the cases I tested where you have approximately the same number of NBD connections as web server connections (as expected).
Patch 4 kills performance, for reasons discussed here: https://listman.redhat.com/archives/libguestfs/2023-February/030618.html I was not able to fix this although I have tried several approaches.
(patches 1 through 3 are now upstream: 4ff1021ed85a..6c6b8c225ad3)