Outils pour utilisateurs

Outils du site


admin:gestion_du_swap

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Prochaine révision
Révision précédente
admin:gestion_du_swap [2020/09/05 09:55] – créée cpmadmin:gestion_du_swap [2020/10/31 17:24] (Version actuelle) cpm
Ligne 52: Ligne 52:
  
 </code> </code>
 +
 +Appliqué au SI Chapril, ça donne :
 +<code>
 +=(^-^)=root@lamp:~# cat /etc/systemd/system/systemd-sysctl.service.d/chapril-swappiness-post.conf 
 +[Service]
 +ExecStartPost=/usr/bin/find /sys/fs/cgroup -mindepth 2 -maxdepth 2 -name memory.swappiness -exec /bin/sh -c 'sysctl -n vm.swappiness > "{}"' \;
 +ExecStartPost=/usr/bin/find /sys/fs/cgroup -mindepth 3 -maxdepth 3 -name memory.swappiness -exec /bin/sh -c 'sysctl -n vm.swappiness > "{}"' \;
 +ExecStartPost=/usr/bin/find /sys/fs/cgroup -mindepth 4 -maxdepth 4 -name memory.swappiness -exec /bin/sh -c 'sysctl -n vm.swappiness > "{}"' \;
 +ExecStartPost=/usr/bin/find /sys/fs/cgroup -mindepth 5 -maxdepth 5 -name memory.swappiness -exec /bin/sh -c 'sysctl -n vm.swappiness > "{}"' \;
 +ExecStartPost=/usr/bin/find /sys/fs/cgroup -name memory.swappiness -exec /bin/sh -c 'sysctl -n vm.swappiness > "{}"' \;
 +</code>
 +
 +<note tip>À noter que c'est géré automatiquement via un paquet April \o/</note>
admin/gestion_du_swap.1599299726.txt.gz · Dernière modification : 2020/09/05 09:55 de cpm