Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
swap size for system with 512M RAM
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
rlyacht
Apprentice
Apprentice


Joined: 17 Apr 2002
Posts: 170

PostPosted: Sun Nov 17, 2002 1:42 am    Post subject: swap size for system with 512M RAM Reply with quote

The installation guide recommends a swap size of twice the amount of RAM. My desktop system has 512M -- do I really need 1G of swap?!
Back to top
View user's profile Send private message
reves
Apprentice
Apprentice


Joined: 25 Jun 2002
Posts: 215
Location: South Florida

PostPosted: Sun Nov 17, 2002 2:21 am    Post subject: Reply with quote

Quote:
My desktop system has 512M -- do I really need 1G of swap?!


No. 256mb or 128 mb should be ok. I had 256mb or memeory and 256mb of swap and have no problems.
_________________
Robert
Back to top
View user's profile Send private message
taskara
Advocate
Advocate


Joined: 10 Apr 2002
Posts: 3763
Location: Australia

PostPosted: Sun Nov 17, 2002 8:21 am    Post subject: Reply with quote

depends.. I have 1 gig of ram, and emerging openoffice uses almost all of it

99% of the time you prob won't even need to use any swap... but it doesn't hurt to have it there.. :)
_________________
Kororaa install method - have Gentoo up and running quickly and easily, fully automated with an installer!
Back to top
View user's profile Send private message
Larde
Guru
Guru


Joined: 07 Jun 2002
Posts: 313
Location: Duesseldorf, Germany

PostPosted: Sun Nov 17, 2002 10:06 am    Post subject: Reply with quote

Quote:
The installation guide recommends a swap size of twice the amount of RAM.


According to this swap howto, that suggestion is outdated. To quote just one paragraph from that text:
Quote:
Typical total swap space size is equal to your system's RAM size.
Early versions of Linux 2.4 (through 2.4.9) liked swap space size
of 2 * system RAM size, but that's no longer the case.


Yours,
Larde.
_________________
Someday this will be my home... http://moonage.net/
I'll make you a deal
I'll say I came from Earth and my tongue is taped
Back to top
View user's profile Send private message
SlCKB0Y
Tux's lil' helper
Tux's lil' helper


Joined: 07 Jul 2002
Posts: 105
Location: Sydney, Australia

PostPosted: Mon Nov 18, 2002 9:03 am    Post subject: Reply with quote

i have 512mb of ram and am using 512mb of swap
Back to top
View user's profile Send private message
Lovechild
Advocate
Advocate


Joined: 17 May 2002
Posts: 2858
Location: Århus, Denmark

PostPosted: Mon Nov 18, 2002 10:05 am    Post subject: Reply with quote

I have 512 Megs and my Swap partition is 1 GB to support plenty space to dump my entire RAM holdings into swap during software suspend.
Back to top
View user's profile Send private message
taskara
Advocate
Advocate


Joined: 10 Apr 2002
Posts: 3763
Location: Australia

PostPosted: Mon Nov 18, 2002 10:10 am    Post subject: Reply with quote

how do you configure software suspend ?
_________________
Kororaa install method - have Gentoo up and running quickly and easily, fully automated with an installer!
Back to top
View user's profile Send private message
Lovechild
Advocate
Advocate


Joined: 17 May 2002
Posts: 2858
Location: Århus, Denmark

PostPosted: Mon Nov 18, 2002 12:36 pm    Post subject: Reply with quote

taskara wrote:
how do you configure software suspend ?


It's a feature in the 2.5 kernel, but I have yet to actually making it tick...
Back to top
View user's profile Send private message
jondkent
Apprentice
Apprentice


Joined: 26 Jul 2002
Posts: 289
Location: London

PostPosted: Mon Nov 18, 2002 1:40 pm    Post subject: Reply with quote

It all depends on what you want to use your system for. 1*RAM is fine, but even that maybe overkill. It you have disk space to kill you might as well use 1*RAM, if not you might be able to get away with less.

Jon
Back to top
View user's profile Send private message
Yoannez
Apprentice
Apprentice


Joined: 28 Jul 2002
Posts: 250
Location: Portugal

PostPosted: Mon Nov 18, 2002 3:48 pm    Post subject: Reply with quote

Hi

