Script to get the Solaris ZFS ARC Size

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

This script will list the ZFS adaptive replacement cache (ARC)statistics and usages

To get the script click here

Another great ZFS ARC summery script is available here

Output will look something like this.

[root@server] /tmp # ./arc_summary.pl
System Memory:
Physical RAM:  64128 MB
Free Memory :  58808 MB
LotsFree:      999 MB

ZFS Tunables (/etc/system):

ARC Size:
Current Size:             1854 MB (arcsize)
Target Size (Adaptive):   63104 MB (c)
Min Size (Hard Limit):    7888 MB (zfs_arc_min)
Max Size (Hard Limit):    63104 MB (zfs_arc_max)

ARC Size Breakdown:
Most Recently Used Cache Size:          50%    31679 MB (p)
Most Frequently Used Cache Size:        49%    31424 MB (c-p)

ARC Efficency:
Cache Access Total:             4158593
Cache Hit Ratio:      99%       4129443        [Defined State for buffer]
Cache Miss Ratio:      0%       29150          [Undefined State for Buffer]
REAL Hit Ratio:       96%       4027900        [MRU/MFU Hits Only]

Data Demand   Efficiency:    99%
Data Prefetch Efficiency:    73%

CACHE HITS BY CACHE LIST:
Anon:                        2%        99429                  [ New Customer, First Cache Hit ]
Most Recently Used:          8%        370014 (mru)           [ Return Customer ]
Most Frequently Used:       88%        3657886 (mfu)          [ Frequent Customer ]
Most Recently Used Ghost:    0%        1810 (mru_ghost)       [ Return Customer Evicted, Now Back ]
Most Frequently Used Ghost:  0%        304 (mfu_ghost)        [ Frequent Customer Evicted, Now Back ]
CACHE HITS BY DATA TYPE:
Demand Data:                85%        3524673
Prefetch Data:               0%        15914
Demand Metadata:            11%        494183
Prefetch Metadata:           2%        94673
CACHE MISSES BY DATA TYPE:
Demand Data:                24%        7043
Prefetch Data:              20%        5859
Demand Metadata:            39%        11613
Prefetch Metadata:          15%        4635
---------------------------------------------

To change the arc size, add the following line to /etc/system, where the numeric value is the desired arc size in bytes. in this example it’s 1GB.


*	limit ZFS cache to 1GB
set zfs:zfs_arc_max = 1073741824

Leave a Reply

avatar
3000
  Subscribe  
Notify of