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