2021/10/30 在ZFS上切SWAP有BUG
https://github.com/openzfs/zfs/issues/7734
截至20211010仍無解
包含
1.實體記憶體仍足夠,但使用到swap即有可能造成系統異常
2.A硬碟為zfs;B硬碟給swap,仍會造成系統異常
為維持系統穩定,購買實體記憶體取代切SWAP
------------------------
SWAP on ZFS
Swap-space created on a zvol may generate some troubles, like blocking the server or generating a high IO load, often seen when starting a Backup to an external Storage.
We strongly recommend to use enough memory, so that you normally do not run into low memory situations. Should you need or want to add swap, it is preferred to create a partition on a physical disk and use it as a swap device. You can leave some space free for this purpose in the advanced options of the installer. Additionally, you can lower the “swappiness” value. A good value for servers is 10:
代碼: 選擇全部
# sysctl -w vm.swappiness=10代碼: 選擇全部
vm.swappiness = 10- vm.swappiness = 0
The kernel will swap only to avoid an out of memory condition
- vm.swappiness = 1
Minimum amount of swapping without disabling it entirely.
- vm.swappiness = 10
This value is sometimes recommended to improve performance when sufficient memory exists in a system.
- vm.swappiness = 60
The default value.
- vm.swappiness = 100
The kernel will swap aggressively.