Re: [vox-tech] ssd and swap
On Wed, May 26, 2010 at 10:13:09AM -0500, Chanoch (Ken) Bloom wrote: > 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, [snip] > > 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. Hmm, that sounds like my MS project at one point. Perhaps that is the reason for the quiet response from my advisor. You can temporarily add swap for instances like this[1]. The following will add 1 GB of swap. dd if=/dev/zero of=/swapfile bs=1024 count=1048576 mkswap /swapfile swapon /swapfile when done swapoff /swapfile [1] http://www.linux.com/news/software/applications/8208-all-about-linux-swap-space -- Brian Lavender http://www.brie.com/brian/ "There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies." Professor C. A. R. Hoare The 1980 Turing award lecture ___ vox-tech mailing list vox-tech@lists.lugod.org http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] ssd and swap
On Wed, May 26, 2010 at 07:34:58AM -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, I have two mini 9s with SSD and 2 GB ram and no swap. They both seem to run well. Just don't use apps that hog a lot of memory or leak it or test that for successful allocation. 8 GB sounds like a lot. -- Brian Lavender http://www.brie.com/brian/ "There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies." Professor C. A. R. Hoare The 1980 Turing award lecture ___ vox-tech mailing list vox-tech@lists.lugod.org http://lists.lugod.org/mailman/listinfo/vox-tech
Re: [vox-tech] ssd and swap
> On Wed, 26 May 2010 10:13:09 -0500, "Chanoch (Ken) Bloom" > said: CB> So IMO, swap is useless. If you can set up your computer without it, CB> more power to you. Personally, I've found that in the last 5 years or so the linux kernel starts being less efficient once you hit the swap barrier. It chugs along fine until you hit swap then it slows down (as it of course would) but once you bring the memory usage back below the swap-line it never seems to recover to its initial speed. Very odd. I especially notice this on smaller devices like my N900; I find that after I get to a certain point of usage on my laptop or my N900 it's worth a reboot to recover speed. Gasp. You should never have to do that!!! -- Wes Hardaker My Pictures: http://capturedonearth.com/ My Thoughts: http://pontifications.hardakers.net/ ___ vox-tech mailing list vox-tech@lists.lugod.org http://lists.lugod.org/mailman/listinfo/vox-tech
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 computer.) 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. --Ken [1] http://sourcefrog.net/weblog/software/linux-kernel/swap.html, ___ vox-tech mailing list vox-tech@lists.lugod.org http://lists.lugod.org/mailman/listinfo/vox-tech