| View previous topic :: View next topic |
| Author |
Message |
rlyacht Apprentice


Joined: 17 Apr 2002 Posts: 170
|
Posted: Sun Nov 17, 2002 1:42 am Post subject: swap size for system with 512M RAM |
|
|
| 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 |
|
 |
reves Apprentice


Joined: 25 Jun 2002 Posts: 215 Location: South Florida
|
Posted: Sun Nov 17, 2002 2:21 am Post subject: |
|
|
| 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 |
|
 |
taskara Advocate

Joined: 10 Apr 2002 Posts: 3763 Location: Australia
|
Posted: Sun Nov 17, 2002 8:21 am Post subject: |
|
|
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 |
|
 |
Larde Guru


Joined: 07 Jun 2002 Posts: 313 Location: Duesseldorf, Germany
|
Posted: Sun Nov 17, 2002 10:06 am Post subject: |
|
|
| 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 |
|
 |
SlCKB0Y Tux's lil' helper

Joined: 07 Jul 2002 Posts: 105 Location: Sydney, Australia
|
Posted: Mon Nov 18, 2002 9:03 am Post subject: |
|
|
| i have 512mb of ram and am using 512mb of swap |
|
| Back to top |
|
 |
Lovechild Advocate


Joined: 17 May 2002 Posts: 2858 Location: Århus, Denmark
|
Posted: Mon Nov 18, 2002 10:05 am Post subject: |
|
|
| 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 |
|
 |
taskara Advocate

Joined: 10 Apr 2002 Posts: 3763 Location: Australia
|
Posted: Mon Nov 18, 2002 10:10 am Post subject: |
|
|
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 |
|
 |
Lovechild Advocate


Joined: 17 May 2002 Posts: 2858 Location: Århus, Denmark
|
Posted: Mon Nov 18, 2002 12:36 pm Post subject: |
|
|
| 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 |
|
 |
jondkent Apprentice


Joined: 26 Jul 2002 Posts: 289 Location: London
|
Posted: Mon Nov 18, 2002 1:40 pm Post subject: |
|
|
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 |
|
 |
Yoannez Apprentice


Joined: 28 Jul 2002 Posts: 250 Location: Portugal
|
Posted: Mon Nov 18, 2002 3:48 pm Post subject: |
|
|
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 |
|
 |
hook Veteran


Joined: 23 Oct 2002 Posts: 1398 Location: Ljubljana, Slovenia
|
Posted: Mon Nov 18, 2002 4:26 pm Post subject: |
|
|
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 |
|
 |
reves Apprentice


Joined: 25 Jun 2002 Posts: 215 Location: South Florida
|
Posted: Mon Nov 18, 2002 6:40 pm Post subject: |
|
|
| 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 |
|
 |
fmalabre Guru


Joined: 19 Jun 2002 Posts: 376 Location: Chicago
|
Posted: Mon Nov 18, 2002 6:42 pm Post subject: |
|
|
| 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 |
|
 |
JeroenV Guru


Joined: 16 Jul 2002 Posts: 447 Location: Amsterdam / Hamburg
|
Posted: Wed Nov 20, 2002 11:21 pm Post subject: |
|
|
I agree with hook... I've been running Linuxes for years now using the following rule (my own ):
| 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  _________________ Cheers
Jeroen
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
May The Source be with you! |
|
| Back to top |
|
 |
puddpunk l33t


Joined: 20 Jul 2002 Posts: 681 Location: New Zealand
|
Posted: Wed Nov 20, 2002 11:49 pm Post subject: |
|
|
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 |
|
 |
hook Veteran


Joined: 23 Oct 2002 Posts: 1398 Location: Ljubljana, Slovenia
|
Posted: Thu Nov 21, 2002 12:08 pm Post subject: |
|
|
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 |
|
 |
JeroenV Guru


Joined: 16 Jul 2002 Posts: 447 Location: Amsterdam / Hamburg
|
Posted: Thu Nov 21, 2002 12:46 pm Post subject: |
|
|
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 )
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
Cheers  _________________ Cheers
Jeroen
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
May The Source be with you! |
|
| Back to top |
|
 |
hook Veteran


Joined: 23 Oct 2002 Posts: 1398 Location: Ljubljana, Slovenia
|
Posted: Thu Nov 21, 2002 12:54 pm Post subject: |
|
|
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 |
|
 |
kl@us n00b


Joined: 21 Aug 2002 Posts: 45 Location: Germany / Schwerte
|
Posted: Thu Nov 21, 2002 12:59 pm Post subject: |
|
|
| 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 |
|
 |
hook Veteran


Joined: 23 Oct 2002 Posts: 1398 Location: Ljubljana, Slovenia
|
Posted: Thu Nov 21, 2002 1:16 pm Post subject: |
|
|
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 |
|
 |
kl@us n00b


Joined: 21 Aug 2002 Posts: 45 Location: Germany / Schwerte
|
Posted: Thu Nov 21, 2002 1:33 pm Post subject: |
|
|
| hook wrote: | ...but isn't mldonkey a win app? ...
|
In no way! (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 |
|
 |
hook Veteran


Joined: 23 Oct 2002 Posts: 1398 Location: Ljubljana, Slovenia
|
Posted: Thu Nov 21, 2002 2:10 pm Post subject: |
|
|
sorry  _________________ tea+free software+law=hook
(deep inside i'm still a tux's little helper) |
|
| Back to top |
|
 |
Malakin Veteran


Joined: 14 Apr 2002 Posts: 1692 Location: Victoria BC Canada
|
Posted: Thu Nov 21, 2002 9:10 pm Post subject: |
|
|
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 |
|
 |
arkane l33t


Joined: 30 Apr 2002 Posts: 918 Location: Phoenix, AZ
|
Posted: Thu Nov 21, 2002 9:43 pm Post subject: |
|
|
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 |
|
 |
|