tech:notes_swap_memoire
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| tech:notes_swap_memoire [2026/07/30 00:06] – Jean-Baptiste | tech:notes_swap_memoire [2026/11/03 11:54] (Version actuelle) – Jean-Baptiste | ||
|---|---|---|---|
| Ligne 7: | Ligne 7: | ||
| * https:// | * https:// | ||
| * https:// | * https:// | ||
| + | * https:// | ||
| + | * https:// | ||
| + | * https:// | ||
| + | * https:// | ||
| + | * https:// | ||
| + | |||
| + | ZRAM ZSWAP: | ||
| + | * https:// | ||
| + | |||
| + | K8S : | ||
| * https:// | * https:// | ||
| + | * https:// | ||
| + | * https:// | ||
| + | * https:// | ||
| + | * https:// | ||
| + | * https:// | ||
| + | * https:// | ||
| + | Mesure / Perf : | ||
| + | * https:// | ||
| Voir aussi : | Voir aussi : | ||
| Ligne 21: | Ligne 39: | ||
| Voir : | Voir : | ||
| * [RedHat - What does swappiness do and how does it affect swap_tendency? | * [RedHat - What does swappiness do and how does it affect swap_tendency? | ||
| + | |||
| + | |||
| + | Swap is a memory management technique where idle memory pages are moved to temporary storage | ||
| Swappiness \ | Swappiness \ | ||
| + | 0 -> 100 \ | ||
| Prefer RAM -> Swap aggressively | Prefer RAM -> Swap aggressively | ||
| Cache Pressure \ | Cache Pressure \ | ||
| + | 0 -> 100 \ | ||
| Keep caches -> Drop caches aggressively | Keep caches -> Drop caches aggressively | ||
| Ligne 125: | Ligne 148: | ||
| * Why linux has enough memory but swap is used | * Why linux has enough memory but swap is used | ||
| * Why is Linux not using RAM but only Swap ? | * Why is Linux not using RAM but only Swap ? | ||
| - | * System | + | * https:// |
| * https:// | * https:// | ||
| * High swap usage in spite of low RAM usage | * High swap usage in spite of low RAM usage | ||
| Voir : | Voir : | ||
| + | * [Change in swap behavior between RHEL 7 and RHEL 8 kernels ](https:// | ||
| * https:// | * https:// | ||
| * https:// | * https:// | ||
| * https:// | * https:// | ||
| + | |||
| Voir aussi : | Voir aussi : | ||
| Ligne 159: | Ligne 184: | ||
| ~~~ | ~~~ | ||
| + | |||
| + | ### RedHat8 - Premature swapping while there is still plenty of pagecache to be reclaimed | ||
| + | |||
| + | Voir : https:// | ||
| + | |||
| + | |||
| + | Changement de la gestion du SWAP pour RHEL8 | ||
| + | |||
| + | |||
| + | Ajouter dans / | ||
| + | ~~~ | ||
| + | vm.force_cgroup_v2_swappiness = 1 | ||
| + | vm.swappiness = 1 | ||
| + | ~~~ | ||
| + | |||
| + | Puis : | ||
| + | ~~~bash | ||
| + | sysctl -p | ||
| + | ~~~ | ||
| + | |||
| + | Vérif : | ||
| + | ~~~bash | ||
| + | cat / | ||
| + | cat / | ||
| + | ~~~ | ||
| + | |||
| + | Ce changement n’est pas impactant, et le retour arrière est aisé. | ||
| + | |||
| + | Retour arrière : | ||
| + | Commenter les lignes vm.force_cgroup_v2_swappiness et vm.swappiness puis reboot de la VM. | ||
tech/notes_swap_memoire.1785362807.txt.gz · Dernière modification : de Jean-Baptiste
