mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 18:41:08 +02:00
Colima starts its Linux VM with no swap configured. Without swap the
kernel responds to memory pressure by invoking the OOM-killer instead
of paging out cold pages — meaning a transient peak (mana-web Vite
build with 8 GiB heap landing on top of the running container set)
takes down a container instead of just stalling for a few seconds.
The 2026-04-28 Mac Mini RAM audit found:
- VM allocated: 12 GiB (1 GiB kernel overhead → 11 GiB user)
- Container RSS: ~4 GiB pinned
- Available headroom: ~7.6 GiB
- mana-web Vite peak: ~8 GiB
That's 400 MiB over the limit during builds, which is why we previously
needed the build-memory-headroom.sh wrapper to pause monitoring (frees
~700 MiB temporarily). Swap is the safer second backstop — Linux only
swaps under actual pressure (used=0 right after creation, confirmed
free -h), and the kernel can fall back to paging cold container memory
to give a build the burst it needs without killing anything.
The new step in migrate-to-colima.sh:
- creates /swap (2 GiB, root-only)
- mkswap + swapon
- persists in /etc/fstab so the VM remounts it on every restart
- idempotent — re-runs are no-ops
Already provisioned on the live VM via:
ssh mana-server 'colima ssh -- "sudo fallocate -l 2G /swap && \
sudo chmod 600 /swap && sudo mkswap /swap && sudo swapon /swap"'
Verified: free -h shows Swap: 2.0Gi total / 0B used. Currently dormant.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| dev | ||
| mac-mini | ||
| personas | ||
| test-data | ||
| test-reporting | ||
| audit-bundle.mjs | ||
| audit-complexity.mjs | ||
| audit-crypto-registry.mjs | ||
| audit-encrypted-tools.ts | ||
| audit-i18n-coverage.mjs | ||
| audit-icon-usage.mjs | ||
| audit-module-coupling.mjs | ||
| audit-modules.mjs | ||
| audit-port-drift.mjs | ||
| audit-test-coverage.mjs | ||
| audit-workspace-deps.mjs | ||
| backup-monitoring.sh | ||
| build-complexity-map.mjs | ||
| check-status.sh | ||
| create-gift-codes.mjs | ||
| deploy-metrics.sh | ||
| ecosystem-audit.mjs | ||
| fix-mixed-imports.mjs | ||
| generate-dockerfiles.mjs | ||
| generate-env.mjs | ||
| generate-status-page.sh | ||
| i18n-hardcoded-baseline.json | ||
| i18n-missing-baseline.json | ||
| lighthouse-audit.sh | ||
| migrate-theme-tokens.mjs | ||
| migrate-transition-all.mjs | ||
| run-integration-tests.sh | ||
| run-tests-with-coverage.sh | ||
| setup-databases.sh | ||
| setup-secrets.mjs | ||
| test-chat-auth.sh | ||
| validate-cloudflared-config.mjs | ||
| validate-dockerfiles.mjs | ||
| validate-i18n-keys.mjs | ||
| validate-i18n-parity.mjs | ||
| validate-llm-strings.mjs | ||
| validate-monorepo.mjs | ||
| validate-no-hardcoded-strings.mjs | ||
| validate-no-recursive-turbo.mjs | ||
| validate-pg-schema-isolation.mjs | ||
| validate-theme-parity.mjs | ||
| validate-theme-utilities.mjs | ||
| validate-theme-variables.mjs | ||