Add SSHUploadPackWithSidechannel
Implements gitlab-com/gl-infra/scalability#1513 (closed).
This adds a new RPC, SSHUploadPackWithSidechannel. It behaves the same as SSHUploadPack but it uses the sidechannel transport. This is the SSH equivalent of PostUploadPackWithSidechannel.
Because our SSHUploadPack tests use gitaly-ssh
, this MR adds (has to add) support for the new RPC to gitaly-ssh
. It is enabled by setting GITALY_USE_SIDECHANNEL=1
.
While working on this I ran into a bug in streamio.Reader so there is a commit fixing that bug in this MR too.
Benchmark data, a 1.2GB Git SSH clone from the pack-objects cache. Before flamegraph, after flamegraph.
Process | Perf samples using SSHUploadPack | Perf samples using SSHUploadPackWithSidechannel |
---|---|---|
gitaly |
775 | 326 |
gitlab-sshd |
1486 | 872 |
praefect |
915 | 239 |
Total | 3176 | 1437 |
Edited by Jacob Vosmaer