Re: Swap vnode's [was overcommit thread]

From: David Whysong (dwhysong@physics.ucsb.edu)
Date: Thu Mar 30 2000 - 22:08:00 EST


On Thu, 30 Mar 2000, Larry McVoy wrote:

>I've watched this go on (and on and on) and I don't remember anyone
>thinking of this easy solution: just use free disk space in any
>mounted file system as swap over flow. So if you run out, create
>/lost+found/swap-overflow, do a mkswap on it, and start allocating
>swap pages out of there. What's the problem with that?

I thought of that, and somebody else mentioned having an "emergency use
only" swap partition. The kernel already has swap files, but the size is
fixed. How easy would it be to grow a swap file on demand?

>Sure it isn't "secure" because all your file systems can be full, but that's
>unlikely, use the last X% reserved for root. For the anal among us, you can
>add a "reserved swap space" to the file system and make that be big enough.
>Disk is cheap.

IDE is amazingly cheap.

The reasons I discount the "add more swap" arguments are:

        1. People would just tend to mount all swap in the first place
           (but you are talking about dynamic swap, so this doesn't apply)
        2. Sometimes increasing physical memory doesn't solve the problem,
           on the principle that user tasks tend to expand to use all
           available resources.
        3. Arguably, if a system is THAT deep into swap, something needs
           to be killed anyway. How many systems that run OOM would be
           okay with another few megabytes? Not very often in my
           experience.
        4. It seems like a workaround, not a solution to the problem.

Dave

David Whysong dwhysong@physics.ucsb.edu
Astrophysics graduate student University of California, Santa Barbara
My public PGP keys are on my web page - http://www.physics.ucsb.edu/~dwhysong
DSS PGP Key 0x903F5BD6 : FE78 91FE 4508 106F 7C88 1706 B792 6995 903F 5BD6
D-H PGP key 0x5DAB0F91 : BC33 0F36 FCCD E72C 441F 663A 72ED 7FB7 5DAB 0F91

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Mar 31 2000 - 21:00:28 EST