diff options
author | Vratislav Podzimek <vpodzime@redhat.com> | 2012-04-20 11:42:42 +0200 |
---|---|---|
committer | Vratislav Podzimek <vpodzime@redhat.com> | 2012-06-27 11:19:52 +0200 |
commit | 08440435d06deb3940b5f59ce275df3e74c76269 (patch) | |
tree | f793b097d6bb378847f1af286c1f88d15957cfd3 /pyanaconda/installclass.py | |
parent | cc4916bbf939fc5b901c3460a0cb9462e3b0f167 (diff) | |
download | anaconda-08440435d06deb3940b5f59ce275df3e74c76269.tar.gz anaconda-08440435d06deb3940b5f59ce275df3e74c76269.tar.xz anaconda-08440435d06deb3940b5f59ce275df3e74c76269.zip |
Move swapSuggestion to storage and use a new suggested algorithm for it
We were using an algorithm that suggested the swap size as 2 GB + size of
RAM, but this resulted in huge swaps on machines with a lot of RAM. The new
algorithm comes from the discussion with other teams.
(ported 84b3444a277b73abeaddf7d4b186a79569eb56d2 from rhel6-branch)
(ported 37415063594d00c896ff3c50496582f0c4e9e3d9 from rhel6-branch)
Diffstat (limited to 'pyanaconda/installclass.py')
-rw-r--r-- | pyanaconda/installclass.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/pyanaconda/installclass.py b/pyanaconda/installclass.py index c6c50d4e4..44a77991f 100644 --- a/pyanaconda/installclass.py +++ b/pyanaconda/installclass.py @@ -32,6 +32,7 @@ import types from constants import * from product import * from storage.partspec import * +from storage.devicelibs import swap import gettext _ = lambda x: gettext.ldgettext("anaconda", x) @@ -183,9 +184,9 @@ class BaseInstallClass(object): if bootreq: autorequests.extend(bootreq) - (minswap, maxswap) = iutil.swapSuggestion() - autorequests.append(PartSpec(fstype="swap", size=minswap, maxSize=maxswap, - grow=True, lv=True, encrypted=True)) + swap = swap.swapSuggestion() + autorequests.append(PartSpec(fstype="swap", size=swap, grow=False, + lv=True, encrypted=True)) storage.autoPartitionRequests = autorequests |