Skip to content

Commit b3e0d9a

Browse files
authored
Merge pull request #1387 from NixOS/pipe-buffer-size
queue-runner: try larger pipe buffer sizes
2 parents 559376e + 5728011 commit b3e0d9a

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/hydra-queue-runner/build-remote.cc

+12-1
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,20 @@ static std::unique_ptr<SSHMaster::Connection> openConnection(
5454
command.splice(command.end(), extraStoreArgs(machine->sshName));
5555
}
5656

57-
return master.startCommand(std::move(command), {
57+
auto ret = master.startCommand(std::move(command), {
5858
"-a", "-oBatchMode=yes", "-oConnectTimeout=60", "-oTCPKeepAlive=yes"
5959
});
60+
61+
// XXX: determine the actual max value we can use from /proc.
62+
63+
// FIXME: Should this be upstreamed into `startCommand` in Nix?
64+
65+
int pipesize = 1024 * 1024;
66+
67+
fcntl(ret->in.get(), F_SETPIPE_SZ, &pipesize);
68+
fcntl(ret->out.get(), F_SETPIPE_SZ, &pipesize);
69+
70+
return ret;
6071
}
6172

6273

0 commit comments

Comments
 (0)