2026 Rent Mac Mini 7×24 Log Matrix — lz4 vs zstd Slice Rotation, IO Nice, Inode & Disk Watermark Checklist
Teams that rent a Mac Mini for seven by twenty four batch work often ship verbose JSON lines, gateway traces, and worker stderr to one APFS volume until log rotation, compression, and inode pressure quietly steal tail latency.
Matrix for lz4 versus zstd, IO nice posture, plus newsyslog, logrotate, and launchd fragments. See APFS waterline FAQ, launchd throttle matrix, night batch log runbook.
Pain points for log-heavy rentals
- CPU spikes after rotate. Aggressive
zstdfights batch workers on the same cores. - Inode cliffs. Tiny rotated files exhaust metadata before
df -hlooks bad. - SSH lag. Without nice and LowPriorityIO, compress hooks steal interactive latency.
Codec decision matrix
Pick a row first. Benchmark a real slice with /usr/bin/time.
| Codec | CPU posture | Size posture | Best fit |
|---|---|---|---|
lz4 -1 |
Very low | Moderate shrink | Always-on tail friendly compression |
zstd -3 |
Low to medium | Strong shrink | Default nightly lane on M4 class hosts |
zstd -9 |
High | Dense archives | Quiet windows only with single writer |
Compression level versus CPU load
Treat levels as contracts. Minutes of pegged vCPU on a shared Mac Mini mean the wrong row.
| Level band | CPU yellow | CPU red |
|---|---|---|
| lz4 fast | User CPU above forty percent for five minutes while batch SLA is active | Sustained above seventy percent with rising latency |
| zstd three to six | One core above sixty percent for ten minutes | Thermal pressure logs or watchdog restarts |
| zstd seven plus | Any wall time overlap with primary batch | Never without explicit maintenance window |
Rotation frequency and slice sizing
Size triggers win for bursts. Clock triggers still catch chatty low byte daemons.
- Size. Fifty to two hundred megabytes per file keeps tail latency sane.
- Time. Hourly gateways, six hour workers, daily cold archives.
- Retention. Seven to fourteen SSD generations then object storage.
Pairing with launchd
Put compress and upload in one agent with calendar spacing. Set Nice ten to nineteen and LowPriorityIO true.
<key>Nice</key>
<integer>12</integer>
<key>LowPriorityIO</key>
<true/>
<key>ThrottleInterval</key>
<integer>120</integer>
From post-rotate scripts call nice -n 12 zstd -q -3 /var/log/runmini/app.log.0 when plist edits are rare.
Disk and inode watermark actions
Automate actions before stalls page anyone. Match ladders to Valkey disk gates when caches share the host.
| Signal | Yellow plan | Red act |
|---|---|---|
| APFS free percent | Below fifteen percent trim retained slices and pause noncritical writers | Below ten percent stop new rotations until upload drains space |
| Inode percent | Above seventy percent schedule coalesce and archive | Above eighty five percent halt per minute tiny file creation |
| Rotate queue depth | More than three pending compress jobs | More than six pending jobs drop to lz4 only |
Executable snippets
macOS ships newsyslog. Linux neighbors can use packaged logrotate. Edit paths per image.
newsyslog.conf fragment
# /etc/newsyslog.d/runmini.conf — rotate only; run zstd or lz4 in launchd after HUP
/var/log/runmini/app.log 640 14 100000 * - /var/run/runmini.pid 30
logrotate snippet
/var/log/runmini/app.log {
size 128M
rotate 14
compress
compresscmd /usr/bin/zstd
compressext .zst
compressoptions -3 -T1
delaycompress
postrotate
/usr/bin/nice -n 12 /usr/local/bin/upload-slice.sh "$1" || true
endscript
}
Bash slice helper
LOG=/var/log/runmini/app.log
TS=$(date -u +%Y%m%dT%H%M%SZ)
mv "$LOG" "$LOG.$TS"
/usr/bin/nice -n 12 /usr/bin/lz4 -q -f "$LOG.$TS" "$LOG.$TS.lz4"
/usr/bin/install -m 640 /dev/null "$LOG"
/bin/kill -HUP "$(cat /var/run/runmini.pid)"
Runbook steps
- Measure hourly log megabytes and peak inode delta with
df -ganddf -i. - Pick codec row, then set size and generation caps in newsyslog or logrotate.
- Add plist Nice plus LowPriorityIO for compress and upload agents.
- Automate yellow responses that switch post-rotate to lz4 only.
- Rehearse red response that pauses rotation and pages owners before metadata errors.
- Document checksum and object key layout for every off box upload.
Citeable gates: size fifty to two hundred megabytes, retain seven to fourteen, inode yellow seventy percent, red eighty five, disk yellow fifteen percent free, red ten percent, nice twelve, zstd three.
FAQ
- Should nightly compression use lz4 or zstd on one rental host
- lz4 when CPU is scarce. zstd three when disk is tight inside a quiet launchd lane with LowPriorityIO.
- How often should logs rotate for seven by twenty four jobs
- Size triggers fifty to two hundred megabytes plus hourly nets for chatty services.
- When should inode pressure block tiny writers
- Cleanup above seventy percent inode use. Hard stop risky writers above eighty five percent until archival finishes.
Buy versus rent (short take)
Buying front loads capex and refresh. Renting a Mac Mini trades that for monthly cost and quicker disk tier bumps when logs spike. Match tiers on Pricing then Purchase.
Choose a Mac node for log-heavy seven by twenty four work
RunMini Apple Silicon for SSH plus spare SSD for slices. Home, Plans, Help, Rent. More ops depth in Valkey matrix and Vision OCR waterline.
Bookmark Home and Blog. Revisit after macOS updates move newsyslog defaults.