Parallelize managed unit precompile

This commit is contained in:
udo
2026-07-18 15:24:51 +00:00
parent 39636acf2e
commit b9b70659a3
9 changed files with 257 additions and 18 deletions
+6
View File
@@ -252,6 +252,12 @@ scripts/systemd/manage-uce-service.sh restart
scripts/systemd/manage-uce-service.sh logs 200
```
Managed restart builds and precompiles the complete candidate ABI generation
before it switches the service. Precompile uses two low-priority processes by
default; set `PRECOMPILE_JOBS` in `/etc/uce/settings.cfg` to tune the bounded
116 process count for the host. A failed worker, compile, serialization, or
result report aborts the switch and leaves the current service running.
Equivalent manual systemd service for a source checkout (`<UCE_REPO>` = checkout root):
```ini
+6 -1
View File
@@ -238,7 +238,12 @@ is the runtime core ABI. Old and new service binaries therefore never publish
or read the same unit path during an ABI transition. The managed restart builds
and serializes the complete next generation before stopping the old service;
failure aborts the switch and leaves the running generation intact. Old
generation directories are retained as an explicit rollback path.
generation directories are retained as an explicit rollback path. Two
low-priority precompile processes are used by default so independent units do
not serialize deployment time while live workers retain scheduler priority.
`PRECOMPILE_JOBS` or `UCE_PRECOMPILE_JOBS` may select 116 processes. Unit
publication and the shared generation PCH use separate advisory locks, and any
worker/reporting failure rejects the candidate generation.
The proactive compiler and request workers coordinate through per-unit file
locks and a lock-protected demand-priority queue under `BIN_DIRECTORY`. A small