uncategorized

Limiting ZFS ARC Cache in OpenSolaris

Set zfs_arc_max

Via http://www.solarisinternals.com/wiki/index.php/ZFS_Evil_Tuning_Guide#Limiting_the_ARC_Cache

1
2
3
4
5
6
7
8
9
10
For example, if an application needs 5 GBytes of memory on a system with
36-GBytes of memory, you could set the arc maximum to 30 GBytes, (0x780000000
or 32212254720 bytes). Set the zfs:zfs_arc_max parameter in the /etc/system
file:

set zfs:zfs_arc_max = 0x780000000

or

set zfs:zfs_arc_max = 32212254720

So basically, M(10243). Where M is the memory size in GB. I have 12 GB of memory, and I want ARC to only use up to half of it.

1
2
su
echo "set zfs:zfs_arc_max = 6442450944" >>/etc/system

Then reboot. When you reboot, your system may go into maintenance mode, a message says something about the boot-archiveā€ being down because we changed /etc/system. Login with a user that has staff/root privileges and check the file, then clear the maintenance mode on the boot-archive service.

1
2
3
less /etc/system
# q to quit
svcadm clear system/boot-archive
Share