Re: Per-user swap devices.
From: Ian Stirling
Date: Wed Jul 19 2006 - 14:40:36 EST
On Wed, 19 Jul 2006 10:54:38 BST, Ian Stirling said:
It would be really nice to be able to simply: chown crashalot.users
/dev/swap0 ;swapon /dev/swap0
Then anything run by crashalot would swap to /dev/swap0 - and not locally.
This doesn't look like it will do as much good as you think. The problem
is what to do when something run by some *other* UID needs a page - you need
to fix the code to preferentially steal a page from a 'crashalot' process.
And at that point, what you probably want instead is a global per-UID RSS
limit. This looks like a job for a CKRM resource class controller rather than
a hack to the swap code.
I've got one set of users that I care about their processes never dying
root, ..., and another set that I don't.
I want them to contend for real RAM as normal - it's quite acceptible to
me for users in the second group to push root/...s web-proxy, screen
session, processes far into slow local swap. Most of these processes
will be not very interactive - but I don't want them to die.
If the fast (but unreliable) swap device dies - I'm quite happy for my
firefox and mplayer processes to die - but not my window manager or
whatever. RSS limits don't address this.
The only way I can think of to address this is to somehow segregate swap
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/