• slider image 168
:::
條列式新聞
新聞載入中,請稍後...

9-0-3 記憶體參數設定 zfs arc

  1. http://fibrevillage.com/storage/169-zfs-arc-on-linux-how-to-set-and-monitor-on-linux
  2. http://fibrevillage.com/index.php/storage/171-zfs-on-linux-performance-tuning

限制 arc 記憶體使用

ZFS 建議 實體記憶體最少在 4G 以上,所以,不足4G的實體記憶體,那麼我們就必須限制 ZFS 裡 ARC 的使用量。
(瞭解 ARC ---> 說明)

官網說明

Limit ZFS memory usage
限制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 和插入:

options zfs zfs_arc_max=4299967296

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
---------------------------------------------------------------------------------------------------------

查詢  zfs 使用中的各項參數
cat /proc/spl/kstat/zfs/arcstats

:::
展開 | 闔起

文章類別

書籍目錄

展開 | 闔起

線上使用者

4人線上 (3人在瀏覽線上書籍)

會員: 0

訪客: 4

更多…