Proxmox VE 4.x 中文初階學習手冊
- http://fibrevillage.com/storage/169-zfs-arc-on-linux-how-to-set-and-monitor-on-linux
- http://fibrevillage.com/index.php/storage/171-zfs-on-linux-performance-tuning
限制 arc 記憶體使用
ZFS 建議 實體記憶體最少在 4G 以上,所以,不足4G的實體記憶體,那麼我們就必須限制 ZFS 裡 ARC 的使用量。
(瞭解 ARC ---> 說明)
限制ZFS內存使用情況
It is good to use max 50 percent (which is default) of the system memory for ZFS arc to prevent performance shortage of the host.
為ZFS arc防止主機的性能不足而使用系統實體記憶體的最大值的50%是較佳的(這是默認值)。
Use your preferred editor to change the config in /etc/modprobe.d/zfs.conf and insert:
使用您的首選編輯器來更改配置在 /etc/modprobe.d/zfs.conf 和插入:
This example setting limits the usage to 4GB.
在這個例子裡是限制 zfs arc 最多使用 4G 的實體記憶體
若實體記憶體較少,則必須限制 zfs arc 的使用量,像 實體記憶體為2G的主機來說,建議設定最大值為256MB
# 修改為限制最大值 256 MB options zfs zfs_arc_max=268435456
------------------------------------------------------------------------------------------------------------------------------------
Ubuntu 14.04 在安裝了 zfs 後,它的設定檔在 /etc/zfs/ 底下
pico /etc/zfs/zfsrc 找到 # Maximum arc size : this is the main cache for zfs in Mb # default size : 128 Mb, minimum size : 16 Mb # Notice that arc is also used for the hash tables if you use the dedup option max-arc-size = 100可以發現 ubuntu 14.04 設定的 zfs arc 的實體記憶體使用量是 100MB
---------------------------------------------------------------------------------------------------------