Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Fedora User (http://www.linux-archive.org/fedora-user/)
-   -   Change swap size suggestion to values from documentation (http://www.linux-archive.org/fedora-user/634300-change-swap-size-suggestion-values-documentation.html)

Vratislav Podzimek 02-17-2012 12:33 PM

Change swap size suggestion to values from documentation
 
Resolves: rhbz#744129
---
iutil.py | 28 +++++++++++++++++++---------
1 files changed, 19 insertions(+), 9 deletions(-)

diff --git a/iutil.py b/iutil.py
index 898bfe0..a477172 100644
--- a/iutil.py
+++ b/iutil.py
@@ -453,16 +453,26 @@ def swapSuggestion(quiet=0):
if not quiet:
log.info("Detected %sM of memory", mem)

- if mem <= 256:
- minswap = 256
- maxswap = 512
+ #table suggested in rhbz#744129
+ if mem <= 4096:
+ minswap = 2048
+ maxswap = 2048
+
+ elif 4096 < mem <= 16384:
+ minswap = 4096
+ maxswap = 4096
+
+ elif 16384 < mem <= 65536:
+ minswap = 8192
+ maxswap = 8192
+
+ elif 65536 < mem <= 262144:
+ minswap = 16384
+ maxswap = 16384
+
else:
- if mem > 2048:
- minswap = 1024
- maxswap = 2048 + mem
- else:
- minswap = mem
- maxswap = 2*mem
+ minswap = 32768
+ maxswap = 32768

if not quiet:
log.info("Swap attempt of %sM to %sM", minswap, maxswap)
--
1.7.4.4

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

Vratislav Podzimek 02-24-2012 10:15 AM

Change swap size suggestion to values from documentation
 
Resolves: rhbz#744129
---
iutil.py | 28 +++++++++++++++++++---------
1 files changed, 19 insertions(+), 9 deletions(-)

diff --git a/iutil.py b/iutil.py
index 898bfe0..a477172 100644
--- a/iutil.py
+++ b/iutil.py
@@ -453,16 +453,26 @@ def swapSuggestion(quiet=0):
if not quiet:
log.info("Detected %sM of memory", mem)

- if mem <= 256:
- minswap = 256
- maxswap = 512
+ #table suggested in rhbz#744129
+ if mem <= 4096:
+ minswap = 2048
+ maxswap = 2048
+
+ elif 4096 < mem <= 16384:
+ minswap = 4096
+ maxswap = 4096
+
+ elif 16384 < mem <= 65536:
+ minswap = 8192
+ maxswap = 8192
+
+ elif 65536 < mem <= 262144:
+ minswap = 16384
+ maxswap = 16384
+
else:
- if mem > 2048:
- minswap = 1024
- maxswap = 2048 + mem
- else:
- minswap = mem
- maxswap = 2*mem
+ minswap = 32768
+ maxswap = 32768

if not quiet:
log.info("Swap attempt of %sM to %sM", minswap, maxswap)
--
1.7.4.4

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


All times are GMT. The time now is 06:27 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.