2010年3月22日 星期一

虛擬主機伺服器建置十三:FreeNAS 0.7.1 5065 系統核心參數微調

這裡是參考了下面的網頁資料來調整系統核心參數, 增加ZFS, NFS, CIFS等分享的速度!



http://harryd71.blogspot.com/2008/10/tuning-freenas-zfs.html

http://viml.nchc.org.tw/blog/paper_info.php?CLASS_ID=1&SUB_ID=1&PAPER_ID=85

操作方式為 "進階->檔案編輯器", 選擇載入 "/boot/load.conf" 的檔案!





按下載入之前出現下面畫面, 藍底白字的部份是需要加入的資料! 因為這裡的機器的RAM是4G, 所以把 vm_kmem_size="3072M", ZFS系統建議至少要512MB的 vm_kmem_size, 如果2G的話, 數量就減半為 "1536M"! 輸入資料完畢, 請按 "儲存" 把更改的資料寫入系統!



接下來選擇 "系統->進階", 把 "開啟系統核心的參數微調" 勾選!



接下來選取 "stsctl.conf" 標籤, 依照下列圖示修改及增加相關的系統參數! 儲存後重新開機即可! 把ㄧ些修改文字資料列出!

# ups spinup time for drive recognition

hw.ata.to=15

# System tuning - Original -> 2097152

kern.ipc.maxsockbuf=16777216

# System tuning

kern.ipc.nmbclusters=32768

# System tuning

kern.ipc.somaxconn=8192

# System tuning

kern.maxfiles=65536

# System tuning

kern.maxfilesperproc=32768

# System tuning

net.inet.tcp.delayed_ack=0

# System tuning

net.inet.tcp.inflight.enable=0

# System tuning

net.inet.tcp.path_mtu_discovery=0

# http://acs.lbl.gov/TCP-tuning/FreeBSD.html

net.inet.tcp.recvbuf_auto=1

# http://acs.lbl.gov/TCP-tuning/FreeBSD.html

net.inet.tcp.recvbuf_inc=16384

# http://acs.lbl.gov/TCP-tuning/FreeBSD.html

net.inet.tcp.recvbuf_max=16777216

# System tuning

net.inet.tcp.recvspace=65536

# http://acs.lbl.gov/TCP-tuning/FreeBSD.html

net.inet.tcp.rfc1323=1

# http://acs.lbl.gov/TCP-tuning/FreeBSD.html

net.inet.tcp.sendbuf_auto=1

# http://acs.lbl.gov/TCP-tuning/FreeBSD.html

net.inet.tcp.sendbuf_inc =8192

# System tuning

net.inet.tcp.sendspace=65536

# System tuning

net.inet.udp.maxdgram=57344

# System tuning

net.inet.udp.recvspace=65536

# System tuning

net.local.stream.recvspace=65536

# System tuning

net.local.stream.sendspace=65536

# http://acs.lbl.gov/TCP-tuning/FreeBSD.html

net.inet.tcp.sendbuf_max=16777216


沒有留言:

張貼留言