RSS Limit implementation issue
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 9 lines · Ram Gupta
Quoted 8 lines · Alan Cox
Quoted 5 lines · Ram Gupta
I am working to implement enforcing RSS limits of a process. I am planning to make a check for rss limit when setting up pte. If the limit is crossed I see couple of different ways of handling .
1. Kill the process . In this case there is no swapping problem.
Quoted 8 lines
Quoted 3 lines
Not good as the process isn't responsible for the RSS size so it would be rather random.
I doubt I am missing some point here. I dont understand why the process isn't responsible for RSS size. This limit is process specific & the count of rss increases when the process maps some page in its page table.
It can't be responsible because the kernel is controlling the RSS size e.g. by prefetching or swapping out. The process has very little means of influencing these mechanisms, nor is there a way to actively shrink the RSS.
(It's perfectly legal to e.g. mmap a large file (1 GB) and memcopy that area into another mmaped file, and the kernel is expected to keep sane even on a 16 MB machine.)
You may introduce a mechanism that allows a process to keep it's RSS < n, but you'll have to deal with legacy processes at least for the next 20 years.
Signature · 2 lines
Ich danke GMX dafür, die Verwendung meiner Adressen mittels per SPF verbreiteten Lügen zu sabotieren.