1
0
Fork 0
mirror of https://github.com/NixOS/hydra.git synced 2024-10-17 16:37:26 -04:00

queue-runner: try larger pipe buffer sizes

(cherry picked from commit 18466e8326)
This commit is contained in:
Pierre Bourdon 2024-02-22 14:45:17 +01:00 committed by John Ericson
parent 559376e907
commit 5728011da1

View file

@ -54,9 +54,20 @@ static std::unique_ptr<SSHMaster::Connection> openConnection(
command.splice(command.end(), extraStoreArgs(machine->sshName));
}
return master.startCommand(std::move(command), {
auto ret = master.startCommand(std::move(command), {
"-a", "-oBatchMode=yes", "-oConnectTimeout=60", "-oTCPKeepAlive=yes"
});
// XXX: determine the actual max value we can use from /proc.
// FIXME: Should this be upstreamed into `startCommand` in Nix?
int pipesize = 1024 * 1024;
fcntl(ret->in.get(), F_SETPIPE_SZ, &pipesize);
fcntl(ret->out.get(), F_SETPIPE_SZ, &pipesize);
return ret;
}