Go to main content

Creating and Using Oracle® Solaris Kernel Zones

Exit Print View

Updated: August 2021

Tuning the Host ZFS ARC to Reserve Memory for Kernel Zones

To ensure efficient performance of kernel zones, you must set the user_reserve_hint_pct tunable parameter on the kernel zone host. The parameter provides a hint to the system about application memory usage and is used to limit growth of the ZFS Adaptive Replacement Cache (ARC) so that more memory remains available for applications. From the perspective of its kernel zone host, a kernel zone is an application. By limiting the growth of the ARC, more memory remains available for applications, including the kernel zones and the applications running within them.

Caution  - Failure to set this parameter to limit the host system's ZFS ARC can lead to low memory failures.

To limit the ZFS ARC on the system, set the user_reserve_hint_pct parameter on the kernel zone host. The recommendation is to set the parameter value to 80 using a script called set_user_reserve.sh. This script adjusts the parameter dynamically.

You could set a value higher or lower than 80, depending on maximum memory requirements of all kernel zones and other processes that are anticipated to run on the kernel zone host.

To obtain the set_user_reserve.sh script and see more information about determining requirements and configuring the user_reserve_hint_pct tunable parameter, log in to the My Oracle Support website and access the document Memory Management Between ZFS and Applications in Oracle Solaris 11.x (Doc ID 1663862.1). The set_user_reserve.sh script is attached to that document.

For example, run the script on the kernel zone host named global:

global# ./set_user_reserve.sh -fp 80
Adjusting user_reserve_hint_pct from 0 to 80
Monday, March 30, 2015 04:59:47 PM PST :
waiting for current value : 60 to grow to target : 65…
Adjustment of user_reserve_hint_pct to 80 successful.
Make the setting persistent across reboot by adding to /etc/system

# Tuning based on MOS note 1663861.1, script version 1.0
# added Monday, March 30, 2015 05:09:53 PM PST by system administrator : user
set user_reserve_hint_pct=80

Note - When you run the script, the user_reserve_hint_pct parameter is tuned on the running system. To make the parameter persist across reboots, set the parameter in /etc/system.