Solved [Solved] vfs.zfs.arc_max not taking effect

My ARC max doesn't seems to be taking effect. I have the following in my /boot/loader.conf:

Code:
## Filesystem Support
zfs_load="YES"
libiconv_load="YES"
libmchain_load="YES"
cd9660_iconv_load="YES"
msdosfs_iconv_load="YES"
ntfs_load="YES"                                                                                                                                                                                                                        "beastie2.conspec-group" 19:04 28-May-14
ntfs_iconv_load="YES"
udf_load="YES"
udf_iconv_load="YES"
fuse_load="YES"

## VirtualBox Support
vboxdrv_load="YES"

## Increase semaphore limits
kern.ipc.shmall=32768
kern.ipc.shmmni=1024
kern.ipc.shmseg=1024

## old settings from beastie2 (under Euan's desk)
#kern.ipc.semmni=20
#kern.ipc.semmns=120
#kern.ipc.semmnu=60

# Limit ARC to 2GB of RAM
vfs.zfs.arc_max="2G"

So, I set my arc_max to 2GB, but both top and zfs-stats show that my ARC is much higher, pretty much same as physical memory size. Output of zfs-stats:
Code:
------------------------------------------------------------------------
ZFS Subsystem Report                            Wed Jul  9 10:06:06 2014
------------------------------------------------------------------------

ARC Summary: (HEALTHY)
        Memory Throttle Count:                  0

ARC Misc:
        Deleted:                                20
        Recycle Misses:                         0
        Mutex Misses:                           0
        Evict Skips:                            184

ARC Size:                               31.80%  4.63    GiB
        Target Size: (Adaptive)         100.00% 14.55   GiB
        Min Size (Hard Limit):          12.50%  1.82    GiB
        Max Size (High Water):          8:1     14.55   GiB

ARC Size Breakdown:
        Recently Used Cache Size:       50.00%  7.28    GiB
        Frequently Used Cache Size:     50.00%  7.28    GiB

ARC Hash Breakdown:
        Elements Max:                           43.00k
        Elements Current:               100.00% 43.00k
        Collisions:                             9.03k
        Chain Max:                              4
        Chains:                                 3.13k

------------------------------------------------------------------------

My other servers obey the arc_max, but they have larger settings, the next lowest I have is 4G, which works.

The end result is the server runs out of memory, locks up and needs restarting. I will be doing a reboot later today (lunch break) and try to make it 3GB, see if it obeys that setting.
 
Re: vfs.zfs.arc_max not taking effect

I changed arc_max to 3G and arc_min to 1G, still no joy.

Then I noticed the /boot/loader.conf has some spurious text in the middle. On my client machine terminal it is so far right (white space padding) that I never noticed it before. It seems I may have introduced some unwanted text, probably a copy/paste operation. So perhaps every line below that does not get accepted by sysctl. I didn't even notice it when I posted it to this forum (my previous post).

I will reboot and report back ASAP, I can't reboot the server just now, it would be too disruptive.
 
Re: vfs.zfs.arc_max not taking effect

The same problem was reported to the freebsd-current mailing list last week. They say the workaround is to specify the size in bytes.
 
[Solved]: vfs.zfs.arc_max not taking effect

It's OK, I restarted the server again last night, without the unwanted text in the /boot/loader.conf file. It now picks up the "2G" properly, and the ARC max now takes effect accordingly. Hopefully the server will stay stable now, however I already had one of the VMs (Virtualbox guests, running as VNC sessions) crash again. It was super stable on 8.3 with older version of Virtualbox.

So I guess this thread is now SOLVED.
 
Back
Top