Eelco Dolstra 9127f5bbc3 hydra-queue-runner: Limit memory usage
When using a binary cache store, the queue runner receives NARs from
the build machines, compresses them, and uploads them to the
cache. However, keeping multiple large NARs in memory can cause the
queue runner to run out of memory. This can happen for instance when
it's processing multiple ISO images concurrently.

The fix is to use a TokenServer to prevent the builder threads to
store more than a certain total size of NARs concurrently (at the
moment, this is hard-coded at 4 GiB). Builder threads that cause the
limit to be exceeded will block until other threads have finished.

The 4 GiB limit does not include certain other allocations, such as
for xz compression or for FSAccessor::readFile(). But since these are
unlikely to be more than the size of the NARs and hydra.nixos.org has
32 GiB RAM, it should be fine.
2016-03-09 14:30:13 +01:00
2015-07-08 16:51:05 +02:00
2016-02-26 19:54:32 +01:00
2015-05-28 17:38:17 +02:00
2011-01-14 10:52:47 +00:00
2010-03-29 14:16:46 +00:00
2010-09-30 14:29:15 +00:00

To start hacking on Hydra, run:

$ ./dev-shell
$ ./configure $configureFlags --prefix=/opt/hydra
$ make
$ make install

Or, if you just want to build from source (on x86_64-linux):

$ nix-build -A build.x86_64-linux release.nix
Description
No description provided
Readme 18 MiB
Languages
Perl 70.5%
C++ 15.5%
Nix 6%
PLpgSQL 3%
Shell 2.3%
Other 2.6%