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

Dernière révisionLes deux révisions suivantes
admin:gestion_du_swap [2020/09/05 09:55] – créée cpmadmin:gestion_du_swap [2020/10/31 16:36] cpm
Ligne 51: Ligne 51:
 testé sur plusieurs VMs chez nous avec succès  testé sur plusieurs VMs chez nous avec succès 
  
 +</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> </code>
admin/gestion_du_swap.txt · Dernière modification : 2020/10/31 17:24 de cpm