User: Password:
|
|
Subscribe / Log in / New account

Swap: a useful system feature which could be improved.

Swap: a useful system feature which could be improved.

Posted Mar 23, 2007 14:49 UTC (Fri) by k8to (subscriber, #15413)
In reply to: Swap: an idea whose time has come, and gone. by mgedmin
Parent article: Toward improved page replacement

You can get into some amount of thrashing when you have active processes and a lot of swap. This is by design of course, you want to keep them running, and you want to be able to run more than RAM strictly allows.

Despite this, even when deep into "thrash" recently (approximately 180% of ram in active use) my system remained functional. I could have logged in as root and killed off the offending process in 20 seconds or so. From an existing paged-out terminal I could have wiped it out in around 5-8 seconds. This is a lot better than it used to be. A lot better than some other operating systems I could name. But still it does slow the system down a lot.

This underscores an interesting issue. Many users do (or should) want swap to keep more memory available to programs. But desktop users don't really ever want to thrash. I wonder if there is any possible way to seperate these cases. I would allocate 4 gigs or more of swap if I thought it wasn't an invitation to thrashing. Perhaps some kind of governor application which notices the pattern and gives the user explicit choices? IE. prioritize the compile over all other programs (including my RSS reader and desktop search agent, which think they should run periodically), or perhaps "force app1 to suspend until app2 completes its run"...

Such a beast is probably writable, and it would help _me_, a desktop user who knows about system programming dorkery. I think it would not be very useful for the majority of linux users though, who run it on servers or may not have sophistication to make explicit decisions of this sort. Any thoughts?


(Log in to post comments)


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds