Alan Pevec
2008-Dec-12 18:36 UTC
[Ovirt-devel] [PATCH node] set default swap size to twice the RAM size
--- 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..2fae9fe 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; $MEM_SIZE / 1024 * 2" | bc -l) SWAP_SIZE=${OVIRT_VOL_SWAP_SIZE:-$MEM_SIZE} BOOT_SIZE=${OVIRT_VOL_BOOT_SIZE:-$default_boot_size} -- 1.6.0.4
Darryl L. Pierce
2008-Dec-15 14:39 UTC
[Ovirt-devel] [PATCH node] set default swap size to twice the RAM size
On Fri, Dec 12, 2008 at 07:36:23PM +0100, Alan Pevec wrote:> --- > 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..2fae9fe 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; $MEM_SIZE / 1024 * 2" | bc -l) > SWAP_SIZE=${OVIRT_VOL_SWAP_SIZE:-$MEM_SIZE} > > BOOT_SIZE=${OVIRT_VOL_BOOT_SIZE:-$default_boot_size}ACK. -- Darryl L. Pierce, Sr. Software Engineer @ Red Hat, Inc. Virtual Machine Management - http://www.ovirt.org/ "What do you care what other people think, Mr. Feynman?" -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: not available URL: <http://listman.redhat.com/archives/ovirt-devel/attachments/20081215/91a5cd21/attachment.sig>
Chris Lalancette
2008-Dec-15 15:21 UTC
[Ovirt-devel] [PATCH node] set default swap size to twice the RAM size
Alan Pevec wrote:> --- > 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..2fae9fe 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; $MEM_SIZE / 1024 * 2" | bc -l) > SWAP_SIZE=${OVIRT_VOL_SWAP_SIZE:-$MEM_SIZE}You probably want to have a maximum here; on a machine with 64GB of memory, you don't necessarily want a 128GB swap partition. -- Chris Lalancette