mirror of
https://github.com/bashclub/proxmox-zfs-postinstall.git
synced 2024-11-07 18:31:58 +01:00
Fix ZFS_ARC_MIN calculation
This commit is contained in:
parent
640c946d5b
commit
ac93aca125
@ -110,8 +110,14 @@ cancel_dialog() {
|
||||
}
|
||||
|
||||
arc_suggestion(){
|
||||
ZFS_ARC_MIN_MEGABYTES=$(roundoff $(($ZPOOL_SIZE_SUM_BYTES / 2048 / 1024 / 1024)))
|
||||
ZFS_ARC_MAX_MEGABYTES=$(roundup $(($ZPOOL_SIZE_SUM_BYTES / 1024 / 1024 / 1024)))
|
||||
ZFS_ARC_MIN_MEGABYTES=$(roundoff $(($ZPOOL_SIZE_SUM_BYTES / 2048 / 1024 / 1024)))
|
||||
if [ $ZFS_ARC_MIN_MEGABYTES -eq 0 ]; then
|
||||
ZFS_ARC_MIN_MEGABYTES=$(($ZFS_ARC_MAX_MEGABYTES / 2))
|
||||
if [ $ARC_MIN_DEFAULT_MB -gt $ZFS_ARC_MAX_MEGABYTES ]; then
|
||||
ZFS_ARC_MIN_MEGABYTES=$ARC_MIN_DEFAULT_MB
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $ARC_MIN_DEFAULT_BYTES -lt 33554432 ]; then ARC_MIN_DEFAULT_MB="32" ; else ARC_MIN_DEFAULT_MB="$(($ARC_MIN_DEFAULT_BYTES / 1024 / 1024))" ; fi
|
||||
if [ $ARC_MIN_CUR_BYTES -gt 0 ]; then ARC_MIN_CURRENT_MB="$(($ARC_MIN_CUR_BYTES / 1024 / 1024))" ; else ARC_MIN_CURRENT_MB="0" ; fi
|
||||
|
Loading…
Reference in New Issue
Block a user