Monday, October 28, 2013

How to change the ZFS ARC value

How to change the ZFS ARC value:


UnixBabuForum.in

Static change via /etc/system:

 if an application needs 5 GB of available memory on a system with 36-GB of memory, you could set the arc maximum to 30 GB, (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
Note: You have to reboot the system for this option to take effect.


Dynamic change via mdb:

You can only change the ARC maximum size dynamically by using the mdb command.
For example, to the set the ARC parameters to small values, such as arc_c_max to 512MB, and complying with the formula above (arc.c_max to 512MB, and arc.p to 256MB), on Current Solaris Releases, use the following syntax:
# mdb -kw
 > arc_stats::print -a arcstat_p.value.ui64 arcstat_c.value.ui64 arcstat_c_max.value.ui64
ffffffffc00df578 arcstat_p.value.ui64 = 0xb75e46ff
ffffffffc00df5a8 arcstat_c.value.ui64 = 0x11f51f570
ffffffffc00df608 arcstat_c_max.value.ui64 = 0x3bb708000

 > ffffffffc00df578/Z 0x10000000
arc_stats+0x500:0xb75e46ff        = 0x10000000
 > ffffffffc00df5a8/Z 0x20000000
arc_stats+0x530:0x11f51f570        = 0x20000000
 > ffffffffc00df608/Z 0x20000000
arc_stats+0x590:  0x11f51f570        = 0x20000000
You should verify the values have been set correctly by examining them again in mdb (using the same print command in the example). You can also monitor the actual size of the ARC to ensure it has not exceeded. For example, to display the current ARC size in decimal:
# echo "arc_stats::print -d arcstat_size.value.ui64" | mdb -k

arcstat_size.value.ui64 = 0t239910912

1 comments:

bumbu pecel bali said...

this is good post.
and you can go here

http://bantalsilikon01.blogspot.com
http://kursusinternetmarketingmurah.blogspot.com
http://bumbupecelbali.blogspot.com


tanks very much.... :)

Post a Comment

 
Design by BABU | Dedicated to grandfather | welcome to BABU-UNIX-FORUM