Solaris ZFS ARC Cache (ZFS File Data)


ZFS has a cache  algorithm which named  ARC (Adaptive replacement cache). In general the ARC allocates as much memory as it is available.To  prevent  high memory usage,  you would like to limit the ZFS ARC to xx GB, which makes sense to me (so you always have some RAM free for applications), please follow this documentation.

In theory,It’s a good feature that  ZFS uses available memory to speed up slow disk I/O. But it also has some side effects, if the ARC consumed almost all free  memory  then  application process  ‘ll wait  until ZFS  frees  up memory.So that  means  you ‘ll face with  a  performance  problem.

That is why, we need to limit the total size with the zfs_arc_max kernel parameter.”

How to limit ZFS memory allocation?

For 10 GB = 1024 X 1024 X 1024 X 10

#vi /etc/system

set zfs:zfs_arc_max=10737418240

You should  limit  the  ZFS ARC  becasue  of  memory  usage. I recommend to  set  it  %12  rate  of  total  memory. For  UFS  it set  %12  by default.

  • How to find  ARC Cache and  check server  memory  usage
#kstat -p zfs:0:arcstats | head -4</p>

#kstat -n arcstats -s size



module: zfs                             instance: 0



name:   arcstats                        class:    misc



size                            26505807808   >> 26GB  ARC Cache

#echo  ::memstat|mdb -k



ZFS File Data             3657908             28577   22%
 
Tagged In:

I'm a IT Infrastructure and Operations Architect with extensive experience and administration skills and works for Turk Telekom. I provide hardware and software support for the IT Infrastructure and Operations tasks.

205 Total Posts
Follow Me