LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   SUSE / openSUSE (https://www.linuxquestions.org/questions/suse-opensuse-60/)
-   -   1Gb or Ram - Do I need Swap? (https://www.linuxquestions.org/questions/suse-opensuse-60/1gb-or-ram-do-i-need-swap-252976/)

Riddick 11-09-2004 06:02 PM

1Gb or Ram - Do I need Swap?
 
Is swap really necessary if I have 1Gb of Ram?

-Riddick

65_289 11-09-2004 06:07 PM

I would say probably. Our IBM P650 servers at work have swap space, and they have 8 1.45Ghz POWER4 processors with 24GB of RAM. If they need it, I bet you might too. :D

jailbait 11-09-2004 06:08 PM

"Is swap really necessary if I have 1Gb of Ram?"

Probably not. I have 512M. Once I installed a new version of SuSE and forgot to set up swap. I ran quite nicely for about two weeks before I noticed that swap was missing and put it in /etc/fstab.

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

jschiwal 11-09-2004 06:22 PM

Some applications assume that there is a swap partition. Also, linux will move memory which hasn't been accessed for a while to swap to free up real memory for active processes. You could make a smaller swap partition if you want, perhaps just 500MB.

J.W. 11-09-2004 06:26 PM

I would say No. Swap was important when 32Mg RAM was considered a big deal, but these days, if you've got say 256Mg of RAM, your actual swap usage is probably close to zero. With 1G of RAM, unless you work for NASA and will be launching the Space Shuttle from your PC, I'd bet cash money that swap will go unused.

I'd create a minimal (128Mg) swap space just in case, but realistically I doubt you'd ever use it. Keep in mind that swap only comes into play when your RAM is pushed past capacity, and the system is forced to write memory pages out to disk. With 1G RAM, that scenario is highly unlikely. -- J.W.

abisko00 11-10-2004 04:51 AM

To 99% I would say no, but I've already had a badly programmed, memory eating application, that filled my RAM and SWAP (512 + 1GB) quite fast. So if you do not lack HDD space, why not beeing on the safe side with a 500MB swap space?

EDIT: Okay, I must admit it was a very specialized application and had to deal with the data from a whole genome ;)

whansard 11-10-2004 05:31 AM

make a 1 meg swap file just for fun and you can watch if it ever gets used with top. that way you'll have a gig of ram and a meg of swap.
# dd if=/dev/zero of=/swapfile.swp bs=1M count=1
# mkswap /swapfile.swp
# swapon /swapfile.swp
# top

zba78 11-10-2004 05:40 AM

I've got 512 MB Ram and 1gb swap. To be honest I can't remember the last time I saw my swap usage rise above 0%.

And if you're using a lightweight window manager/desktop environment (e.g. XFce, fluxbox) then you definitely won't need a swap

kevinatkins 11-10-2004 05:44 AM

hi,

the suse 9.0 administration guide suggests that you should never do without any swap memory because of the use of hard-drive memory buffers; however, with 1GB of RAM, you should be able to shrink the size of swap to, say, 64MB, possibly less - it depends on what sort of apps you hope to run...


All times are GMT -5. The time now is 10:41 AM.