On 01/08/10 22:00, David Laight wrote:
On Fri, Jan 08, 2010 at 08:53:52PM +0000, Eduardo Horvath wrote:I think you should cap the RSS limit ar VM_MAXUSER_ADDRESS in case someone ever enhances UVM to track RSS. There is little point in having more pages resident than you are allowed to address.Actually it is insame to use these physical limits for the rlimit values. The 'rlimit' values should be set to sane constants almost regardless as to the size of the machine.
And how do you define "sane" constants? Just the notion of being constant is somewhat bulky: I can't see how it will scale correctly to both multi-GB systems and small embedded devices.
IMHO, it should be set at runtime. The heuristic could be different than the one presently used (set to the total number of free pages). However, I don't have the slightest idea of what could be used instead.
Remember a non-roor user can increase the 'soft' limit to the 'hard' limit - so a single process can then use all the system resource.
Setting lower values won't help much there: instead of having one single process consuming all the system resources, you just have to spawn more.
-- Jean-Yves Migeon jeanyves.migeon%free.fr@localhost