Skip to content

Commit

Permalink
Merge pull request #1387 from NixOS/pipe-buffer-size
Browse files Browse the repository at this point in the history
queue-runner: try larger pipe buffer sizes
  • Loading branch information
Ericson2314 authored May 23, 2024
2 parents 559376e + 5728011 commit b3e0d9a
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/hydra-queue-runner/build-remote.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}


Expand Down

0 comments on commit b3e0d9a

Please sign in to comment.