3 # This file and its contents are supplied under the terms of the
4 # Common Development and Distribution License ("CDDL"), version 1.0.
5 # You may only use this file in accordance with the terms of version
8 # A full copy of the text of the CDDL should have accompanied this
9 # source. A copy of the CDDL is also available via the Internet at
10 # http://www.illumos.org/license/CDDL.
14 # Copyright 2019, loli10K <ezomori.nozomu@gmail.com>. All rights reserved.
17 . $STF_SUITE/include/libtest.shlib
18 . $STF_SUITE/tests/perf/perf.shlib
22 # Set tunables to their recorded actual size and then to their original
23 # value: this works for previously unconfigured tunables.
24 log_must set_tunable64 ARC_MIN "$MINSIZE"
25 log_must set_tunable64 ARC_MIN "$ZFS_ARC_MIN"
26 log_must set_tunable64 ARC_MAX "$MAXSIZE"
27 log_must set_tunable64 ARC_MAX "$ZFS_ARC_MAX"
32 ZFS_ARC_MAX="$(get_tunable ARC_MAX)"
33 ZFS_ARC_MIN="$(get_tunable ARC_MIN)"
34 MINSIZE="$(get_min_arc_size)"
35 MAXSIZE="$(get_max_arc_size)"
37 log_assert "ARC tunables should be updated dynamically"
39 for size in $((MAXSIZE/4)) $((MAXSIZE/3)) $((MAXSIZE/2)) $MAXSIZE; do
40 log_must set_tunable64 ARC_MAX "$size"
41 log_must test "$(get_max_arc_size)" == "$size"
42 log_must set_tunable64 ARC_MIN "$size"
43 log_must test "$(get_min_arc_size)" == "$size"
46 log_pass "ARC tunables can be updated dynamically"