docs(post-install): document the ZRAM swap profile and fix its translations

- Optional Settings: new step for the ZRAM swap profile, with what it does, how it is used and how to verify it
- Uninstall Optimizations: add the ZRAM swap profile to the kernel and memory group
- Customizable: list the ZRAM swap profile in the Optional category
- lang: rewrite the Spanish ZRAM messages and add the missing space after semicolons and the initial capital in the other locales
This commit is contained in:
MacRimi
2026-10-16 17:50:13 +02:00
parent 4c8b5b1188
commit ea3b579089
14 changed files with 200 additions and 132 deletions
@@ -67,6 +67,7 @@ export default async function OptionalSettingsPage({
fastfetch: { doesItems: string[]; customItems: string[]; logos: Logo[] }
figurine: { doesItems: string[] }
log2ram: { doesItems: string[] }
zram: { doesItems: string[] }
} } }
}
const cephItems = messages.docs.postInstall.optional.ceph.doesItems
@@ -78,6 +79,7 @@ export default async function OptionalSettingsPage({
const fastfetchLogos = messages.docs.postInstall.optional.fastfetch.logos
const figurineItems = messages.docs.postInstall.optional.figurine.doesItems
const log2ramItems = messages.docs.postInstall.optional.log2ram.doesItems
const zramItems = messages.docs.postInstall.optional.zram.doesItems
const code = (chunks: React.ReactNode) => <code>{chunks}</code>
const strong = (chunks: React.ReactNode) => <strong>{chunks}</strong>
@@ -371,6 +373,30 @@ chmod +x "/etc/profile.d/figurine.sh"
</p>
<CopyableCode code={t.raw("log2ram.verifyCode") as string} />
<StepHeading number={8} label={t("stepLabel")} title={t("zram.title")} />
<p className="mb-4">
{t.rich("zram.intro", { code })}
</p>
<p className="mb-4">
<strong>{t("zram.doesLabel")}</strong>
</p>
<ul className="list-disc pl-5 mb-4">
{zramItems.map((_, idx) => (
<li key={idx}>{t.rich(`zram.doesItems.${idx}`, { code })}</li>
))}
</ul>
<p className="mb-2">
<strong>{t("zram.howUseLabel")}</strong> {t("zram.howUseBody")}
</p>
<p className="text-lg mt-6 mb-2">
<strong>{t("zram.verifyLabel")}</strong>
</p>
<CopyableCode code={t.raw("zram.verifyCode") as string} />
<section className="mt-12 p-4 bg-blue-100 rounded-md">
<h2 className="text-xl font-semibold mb-2">{t("autoApplication.title")}</h2>
<p>{t("autoApplication.body")}</p>
@@ -61,7 +61,7 @@
},
{
"name": "Optional",
"description": "Niche pieces not every host needs: AMD CPU fixes, Fastfetch banner, Figurine 3D hostname, PVE Appliance Manager index refresh, Ceph repository, High Availability services and Log2RAM to reduce SSD wear."
"description": "Niche pieces not every host needs: AMD CPU fixes, Fastfetch banner, Figurine 3D hostname, PVE Appliance Manager index refresh, Ceph repository, High Availability services, Log2RAM to reduce SSD wear and a ZRAM swap profile."
}
],
"mixTip": {
@@ -153,6 +153,23 @@
"verifyLabel": "Verify and manage from the shell:",
"verifyCode": "# Service state and configured timers\nsystemctl status log2ram\nsystemctl list-timers log2ram*\n\n# Current ramdisk usage — /var/log IS the tmpfs itself\ndf -h /var/log\n\n# Force a sync now (tmpfs → disk); does NOT shrink the tmpfs\nlog2ram write\n\n# Trigger the auto-sync guard on demand (vacuum + sync when usage is high)\n/usr/local/bin/log2ram-check.sh\n\n# Current config: SIZE, mail settings, path\ncat /etc/log2ram.conf\n\n# ProxMenux-specific cron jobs\ncat /etc/cron.d/log2ram /etc/cron.d/log2ram-auto-sync\n\n# Recent Log2RAM activity\njournalctl -u log2ram -n 50 --no-pager"
},
"zram": {
"title": "Enable ZRAM swap profile",
"intro": "Creates a compressed swap device in RAM, <code>/dev/zram0</code>, with <code>systemd-zram-generator</code>. Pages that the kernel moves to swap are compressed with zstd and kept in memory, so they are written to RAM before they reach the swap on disk.",
"doesLabel": "What it does:",
"doesItems": [
"Installs <code>systemd-zram-generator</code> if it is missing, and records whether ProxMenux installed it.",
"Writes <code>/etc/systemd/zram-generator.conf.d/90-proxmenux.conf</code>: a <code>zram0</code> device sized to one tenth of the host RAM, zstd compression (<code>zstd(level=9)</code> with systemd-zram-generator 1.2.0 or later) and swap priority 32767.",
"With that priority the kernel fills ZRAM first. An existing swap on disk keeps its own priority and takes the pages that no longer fit in ZRAM.",
"Before changing anything, looks for another ZRAM setup: an active zram swap, a zram line in <code>/etc/fstab</code>, a systemd unit or another generator file. If it finds one, the option stops and leaves that setup as it is.",
"Starts <code>dev-zram0.swap</code> and checks that the active device matches the profile. If it does not, the previous state is restored.",
"Registers itself in <code>installed_tools.json</code> so it can be reverted from Uninstall Optimizations."
],
"howUseLabel": "How to use:",
"howUseBody": "The option is part of the Customizable flow only; the Automated flow does not apply it. The device is created again at every boot. While it is active, the Memory card of the ProxMenux Monitor shows its capacity, the swap used, the algorithm, the compression ratio and the physical memory it takes.",
"verifyLabel": "Verify from the shell:",
"verifyCode": "# Active swap devices and their priority\nswapon --show\n\n# ZRAM device: algorithm, size and compressed data\nzramctl\n\n# Profile written by ProxMenux\ncat /etc/systemd/zram-generator.conf.d/90-proxmenux.conf\n\n# State of the swap unit\nsystemctl status dev-zram0.swap"
},
"autoApplication": {
"title": "Automatic Application",
"body": "These optional features are applied only when specifically selected during the post-install process. Each feature can be individually chosen based on your specific needs and preferences."
@@ -84,6 +84,10 @@
{
"tool": "System Limits Increase",
"restores": "Removes /etc/sysctl.d/99-maxwatches.conf, 99-maxkeys.conf, 99-swap.conf, 99-fs.conf and /etc/security/limits.d/99-limits.conf. Reverts PAM limits and systemd DefaultLimitNOFILE, and strips the ulimit -n 256000 line from /root/.profile."
},
{
"tool": "ZRAM swap profile",
"restores": "Turns off the swap on /dev/zram0, stops dev-zram0.swap and removes /etc/systemd/zram-generator.conf.d/90-proxmenux.conf. The systemd-zram-generator package is purged only when ProxMenux installed it and no other ZRAM setup is present. If the pages in ZRAM cannot be moved out, the profile stays active and nothing is removed."
}
]
},
@@ -61,7 +61,7 @@
},
{
"name": "Optional",
"description": "Opciones que no necesita todo host: ajustes de CPU AMD, banner Fastfetch, nombre 3D con Figurine, actualización del índice de PVE Appliance Manager, repositorio Ceph, servicios de alta disponibilidad y Log2RAM para reducir el desgaste del SSD."
"description": "Opciones que no necesita todo host: ajustes de CPU AMD, banner Fastfetch, nombre 3D con Figurine, actualización del índice de PVE Appliance Manager, repositorio Ceph, servicios de alta disponibilidad, Log2RAM para reducir el desgaste del SSD y un perfil de swap con ZRAM."
}
],
"mixTip": {
@@ -153,6 +153,23 @@
"verifyLabel": "Verificar y gestionar desde la shell:",
"verifyCode": "# Estado del servicio y timers configurados\nsystemctl status log2ram\nsystemctl list-timers log2ram*\n\n# Uso actual de la ramdisk — /var/log ES la tmpfs\ndf -h /var/log\n\n# Forzar sincronización ahora (tmpfs → disco); NO reduce la tmpfs\nlog2ram write\n\n# Disparar el guardián de auto-sync manualmente (compacta + sincroniza si el uso es alto)\n/usr/local/bin/log2ram-check.sh\n\n# Configuración actual: SIZE, mail, path\ncat /etc/log2ram.conf\n\n# Crons específicos de ProxMenux\ncat /etc/cron.d/log2ram /etc/cron.d/log2ram-auto-sync\n\n# Actividad reciente de Log2RAM\njournalctl -u log2ram -n 50 --no-pager"
},
"zram": {
"title": "Activar el perfil de swap con ZRAM",
"intro": "Crea un dispositivo de swap comprimido en la RAM, <code>/dev/zram0</code>, con <code>systemd-zram-generator</code>. Las páginas que el kernel lleva al swap se comprimen con zstd y se quedan en memoria, así que se escriben en la RAM antes de llegar al swap en disco.",
"doesLabel": "Qué hace:",
"doesItems": [
"Instala <code>systemd-zram-generator</code> si no está y anota si lo ha instalado ProxMenux.",
"Escribe <code>/etc/systemd/zram-generator.conf.d/90-proxmenux.conf</code>: un dispositivo <code>zram0</code> de una décima parte de la RAM del host, compresión zstd (<code>zstd(level=9)</code> con systemd-zram-generator 1.2.0 o posterior) y prioridad de swap 32767.",
"Con esa prioridad el kernel llena primero ZRAM. Un swap en disco que ya exista conserva su prioridad y recibe las páginas que ya no caben en ZRAM.",
"Antes de cambiar nada, busca otra configuración de ZRAM: un swap zram activo, una línea zram en <code>/etc/fstab</code>, una unidad de systemd u otro fichero del generador. Si encuentra una, la opción se detiene y la deja como está.",
"Arranca <code>dev-zram0.swap</code> y comprueba que el dispositivo activo coincide con el perfil. Si no coincide, se restaura el estado anterior.",
"Se registra en <code>installed_tools.json</code> para poder revertirlo desde Uninstall Optimizations."
],
"howUseLabel": "Cómo se usa:",
"howUseBody": "La opción solo forma parte del flujo Personalizable; el flujo Automatizado no la aplica. El dispositivo se crea de nuevo en cada arranque. Mientras está activo, la tarjeta de Memoria del ProxMenux Monitor muestra su capacidad, el swap usado, el algoritmo, la relación de compresión y la memoria física que ocupa.",
"verifyLabel": "Verificar desde la shell:",
"verifyCode": "# Dispositivos de swap activos y su prioridad\nswapon --show\n\n# Dispositivo ZRAM: algoritmo, tamaño y datos comprimidos\nzramctl\n\n# Perfil escrito por ProxMenux\ncat /etc/systemd/zram-generator.conf.d/90-proxmenux.conf\n\n# Estado de la unidad de swap\nsystemctl status dev-zram0.swap"
},
"autoApplication": {
"title": "Aplicación automática",
"body": "Estas funcionalidades opcionales solo se aplican cuando se seleccionan específicamente durante el proceso post-instalación. Cada funcionalidad puede elegirse individualmente según tus necesidades y preferencias específicas."
@@ -84,6 +84,10 @@
{
"tool": "System Limits Increase",
"restores": "Elimina /etc/sysctl.d/99-maxwatches.conf, 99-maxkeys.conf, 99-swap.conf, 99-fs.conf y /etc/security/limits.d/99-limits.conf. Revierte los límites PAM y DefaultLimitNOFILE de systemd, y elimina la línea ulimit -n 256000 de /root/.profile."
},
{
"tool": "Perfil de swap con ZRAM",
"restores": "Desactiva el swap de /dev/zram0, detiene dev-zram0.swap y elimina /etc/systemd/zram-generator.conf.d/90-proxmenux.conf. El paquete systemd-zram-generator solo se purga si lo instaló ProxMenux y no hay otra configuración de ZRAM. Si las páginas de ZRAM no se pueden sacar, el perfil sigue activo y no se elimina nada."
}
]
},