Messages in this thread | | | Date | Wed, 26 May 2004 21:25:23 +1000 | From | Nick Piggin <> | Subject | Re: why swap at all? |
| |
Martin Olsson wrote: > Hi Linux-gurus, > > I agree with Anthony Disante, maybe not all users want swapping. I have > myself felt very annoying with swapping lately but I've not yet tried to > disable it. > > In school I've studied the swapping concept from a theoretical point > of view, and I fully understand the fact that swapping, if used > properly, can both increase performance and provide a safe way to get > out of a bad situation when the box runs out of memory. The problem is > that in reality this does not work, not on Linux nor on Windows 2000 > which I use at home. Unfortunately I cannot provide a specific reason > why it does not work, I'm very much a end-user/desktop-user, I'm not a > kernel hacker (yet). But I see two things that needs improvement atm: >
You don't need to provide a specific reason, a report would be valuable too.
> A) when I do large data processing operations the computer is always > very very slow afterwards >
Time how long the large data processing operations take, then turn swap off and time them again.
> B) if I have X Mb of RAM then there should not be imho a single swap > read/write until the whole of my X Mb RAM is completely stuffed, is this > so today? >
Yes, Linux doesn't start swapping or reclaiming at all until your RAM is full.
> --- > > Also, imagine that I disable swap today and start a large data > processing operation. During this operation I try to start a new > process, here ideally the program should not OOM but instead the memory > allocated for the data processing operation should be decreased. Is this > possible using today's technology? Can be divide memory into two sorts, > one for processes (here to stay memory) and another sort for batch > operations (where the amount of memory does not really matter but less > memory means less performance). I see the problem with "taking memory > back" though, I guess its impossible. >
File backed data will be able to be reclaimed, yes. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |