l i n u x - u s e r s - g r o u p - o f - d a v i s
Next Meeting:
July 7: Social gathering
Next Installfest:
Latest News:
Jun. 14: June LUGOD meeting cancelled
Page last updated:
2010 May 26 13:42

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] ssd and swap
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] ssd and swap

On Wed, 2010-05-26 at 07:34 -0700, Scott Miller wrote:
> Anyone using an SSD? I've got one on the way to use as a boot drive,
> and am pondering not having swap at all. Is this crazy?
> In the Windows world I see persons advising turning off the Windows
> page file when using an SSD.
> I have a lot of ram: 8GB. :) But is it risky to not have a swap?
> Thanks for your input,

You'll want to allocate lots of swap if you plan on using suspend to
disk. (That's where Linux puts the RAM image on when you hibernate the

Aside from that, I feel that swap is counterproductive if you have that
much RAM. I always advise people to have at least twice as much RAM as
the applications they *typically* use. I know that with 4 GB of RAM (and
a 500 MB typical working set -- I'm only using 250 MB right now), I
barely touch my swap, and may accumulate only a few megabytes of it over
the course of a day.

The time when I *do* touch swap is when I have some sort of memory leak
-- typically in a program I or one of my students wrote -- and the
computer allocates all of its RAM *very* quickly. In this case, having
swap only serves to make the computer completely unresponsive as the
computer marches toward having the out-of-memory process killer kill the
offending process. Without swap, the offending program would die after
consuming less RAM, and without wasting time swapping. (I know I should
use a ulimit to keep these programs under control, but I never remember
to set one until it happens to me. Then it's too late.)

(While people [1] will tell you that you should have swap since it
balances the VM algorithm, letting it put anonymous unused data on swap,
when the file-backed data it's caching is more valuable, but since I
never see that happen under normal circumstances, I don't think it's
worth it anymore.)

So IMO, swap is useless. If you can set up your computer without it,
more power to you.


[1] http://sourcefrog.net/weblog/software/linux-kernel/swap.html,
vox-tech mailing list

LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
EDGE Tech Corp.
For donating some give-aways for our meetings.