Support tmpfs and a server queue for C++ compilers #10
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
tmpfs
This PR drops an option
-working-dir
, adding two new instead:-cpp-dir {string}
, Directory for incoming C++ files and src cache, default /tmp/nocc/cpp-obj-dir {string}
, Directory for resulting obj files and obj cache, default /tmp/nocc/objThe directory passed as
-cpp-dir
can be placed in tmpfs.All operations with cpp files are performed in that directory:
So, if that directory is placed in tmpfs, the C++ compiler will take all files from memory (except for system headers), which noticeably speeds up compilation.
When setting up limits to tmpfs in a system, ensure that it will fit
-src-cache-limit
plus some extra space.Note, that placing
-obj-dir
in tmpfs is not recommended, because obj files are usually much heavier, and they are just transparently streamed back from a hard disk in chunks.C++ compiler queue
nocc-server now managers C++ compiler launches with a waiting queue. The purpose of a waiting queue is not to over-utilize server resources at peak times.
Currently, amount of max parallel C++ processes is an option provided at start up via
max-parallel-cxx
(in other words, it's not dynamic, nocc-server does not try to analyze CPU/memory).Other improvements
os.Mkdir
on making a hard link from src cache or uploading a fileNOCC_SERVERS
on a client connect and maintainuniqueRemotesList
on a server-side to detect clients with weird env varsThis release bumps version to v1.2.