I've had issues with a NAS4Free install that was used for ZFS storage and nothing else. It is acting as a backup target.
I previously set up 2 NAS4Free storage boxes in the past, both x64 but an older version. This one was x86 due to lower RAM consumption; the system is a HP ProLiant MicroServer Gen8 with 2GB RAM.
The server would reboot on its own, with no logs to say why it rebooted. I was able to replicate the issue on the MicroServer by performing some disk I/O (rsync transfers), however was not able to catch the error right away. Fortunately, eventually, I was able to record a reboot in iLO and was able to catch the error on screen just prior to the reboot. The error returned was:
Code: Select all
panic: kmem_malloc(16384): kmem_map too small: 906522624 total allocatedhttp://www.1stbyte.com/2011/01/27/tunin ... nel-panic/
https://wiki.freebsd.org/ZFSTuningGuide
From the ZFSTuningGuide:
After much testing, I have found what I believe to be a configuration issue out of the box for x86 installs. The misconfiguration is still present in the latest release to date (9.3.0.2 rev 1310).The value for vfs.zfs.arc_max needs to be smaller than the value for vm.kmem_size (not only ZFS is using the kmem).
Test configuration (VM):
- RAM 2GB
- HDD 2GB
- Install option 1 "Install 'Embedded' OS/MBR on HDD/SSD/CF/USB (preferred)"
- SWAP size (MB) 768
Code: Select all
nas4free: ~ # sysctl vm.kmem_size vfs.zfs.arc_min vfs.zfs.arc_max
vm.kmem_size: 1035227136
vfs.zfs.arc_min: 1054310400
vfs.zfs.arc_max: 2108620800Code: Select all
nas4free: ~ # sysctl vm.kmem_size vfs.zfs.arc_min vfs.zfs.arc_max
vm.kmem_size: 1019510784
vfs.zfs.arc_min: 89478485
vfs.zfs.arc_max: 268435456For x64, the out-of-the-box settings vfs.zfs.arc_max is 256MB and vm.kmem_size is 1GB, so no problem.
In my case, I resolved it by setting vm.kmem_size to 1024M and the ZFS ARC min/max values to 256M, via NAS4Free's System|Advanced|loader.conf section. After a reboot, it now shows:
Code: Select all
nas4free: ~ # sysctl vm.kmem_size vfs.zfs.arc_min vfs.zfs.arc_max
vm.kmem_size: 1073741824
vfs.zfs.arc_min: 268435456
vfs.zfs.arc_max: 268435456My testing shows it has been a problem (based on the sysctl values of the above settings) as far back as version 9.1.0.1 rev 847, which is the earliest version I've tested.