I just whant to say that I have a T22, 394Mb Ram and 56 Mb swap...
What a crazy guy? No
First the swap rule of 2* ram size was invented when you had super machines with 16Mb of Ram now that doesn't make sense since swap is a memory extension, used to store unused ram, so the rule now should be changed. To user defined...
Why because only the user or sysadmin know what is the machine for! And therefore only them know what memory will beused and what amount, and do we have any need to store unused ram? And if we do why is it unused?
In my case I have a laptop, so has a laptop it is constantly working. And then either shutdown or stanby so no need to store unused ram. The amount of physical ram is not always used to the max so there is no need for sawp. I decided to keep a 56Mb sawp space for those long compilations... Hope this can help
_________________
The road to Perfection is too rocky ! Consider Linux as home delivery service.
Back to top
View user's profile Send private message
hook
Veteran
Veteran


Joined: 23 Oct 2002
Posts: 1398
Location: Ljubljana, Slovenia

PostPosted: Mon Nov 18, 2002 4:26 pm    Post subject: Reply with quote

actually you don't need swap at all :) ...it's there just if you run out of memory :) ...so with 512MB you can live without :) ...unless you are using some s.e.r.i.o.u.s. mem-eating programs :)
_________________
tea+free software+law=hook

(deep inside i'm still a tux's little helper)
Back to top
View user's profile Send private message
reves
Apprentice
Apprentice


Joined: 25 Jun 2002
Posts: 215
Location: South Florida

PostPosted: Mon Nov 18, 2002 6:40 pm    Post subject: Reply with quote

Quote:
actually you don't need swap at all


It's probably best to have swap just in case. And if you have 512mb of memory you probably also have a large enough hard drive to spare a few hundred megabytes for swap.
_________________
Robert
Back to top
View user's profile Send private message
fmalabre
Guru
Guru


Joined: 19 Jun 2002
Posts: 376
Location: Chicago

PostPosted: Mon Nov 18, 2002 6:42 pm    Post subject: Reply with quote

Yoannez wrote:
I just whant to say that I have a T22, 394Mb Ram and 56 Mb swap...


I agree, I have 256Mb of RAM, and 128Mb of swap.

I want to upgrade to 512Mb or 1Gb of RAM, but I will keep my 128Mb of swap...
Doesn't make sense for me to have more... and I'm a KDE user! (that uses lot of memory...)
Back to top
View user's profile Send private message
JeroenV
Guru
Guru


Joined: 16 Jul 2002
Posts: 447
Location: Amsterdam / Hamburg

PostPosted: Wed Nov 20, 2002 11:21 pm    Post subject: Reply with quote

I agree with hook... I've been running Linuxes for years now using the following rule (my own 8)):
Quote:
swap + mem = max_mem_needed =>
swap = max_mem_needed - mem


In my current case (515MB mem) this results in a merely symbolical swap-partition of 200MB, and I've never had problems. (And I do do heavy multitasking)

I never understood were this relation "more mem => need more swap" came from :?: (Does it really have a serious technical explanation :?: )
I would say: "more mem => need less swap :!:

Cheers 8)
_________________
Cheers 8)
Jeroen
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
May The Source be with you!
Back to top
View user's profile Send private message
puddpunk
l33t
l33t


Joined: 20 Jul 2002
Posts: 681
Location: New Zealand

PostPosted: Wed Nov 20, 2002 11:49 pm    Post subject: Reply with quote

its the way the older kernels used to handle swap space.

Having a swap drive of 2*RAM was the optimal amount for the kernel to play with
Back to top
View user's profile Send private message
hook
Veteran
Veteran


Joined: 23 Oct 2002
Posts: 1398
Location: Ljubljana, Slovenia

PostPosted: Thu Nov 21, 2002 12:08 pm    Post subject: Reply with quote

the idea behind the swap=ram*2 was (as puddpunk said) the older kernels' way of using swap: they synced all the ram into the swap partition when they ran out of it ...so you needed to have (exactly) two times the the amaount of ram for your swap ...this way you could support two syncs :)


p.s. that is what i was told a few years ago :)
_________________
tea+free software+law=hook

(deep inside i'm still a tux's little helper)
Back to top
View user's profile Send private message
JeroenV
Guru
Guru


Joined: 16 Jul 2002
Posts: 447
Location: Amsterdam / Hamburg

PostPosted: Thu Nov 21, 2002 12:46 pm    Post subject: Reply with quote

Ok, that makes sense :)
But for the new kernels I suppose my formula would be fine :?: (Officially that is, I know it works in practise :wink: )

And in windows? First thing I used to do when I still used windows (NT-like) was setting the swap-file to a fixed size, also using my formula. I wouldn't trust that OS doing things on it's own, like growing/shrinking swap-space :x

Cheers 8)
_________________
Cheers 8)
Jeroen
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
May The Source be with you!
Back to top
View user's profile Send private message
hook
Veteran
Veteran


