View Full Version : [all variants] [SOLVED] more free physical ram?
chris4585
July 15th, 2008, 11:15 PM
lately i've seen my computer's ram usage go up to about 50% out of 2GB. how can i change my system to use a little more swap than physical ram?
p_quarles
July 15th, 2008, 11:28 PM
The short answer is that you don't want to. Doing so would just make your computer overall more sluggish.
The preference for swap usage is the "wm.swappiness=X" line in /etc/sysctl.conf. By default it is set to 60, which is moderate swap usage. Normally those of us with 1 GB of RAM or more change this to 0, which minimizes swap usage aggressively. I've never heard of anyone with a modern computer increasing the value of this setting.
iaculallad
July 15th, 2008, 11:29 PM
lately i've seen my computer's ram usage go up to about 50% out of 2GB. how can i change my system to use a little more swap than physical ram?
You're Ubuntu system will automatically do that task for you, of using/accessing the SWAP when it detects that you are running out of RAM when using applications.
Using the RAM is much better than using SWAP (SWAP is slower, actually).
You can view what processes are using your resources:
top
chris4585
July 15th, 2008, 11:39 PM
The short answer is that you don't want to. Doing so would just make your computer overall more sluggish.
The preference for swap usage is the "wm.swappiness=X" line in /etc/sysctl.conf. By default it is set to 60, which is moderate swap usage. Normally those of us with 1 GB of RAM or more change this to 0, which minimizes swap usage aggressively. I've never heard of anyone with a modern computer increasing the value of this setting.
alright. I understand most things about swap. One thing that puzzles me is why does ubuntu give me 5gbs of swap space when i never use no more than 32mbs... thats dumb if you ask me but meh. I was just really curious
chris4585
July 15th, 2008, 11:41 PM
You're Ubuntu system will automatically do that task for you, of using/accessing the SWAP when it detects that you are running out of RAM when using applications.
Using the RAM is much better than using SWAP (SWAP is slower, actually).
You can view what processes are using your resources:
top
thanks for the comments friend. also htop is better IMO, i understand top comes with ubuntu is probably why you said that. :)
p_quarles
July 15th, 2008, 11:43 PM
alright. I understand most things about swap. One thing that puzzles me is why does ubuntu give me 5gbs of swap space when i never use no more than 32mbs... thats dumb if you ask me but meh. I was just really curious
I agree -- it is dumb. I manually partition my drive and give it about 700 MB for the swap partition.
The default is to dedicate hard drive space equal to twice the size of the available memory. For systems with more than 512 MB of RAM, this ends up being overkill.
The one instance where swap > memory is inherently useful is with hibernate: if you rely on that feature, you'll want slightly more swap than you have memory (because everything in memory is dumped to swap).
chris4585
July 15th, 2008, 11:52 PM
ah, ok, thanks for the info. I might possibly make my swap partition smaller, this is a desktop and i never use hibernate.
Canis familiaris
July 16th, 2008, 12:01 AM
I always keep my SWAP size to be = RAM size + 256MB
I do so that I can hibernate.
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.