Skip to content

Commit

Permalink
Merge pull request extremeshok#49 from mjkl-gh/master
Browse files Browse the repository at this point in the history
fix new zfs_arc_max restrictions fixes extremeshok#48
  • Loading branch information
extremeshok authored Apr 25, 2021
2 parents ee2ea36 + 60b40f3 commit 9e89dbd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions install-post.sh
Original file line number Diff line number Diff line change
Expand Up @@ -747,19 +747,19 @@ if [ "$XS_ZFSARC" == "yes" ] ; then
## Optimise ZFS arc size accoring to memory size
if [ "$(command -v zfs)" != "" ] ; then
if [[ RAM_SIZE_GB -le 16 ]] ; then
MY_ZFS_ARC_MIN=536870912
MY_ZFS_ARC_MIN=536870911
MY_ZFS_ARC_MAX=536870912
elif [[ RAM_SIZE_GB -le 32 ]] ; then
# 1GB/1GB
MY_ZFS_ARC_MIN=1073741824
MY_ZFS_ARC_MIN=1073741823
MY_ZFS_ARC_MAX=1073741824
else
MY_ZFS_ARC_MIN=$((RAM_SIZE_GB * 1073741824 / 16))
MY_ZFS_ARC_MAX=$((RAM_SIZE_GB * 1073741824 / 8))
fi
# Enforce the minimum, incase of a faulty vmstat
if [[ MY_ZFS_ARC_MIN -lt 536870912 ]] ; then
MY_ZFS_ARC_MIN=536870912
if [[ MY_ZFS_ARC_MIN -lt 536870911 ]] ; then
MY_ZFS_ARC_MIN=536870911
fi
if [[ MY_ZFS_ARC_MAX -lt 536870912 ]] ; then
MY_ZFS_ARC_MAX=536870912
Expand Down

0 comments on commit 9e89dbd

Please sign in to comment.