lkml.org 
[lkml]   [2012]   [Jul]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectWhat is the use of RLIMIT_NICE ?
I am using prlimit in Ubuntu to do some resource restrictions in my
sandbox which has been very helpful. However, I am not quite sure what
to do with RLIMIT_NICE. The docs say:

RLIMIT_NICE: Specifies a ceiling to which the process's nice value can
be raised using setpriority(2) or nice(2).

However, according to getpriority(2), a process can raise it's nice
value only if owned by a superuser in the first place. But if this is
the case, the RLIMIT_NICE value is not going to add too any
functionality because a privileged user can arbitrarily lower or
higher RLIMIT values anyway.

So I don't understand how to use or interpret RLIMIT_NICE. For
non-privileged users the entire thing seems useless because they
cannot raise priority in the first place, and it makes no sense to set
it below the current priority. However for superusers it doesn't
really add anything either because thenice, and RLIMIT_NICE soft- and
hard limits can arbitrarily be raised.

So what is the idea behind RLIMIT_NICE ?

Thank you very much,

Jeroen


ps: please cc in reply.


\
 
 \ /
  Last update: 2012-07-31 12:21    [W:0.013 / U:0.532 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site