[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[Ovirt-devel] [PATCH node] set default swap size to twice the RAM size
- From: Alan Pevec <apevec redhat com>
- To: ovirt-devel redhat com
- Cc: Alan Pevec <apevec redhat com>
- Subject: [Ovirt-devel] [PATCH node] set default swap size to twice the RAM size
- Date: Mon, 15 Dec 2008 17:35:28 +0100
max. 2048MB
specify manually via ovirt_vol parameter if more/less is needed
ovirt_vol=BOOT_MB:SWAP_MB:ROOT_MB:CONFIG_MB:LOGGING_MB
Signed-off-by: Alan Pevec <apevec redhat com>
---
scripts/ovirt-config-storage | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/scripts/ovirt-config-storage b/scripts/ovirt-config-storage
index dd3fab1..1f1993a 100755
--- a/scripts/ovirt-config-storage
+++ b/scripts/ovirt-config-storage
@@ -261,7 +261,7 @@ case $MEM_SIZE in
''|*[^0-9]*) die failed to get system memory size;;
esac
-MEM_SIZE=$(echo "scale=0; $MEM_SIZE / 1024" | bc -l)
+MEM_SIZE=$(echo "scale=0; m=($MEM_SIZE / 1024 * 2); if (m < 2048) { m } else { 2048 }" | bc -l)
SWAP_SIZE=${OVIRT_VOL_SWAP_SIZE:-$MEM_SIZE}
BOOT_SIZE=${OVIRT_VOL_BOOT_SIZE:-$default_boot_size}
--
1.6.0.4
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]