(address . guix-patches@gnu.org)
Hi,
I did some digging to investigate why SSH-based guix operations are currently
so slow. One of the reasons seems to be that some operations write single words
to the socket and due to NOWAIT these result in a lot of small packets.
The attached patch modifies store.scm to buffer all writes, so that won’t happen
any more. I’m seeing about ~40% speedup (6.194s vs 10.075s for the best out of
five runs) for `GUIX_DAEMON_SOCKET=ssh://localhost guix environment guix --
true`, but it also seems to have a negative impact on UNIX domain socket
communication by ~10% (1.561s vs 1.385s). For the notorious r-learnr package
it’s still ~20% better (ssh, 16.620/21.418) and only ~3% worse (unix,
11.489/11.199). Keep in mind localhost has a much larger MTU and much lower
latency than usual networks though. It might benefit from having an even bigger
write buffer (64k vs. currently 8k).
Cheers,
Lars
-----BEGIN PGP SIGNATURE-----
iQGzBAABCgAdFiEEyk+M9DfXR4/aBV/UQhN3ARo3hEYFAl7aDFMACgkQQhN3ARo3
hEaxtgv/dpe1nWch2+Hfx3WBMZha9WyyFjW8TeasbC5cdy5bccYwasr5Q3Zd+Xbr
FYBubNTUkMZz4p5M4qIC1QRloyXf9GlkSYKY7VTYGEXmlIa6mPPzwpkcq0xcJTl3
vypg12EhiBJBXA0KuGpkWgn8Cgxb7y0K1fHeWHa2o+oPXXdVqgJt36oK+bxxkkTH
pmv0D4PhDWnxMv0wvYdz6ls5TYiIqUGpSufMIh9ynEiXBkGz/0J4bEGVV5aSKBrF
LEB01Pr7TSuR9UDg+OqEz7Q7MMVEN63BaQkxJOi2rBdVLDX/C713LHjgzSahXY37
OzOQZUFX8aCPF4dJSutyUhOUKsdOyR7K3qGxlvuRiCmzHotSym1kWIDuo/9f1e1H
h1YOutEHUIiOyiPmo941h5GlGV0qZuFCjKEu4Y7SXT0UYAR1vieL4RIzc6E0IY+m
xrLixnn1pSOn4ebeuB+QDxha/VmvyPXo2nUBwOKuXhn9dGld5x0nYWsjrC7Pj91i
DSdSf1Xm
=THIV
-----END PGP SIGNATURE-----