Red Hat Bugzilla – Bug 32819
unnecessary add swap during upgrade
Last modified: 2007-04-18 12:32:20 EDT
My system has 384M memory plus 500M swap partition. The system has Rage
128 video card.
I did an gui upgrade from RHL 7 to qa0319.
During the upgrade I got a new (to me) panel which indicated I did not have
enough swap space. It recognized that I had 517M swap partition but
indicated that this was not enough (specified that I needed 251M swap) and
asked if I wanted to add a swap "file".
Some calcuations seem to be off
Brent please look at.
The 2.4 kernel needs twice as much swap space as the amount of RAM. So, if you
have 384 MB of RAM, then you need (384 * 2) = 768 MB of swap. Since you already
have 517 MB of swap, adding a 251 MB swap file will give you 768 MB of RAM, so
the calculations are correct.
At some point, however, the 2x swap rule starts to become excessive. If someone
has a web server with 4 Gigs of RAM, we shouldn't require 8 Gigs of swap. So,
we applied some rules to the upgrade process. If the user has less than 500MB
of RAM, then we try to make a swap file that will give them twice as much swap
as RAM. If they have more RAM than that, then we skip the swap file screen.
OK, your explanation sounds reasonable. However,
1. Why stop at 500M of ram? Why not warn folks anyway even if you don't
suggest a 2*2GB?
2. This only happens on upgrade. If you believe it is needed for upgrade, then
it should apply to a fresh install also (which with my testing it does not).
3. Why a swap file rather than a swap partition?
4. The implication in the current screen is that the upgrade will not work
because the kernel/anaconda will fail. It now appears to me that you are
referring to the installed system.
For the above reasons, I am reopening this bug. If it is closed NOTABUG, so be
it but you should consider the above (at least for 7.2 if not 7.1).
I'll try to answer your questions as best I can.
1. We feel that requiring over 1 GB of swap is unnecessary. A warning would be
nice and that's something we're considering.
2. The problem is upgrades take more memory (and thus more swap) than a regular
install. For an upgrade, the installer has to query the RPM database on the
installed system and then compare it to the new package list. We were seeing
some problems internally with the kernel running out of memory during upgrades
and would cause the installer to crash.
3. Since the problem manifests itself most severely during upgrades, swap files
were the way to go because most drives are fully partitioned. We don't
currently have the ability to modify existing partitions to make room for a new
swap partition, so swap files were our only choice.
4. The problem is not as severe on an installed system, but it still exists.
What I mean is that if the 2.4 kernel doesn't have enough swap space, you will
see decreased performance on an installed system. That's why we leave the swap
file on the disk after upgrading.
We are aware that this isn't the ideal solution to the problem, but there are
some inherent difficulties with upgrading a machine from a 2.2 based kernel to a
2.4 based kernel. I hope this addresses your concerns. I mean, these are issues
that we've thought about, and we've come up with what we think is an acceptable
OK, lets close this out.