Limitare l'uso della Ram da parte di ZFS: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
* Zfs utilizza per la cache in lettura | * Zfs utilizza per la cache in lettura tutta la Ram disponibile. | ||
* Se si vuole limitare, scommentare il | * Se si vuole limitare, scommentare il valori voluti, impostando il massimo ed il minimo: | ||
<pre> | <pre> | ||
cat <<EOFile | sudo tee /etc/modprobe.d/zfs.conf | cat <<EOFile | sudo tee /etc/modprobe.d/zfs.conf | ||
#1GB | #1GB | ||
options zfs | options zfs zfs_arc_min=1073741824 | ||
options zfs zfs_arc_max=2147483648 | |||
#options zfs zfs_arc_max=3221225472 | #options zfs zfs_arc_max=3221225472 | ||
#options zfs zfs_arc_max=4294967296 | #options zfs zfs_arc_max=4294967296 | ||
| Line 20: | Line 18: | ||
* Fare reboot, o impostare manualmente: | * Fare reboot, o impostare manualmente: | ||
echo "1073741824" | sudo tee /sys/module/zfs/parameters/zfs_arc_max | echo "1073741824" | sudo tee /sys/module/zfs/parameters/zfs_arc_min | ||
echo "2147483648" | sudo tee /sys/module/zfs/parameters/zfs_arc_max | |||
* Svuotarla: | |||
echo 3 > /proc/sys/vm/drop_caches | |||
* Verificare: | * Verificare: | ||
cat /sys/module/zfs/parameters/ | cat /sys/module/zfs/parameters/zfs_arc_m{in,ax} | ||
1073741824 | 1073741824 | ||
2147483648 | |||
=Riferimenti= | =Riferimenti= | ||
*[http://serverfault.com/questions/581669/why-isnt-the-arc-max-setting-honoured-on-zfs-on-linux zfsonlinux - Why isn't the arc_max setting honoured on ZFS on Linux? - Server Fault] | *[http://serverfault.com/questions/581669/why-isnt-the-arc-max-setting-honoured-on-zfs-on-linux zfsonlinux - Why isn't the arc_max setting honoured on ZFS on Linux? - Server Fault] | ||
*[https://bbs.archlinux.org/viewtopic.php?id=171559 Excessive memory use with ZFS [SOLVED sort of] / Networking, Server, and Protection / Arch Linux Forums] | *[https://bbs.archlinux.org/viewtopic.php?id=171559 Excessive memory use with ZFS [SOLVED sort of] / Networking, Server, and Protection / Arch Linux Forums] | ||
*[https://forum.proxmox.com/threads/disable-zfs-arc-or-limiting-it.77845/ (1) Disable ZFS ARC or limiting it | Proxmox Support Forum] | |||
Latest revision as of 15:14, 14 February 2023
- Zfs utilizza per la cache in lettura tutta la Ram disponibile.
- Se si vuole limitare, scommentare il valori voluti, impostando il massimo ed il minimo:
cat <<EOFile | sudo tee /etc/modprobe.d/zfs.conf #1GB options zfs zfs_arc_min=1073741824 options zfs zfs_arc_max=2147483648 #options zfs zfs_arc_max=3221225472 #options zfs zfs_arc_max=4294967296 EOFile
cat /etc/modprobe.d/zfs.conf
- Aggiornare l'initird:
sudo update-initramfs -u -k all
- Fare reboot, o impostare manualmente:
echo "1073741824" | sudo tee /sys/module/zfs/parameters/zfs_arc_min echo "2147483648" | sudo tee /sys/module/zfs/parameters/zfs_arc_max
- Svuotarla:
echo 3 > /proc/sys/vm/drop_caches
- Verificare:
cat /sys/module/zfs/parameters/zfs_arc_m{in,ax}
1073741824 2147483648
Riferimenti
- zfsonlinux - Why isn't the arc_max setting honoured on ZFS on Linux? - Server Fault
- Excessive memory use with ZFS [SOLVED sort of / Networking, Server, and Protection / Arch Linux Forums]
- (1) Disable ZFS ARC or limiting it | Proxmox Support Forum