Commit 8b568e7
perf(darwin): reduce CPU spike during rebuild with launchd tuning
Optimize service startup to reduce CPU contention during nix-darwin rebuild:
Linux Builder (heaviest service - 6 cores, 8GB RAM):
- Disable auto-start: RunAtLoad = false, KeepAlive = false
- Start on-demand with: universe service start linux-builder
User services (sketchybar, jankyborders):
- ProcessType = "Background" for lower scheduling priority
- Nice = 5 for reduced CPU priority
- LowPriorityIO = true for less I/O contention
- ThrottleInterval = 10 for minimum restart interval
Result: Load average dropped from 3.76 to 1.94 after rebuild.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>1 parent 149dff6 commit 8b568e7
2 files changed
+27
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
22 | 30 | | |
23 | 31 | | |
24 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
257 | 257 | | |
258 | 258 | | |
259 | 259 | | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
260 | 279 | | |
261 | 280 | | |
0 commit comments