LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Mandriva (https://www.linuxquestions.org/questions/mandriva-30/)
-   -   How Much Swap ? (https://www.linuxquestions.org/questions/mandriva-30/how-much-swap-690667/)

skamber 12-15-2008 04:55 AM

How Much Swap ?
 
hi friends. In newbie in Linux and having trouble with my swap partition selection. My question, i got confused with swap parititon's size ? I have Acer 5315 Nb and have 1.5 Gb Ram. there are lots of different comments about its size ? and finaly i find this one ;

"but depending on which kernel you are using, either qual or double your RAM would be a good rule of thumb."

what is my kernel how i can know (having updated my Mandriva; there were new menus in my Grub Menu related with Kernel?)? and how much i need to resize my Swap ? i dont want to use hibernate or suspend preferences. As a requirement and for a better performance how much ?

bitpicker 12-15-2008 05:21 AM

If you don't want to use hibernate or suspend functions or other very RAM-intensive applications such as virtual machines then you probably won't see any swap used ever. With 1.5 Gig of RAM setting aside another gig for swap just to be safe should be absolutely sufficient. My system has 768 MB of RAM and one GB of swap and swap is only very rarely used at all. The kernel version isn't of any importance for that.

You can find out the kernel version with the command uname -r.

Robin

wykedengel 12-15-2008 10:40 AM

As a new Linux user, I am also curious. I do a lot of desktop publishing, which requires a lot of photo editing. With my 2GB RAM rig, should my swap file be 4GB? Should it be higher or lower with also using the suspend function of my pc? Does it matter which distro I use?

bitpicker 12-15-2008 10:56 AM

The old rule of thumb that swap should be twice as large as RAM is complete rubbish, dating from a time when you had 4 MB of RAM on a desktop system and 16 MB of RAM on a multimedia-capable system. You wouldn't do multimedia on the smaller one so 8 MB of swap space were sufficient for that, but you needed more swap to do multimedia. Today, when you want to do everything with a computer, RAM plus Swap must be a sufficient sum total.

Where's the logic in having a smaller amout of swap when you also have a smaller amount of RAM? Swap is there to complement RAM when there isn't enough free memory, so the more RAM you have the less swap you're going to need.

If your software has many undo steps to record, then you might have to use more swap - but I doubt you're going to have 4 GB of undo data in RAM and swap. If you want to use suspend functions utilizing RAM, then of course RAM must be sufficient for that. But for normal work 2 GB of RAM is far more than is necessary. It is more than I have RAM plus swap, and I have yet to manage to fill all of that with image editing.

Robin

edwardp 12-23-2008 07:16 PM

On a default Mandriva installation, the swap partition size is twice the installed memory.

The amount of swap space can certainly be expanded or reduced, but you should back up your entire system first, before attempting to change the swap size after installation.

My laptop has 1.5 Gb of memory installed and the swap space is 3 Gb. Because the installed memory is more than sufficient, the swap space on the laptop has never been accessed.

jailbait 12-23-2008 07:21 PM

Quote:

Originally Posted by wykedengel (Post 3376281)
As a new Linux user, I am also curious. I do a lot of desktop publishing, which requires a lot of photo editing. With my 2GB RAM rig, should my swap file be 4GB?

512MB is plenty.



Quote:

Originally Posted by wykedengel (Post 3376281)

Should it be higher or lower with also using the suspend function of my pc?

If you are using suspend then make swap about 1.5 times the size of your RAM, i.e. 3GB


Quote:

Originally Posted by wykedengel (Post 3376281)
Does it matter which distro I use?

No.

--------------------------
Steve Stites


All times are GMT -5. The time now is 11:25 PM.