LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware - Installation (https://www.linuxquestions.org/questions/slackware-installation-40/)
-   -   How much swap for 4GB RAM, if any? (https://www.linuxquestions.org/questions/slackware-installation-40/how-much-swap-for-4gb-ram-if-any-4175436890/)

Berhanie 11-15-2012 12:53 AM

This is what redhat says about swap.

TobiSGD 11-15-2012 08:16 AM

Quote:

Originally Posted by ReaperX7 (Post 4829769)
I've always been told you takes the RAM size and Double it to get your Swap size.

4GB RAM = 8 GB Swap Partition

Do you think it would be reasonable to have 32GB swap for a system with 16GB of RAM or even 128GB of swap for a system with 64GB of RAM?
One could buy a 120GB SSD in that case for swap only.

stf92 11-15-2012 03:20 PM

Of course more RAM is the only thing better than RAM. If a processor has a physical address space of 2^40 bytes, implementing the whole space (to put 2^40 bytes of RAM on the other side of the bus)is the optimal solution, disregarding money and the physical space to place that much RAM. But the 80286 designers took a lot of work to design the mechanism of virtual addressing. The 80286 (famous AT IBM PC) had a _physical_ address space of 2^24 bytes (16MB). This means the processor effectively had 24 address lines. Now, in those days, RAM _was_ expensive, and nobody would dream of installing the full 16MB in a desktop machine. But there was virtual addressing, which meant full CPU support for memory management and a mechanism whereby the program got the illusion of having a large memory space, larger than the physical one.

So the full concept of the CPU Protected Virtual Address Mode rests upon the usage of large amounts of external memory or swap memory and it seems a bit of an absurdity to end up in a scenario where swap is no longer needed.

catkin 11-15-2012 07:58 PM

Quote:

Originally Posted by Berhanie (Post 4829789)
This is what redhat says about swap.

That page recommends swap sizes based solely on RAM size. Given that it also says, correctly IMHO, "the amount of swap space that a system needs is a function of the memory workload running", it begs the question "How did they calculate the recommended swap sizes?".

OK, a decision about swap has to be made during installation when the memory workload cannot practicably be estimated but it would be nice to give a caveat about the limitations of this "one size fits all" approach and a recommendation to monitor the memory workload.

H_TeXMeX_H 11-16-2012 03:01 AM

Try different sizes or none at all. Remember that you don't need a swap partition, but you can create a swap file instead.


All times are GMT -5. The time now is 09:29 AM.