FreeNAS Tweaks

System Tweaks

FreeNAS is an excellent NAS solution. It’s extremely simple to setup and with those old PC’s we’ve all got in the loft, it runs like a charm without spending shed loads of wonga on expensive hardware. Here is a ZFS tweak I found the other day which has greatly improved my systems performance.

ZFS
Firstly, make sure you are running the latest nightly build of FreeNAS, that has the latest vesrion of ZFS – version 13.

Secondly, ZFS is a very memory intensive file system, largely due to the caching. The more caching done, the faster the speeds.

To change the cache size, login to the FreeNAS web GUI, Advanced->File Editor and load /cf/boot/loader.conf (if you are using the embedded FreeNAS version). Otherwise, load /boot/loader.conf

Copy and paste the following code and save the file.

kern.hz="1000"
vm.kmem_size="1524M"
vfs.zfs.arc_min="256M"
vfs.zfs.arc_max="768M"
vfs.zfs.txg.timeout="10"
vfs.zfs.vdev.max_pending="10"
vfs.zfs.vdev.min_pending="4"

 

This tweak is best for systems with 2GB of RAM. The vm.kmem_size defines the total amount of RAM the kernel can allocate for ZFS. It should be set to about 50%-70% of your total RAM size. The vfs.zfs.arc_max size should be about half of vm.kmem_size.

This entry was posted in FreeNAS and tagged , , , . Bookmark the permalink.

Leave a comment