Systems & Infrastructure Handbook
Concise operational checklists, kernel tuning references, and production debugging snippets.
Linux & systemd
Service isolation, journald retention limits, memory pressure inspection, and socket diagnostics.
PostgreSQL
Index bloat analysis, autovacuum tuning, WAL archiving checkpoints, and connection pooling notes.
Go Services
Context cancellation patterns, graceful shutdown hooks, pprof sampling, and GC memory limits.
Linux Diagnostics Quick Reference
Useful read-only commands for triaging CPU, memory, and disk I/O contention on Debian hosts:
# Inspect systemd unit resource usage
systemd-cgtop --depth=2
# Check socket queue depths and listening endpoints
ss -s && ss -tulpn
# Review recent kernel ring buffer warnings
dmesg -T --level=err,warn
PostgreSQL Maintenance Checklist
Verify slow query patterns and table bloat before altering shared buffers or work memory:
SELECT relname, n_live_tup, n_dead_tup, last_autovacuum
FROM pg_stat_user_tables
ORDER BY n_dead_tup DESC
LIMIT 10;
Go Runtime Tuning
For containerized workloads with strict memory limits, pair GOMEMLIMIT with a moderate GOGC value to smooth tail latency during heap spikes.
GOGC=100 GOMEMLIMIT=512MiB ./service --config /etc/service/config.yaml