Joined: 23 Oct 2002
Posts: 1398
Location: Ljubljana, Slovenia

PostPosted: Thu Nov 21, 2002 12:54 pm    Post subject: Reply with quote

i use that forula too :) it works fine with me

about wintendo: i don't trust that OS with anything ...i just use it for games
_________________
tea+free software+law=hook

(deep inside i'm still a tux's little helper)
Back to top
View user's profile Send private message
kl@us
n00b
n00b


Joined: 21 Aug 2002
Posts: 45
Location: Germany / Schwerte

PostPosted: Thu Nov 21, 2002 12:59 pm    Post subject: Reply with quote

hook wrote:
actually you don't need swap at all :) ...it's there just if you run out of memory :) ...so with 512MB you can live without :) ...unless you are using some s.e.r.i.o.u.s. mem-eating programs :)


Hi hook,

1st. excuse my bad english (german); but I don´t agree with you.
Yesterday when i ran "mldonkey" it´s size was 1300MB(!). Don´t believe?
It´s the truth!
So I was glad to have a swap-partition which is 1Gigabyte. I have at least 768 MB ram and it was _all_ eaten away from the donkey. I wondered what would happen if I have no Swap at all?! Is it eating my Case? ;-)
BTW, is there a way to tell a program just to behave nice (not the cpu) to the ram or the swap?

THX
Klaus
_________________
"warum heissen eigentlich alle frauen mit nachnamen jpg ?" [Frage an das Internet Orakel]
Back to top
View user's profile Send private message
hook
Veteran
Veteran


Joined: 23 Oct 2002
Posts: 1398
Location: Ljubljana, Slovenia

PostPosted: Thu Nov 21, 2002 1:16 pm    Post subject: Reply with quote

i don't know ...i never had any problems with ram and swap :| ...so i don't know why mldonkey eats so much ram :? ...but isn't mldonkey a win app? ...if it is, it probably runs on wine which is a REAL mem-devourer

btw: kl@us i like the bit with the .jpg chicks :) hehe
_________________
tea+free software+law=hook

(deep inside i'm still a tux's little helper)
Back to top
View user's profile Send private message
kl@us
n00b
n00b


Joined: 21 Aug 2002
Posts: 45
Location: Germany / Schwerte

PostPosted: Thu Nov 21, 2002 1:33 pm    Post subject: Reply with quote

hook wrote:
...but isn't mldonkey a win app? ...


In no way! :x (shudder, You probably mean "emule"?)
It´s a edonkey client written in "Objective-Caml" (whatever that means?!)
for linux & mac.

Klaus
_________________
"warum heissen eigentlich alle frauen mit nachnamen jpg ?" [Frage an das Internet Orakel]
Back to top
View user's profile Send private message
hook
Veteran
Veteran


Joined: 23 Oct 2002
Posts: 1398
Location: Ljubljana, Slovenia

PostPosted: Thu Nov 21, 2002 2:10 pm    Post subject: Reply with quote

sorry 8O
_________________
tea+free software+law=hook

(deep inside i'm still a tux's little helper)
Back to top
View user's profile Send private message
Malakin
Veteran
Veteran


Joined: 14 Apr 2002
Posts: 1692
Location: Victoria BC Canada

PostPosted: Thu Nov 21, 2002 9:10 pm    Post subject: Reply with quote

I used to run with 512M ram and no swap but at one point I noticed occasionally I'd leave my computer, come back and something like Mozilla would be closed (open when I left the computer) or the system would be unstable, it wasn't obvious what the problem was but I ended up figuring out that it had run out of memory and started killing processes, adding 512M of swap space has stopped that from ever happening again.

It depends on what you run but for most people on modern systems who run lots of apps at a time like me you'll probably want to have your ram + swap = 1G+ to be on the safe side. If you're ever curious if it's using your swap or how much it's using you can do a "cat /proc/swaps"

You don't need a swap partition, you can setup a swap file wherever you want. A swap partition will help performance so if you're low on ram and expect a lot of swapping it's a good idea to have a separate partition for it.
Back to top
View user's profile Send private message
arkane
l33t
l33t


Joined: 30 Apr 2002
Posts: 918
Location: Phoenix, AZ

PostPosted: Thu Nov 21, 2002 9:43 pm    Post subject: Reply with quote

I had that problem, also.. until I started using WindowMaker again. (from KDE)
Once I was back in WindowMaker, I haven't even touched swap... well, there was once, it was a java application that parsed XML, and OH my god, it sucked up all of my available memory, ram and swap..... (GPL application... and the author knew it did this... it was a TV guide listing app for Satellite and cable channels)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum