mirror of
https://github.com/bashclub/proxmox-zfs-postinstall.git
synced 2024-12-26 02:00:12 +01:00
Fixed detection of current arc sizes
This commit is contained in:
parent
2b3e039be5
commit
363990b373
12
install.sh
12
install.sh
@ -22,8 +22,8 @@ ARC_MAX_DEFAULT_BYTES=$(($MEM_TOTAL_BYTES / 2))
|
|||||||
ARC_MIN_DEFAULT_BYTES=$(($MEM_TOTAL_BYTES / 32))
|
ARC_MIN_DEFAULT_BYTES=$(($MEM_TOTAL_BYTES / 32))
|
||||||
|
|
||||||
# get current settings
|
# get current settings
|
||||||
ARC_MIN_SET_BYTES=$(cat /sys/module/zfs/parameters/zfs_arc_min)
|
ARC_MIN_CUR_BYTES=$(cat /sys/module/zfs/parameters/zfs_arc_min)
|
||||||
ARC_MAX_SET_BYTES=$(cat /sys/module/zfs/parameters/zfs_arc_max)
|
ARC_MAX_CUR_BYTES=$(cat /sys/module/zfs/parameters/zfs_arc_max)
|
||||||
|
|
||||||
# calculate suggested l1arc sice
|
# calculate suggested l1arc sice
|
||||||
ZFS_ARC_MIN_BYTES=$(($ZPOOL_SIZE_SUM_BYTES / 4096))
|
ZFS_ARC_MIN_BYTES=$(($ZPOOL_SIZE_SUM_BYTES / 4096))
|
||||||
@ -41,13 +41,13 @@ else
|
|||||||
fi
|
fi
|
||||||
echo -e "\tDefault zfs_arc_max:\t$(($ARC_MAX_DEFAULT_BYTES / 1024 / 1024))\tMB"
|
echo -e "\tDefault zfs_arc_max:\t$(($ARC_MAX_DEFAULT_BYTES / 1024 / 1024))\tMB"
|
||||||
echo -e "Current l1arc configuration:"
|
echo -e "Current l1arc configuration:"
|
||||||
if [[ $ARC_MIN_SET_BYTES > 0 ]]; then
|
if [ $ARC_MIN_CUR_BYTES -gt 0 ]; then
|
||||||
echo -e "\tCurrent zfs_arc_min:\t$(($ARC_MIN_SET_BYTES / 1024 / 1024))\tMB"
|
echo -e "\tCurrent zfs_arc_min:\t$(($ARC_MIN_CUR_BYTES / 1024 / 1024))\tMB"
|
||||||
else
|
else
|
||||||
echo -e "\tCurrent zfs_arc_min:\t0"
|
echo -e "\tCurrent zfs_arc_min:\t0"
|
||||||
fi
|
fi
|
||||||
if [[ $ARC_MAX_SET_BYTES > 0 ]]; then
|
if [ $ARC_MAX_CUR_BYTES -gt 0 ]; then
|
||||||
echo -e "\tCurrent zfs_arc_max:\t$(($ARC_MAX_SET_BYTES / 1024 / 1024))\tMB"
|
echo -e "\tCurrent zfs_arc_max:\t$(($ARC_MAX_CUR_BYTES / 1024 / 1024))\tMB"
|
||||||
else
|
else
|
||||||
echo -e "\tCurrent zfs_arc_max:\t0"
|
echo -e "\tCurrent zfs_arc_max:\t0"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user