Merge pull request #1387 from NixOS/pipe-buffer-size
Some checks failed
Test / tests (push) Has been cancelled

queue-runner: try larger pipe buffer sizes
This commit is contained in:
John Ericson 2024-05-23 11:50:15 -04:00 committed by GitHub
commit b3e0d9a8b7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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;
}