Add hydra.conf option "nar_buffer_size" to configure memoryTokens limit

It defaults to half the physical RAM.
This commit is contained in:
Eelco Dolstra
2017-03-03 12:37:27 +01:00
parent 7c3e5c99c0
commit 500c27e4d5
3 changed files with 69 additions and 33 deletions

View File

@ -250,10 +250,15 @@ struct Machine
};
class Config;
class State
{
private:
std::unique_ptr<Config> config;
// FIXME: Make configurable.
const unsigned int maxTries = 5;
const unsigned int retryInterval = 60; // seconds
@ -262,8 +267,6 @@ private:
nix::Path hydraData, logDir;
std::map<std::string, std::string> hydraConfig;
bool useSubstitutes = false;
/* The queued builds. */
@ -407,7 +410,7 @@ private:
tokens are available. */
nix::TokenServer memoryTokens;
size_t maxOutputSize = 2ULL << 30;
size_t maxOutputSize;
time_t lastStatusLogged = 0;
const int statusLogInterval = 300;