Managing NProc in Systemd

Clash Royale CLAN TAG#URR8PPP
up vote
2
down vote
favorite
What is the different between SystemD "Tasks" and nproc values?
We were seeing a problem where a service was crashing because the number of current tasks exceeded the Systemd Default value for TasksMax (512). However we had set LimitNPROC=infinity already so we were surprised that the service was throttled at 512.
We resolved the problem by setting
TasksMax=infinity
What is the different between TasksMax and LimitNPROC and when should you use one over the other?
systemd
add a comment |Â
up vote
2
down vote
favorite
What is the different between SystemD "Tasks" and nproc values?
We were seeing a problem where a service was crashing because the number of current tasks exceeded the Systemd Default value for TasksMax (512). However we had set LimitNPROC=infinity already so we were surprised that the service was throttled at 512.
We resolved the problem by setting
TasksMax=infinity
What is the different between TasksMax and LimitNPROC and when should you use one over the other?
systemd
add a comment |Â
up vote
2
down vote
favorite
up vote
2
down vote
favorite
What is the different between SystemD "Tasks" and nproc values?
We were seeing a problem where a service was crashing because the number of current tasks exceeded the Systemd Default value for TasksMax (512). However we had set LimitNPROC=infinity already so we were surprised that the service was throttled at 512.
We resolved the problem by setting
TasksMax=infinity
What is the different between TasksMax and LimitNPROC and when should you use one over the other?
systemd
What is the different between SystemD "Tasks" and nproc values?
We were seeing a problem where a service was crashing because the number of current tasks exceeded the Systemd Default value for TasksMax (512). However we had set LimitNPROC=infinity already so we were surprised that the service was throttled at 512.
We resolved the problem by setting
TasksMax=infinity
What is the different between TasksMax and LimitNPROC and when should you use one over the other?
systemd
asked Jun 27 at 17:40
jacksonecac
1608
1608
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
LimitNProc= is an rlimit (these also referred to as a ulimit). "See setrlimit(2) for details on the resource limit
concept... Note that most process resource limits configured with these
options are per-process, and processes may fork in order to acquire
a new set of resources that are accounted independently of the
original process, and may thus escape limits set." This is documented in man systemd.exec. RLIMIT_NPROC is one of the exceptions to this quote; it limits the number of processes "for the real user ID" (UID).
TasksMax= is documented in the more specific man systemd.resource-control, as one of the options which "relies on the
Linux Control Groups (cgroups) kernel concept for organizing processes". All such limits apply to the cgroup created for the systemd service. cgroups cannot be escaped by simply forking a new process.
TasksMax= makes much more sense to me. I don't know any reason why you would use LimitNProc=.
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
LimitNProc= is an rlimit (these also referred to as a ulimit). "See setrlimit(2) for details on the resource limit
concept... Note that most process resource limits configured with these
options are per-process, and processes may fork in order to acquire
a new set of resources that are accounted independently of the
original process, and may thus escape limits set." This is documented in man systemd.exec. RLIMIT_NPROC is one of the exceptions to this quote; it limits the number of processes "for the real user ID" (UID).
TasksMax= is documented in the more specific man systemd.resource-control, as one of the options which "relies on the
Linux Control Groups (cgroups) kernel concept for organizing processes". All such limits apply to the cgroup created for the systemd service. cgroups cannot be escaped by simply forking a new process.
TasksMax= makes much more sense to me. I don't know any reason why you would use LimitNProc=.
add a comment |Â
up vote
1
down vote
accepted
LimitNProc= is an rlimit (these also referred to as a ulimit). "See setrlimit(2) for details on the resource limit
concept... Note that most process resource limits configured with these
options are per-process, and processes may fork in order to acquire
a new set of resources that are accounted independently of the
original process, and may thus escape limits set." This is documented in man systemd.exec. RLIMIT_NPROC is one of the exceptions to this quote; it limits the number of processes "for the real user ID" (UID).
TasksMax= is documented in the more specific man systemd.resource-control, as one of the options which "relies on the
Linux Control Groups (cgroups) kernel concept for organizing processes". All such limits apply to the cgroup created for the systemd service. cgroups cannot be escaped by simply forking a new process.
TasksMax= makes much more sense to me. I don't know any reason why you would use LimitNProc=.
add a comment |Â
up vote
1
down vote
accepted
up vote
1
down vote
accepted
LimitNProc= is an rlimit (these also referred to as a ulimit). "See setrlimit(2) for details on the resource limit
concept... Note that most process resource limits configured with these
options are per-process, and processes may fork in order to acquire
a new set of resources that are accounted independently of the
original process, and may thus escape limits set." This is documented in man systemd.exec. RLIMIT_NPROC is one of the exceptions to this quote; it limits the number of processes "for the real user ID" (UID).
TasksMax= is documented in the more specific man systemd.resource-control, as one of the options which "relies on the
Linux Control Groups (cgroups) kernel concept for organizing processes". All such limits apply to the cgroup created for the systemd service. cgroups cannot be escaped by simply forking a new process.
TasksMax= makes much more sense to me. I don't know any reason why you would use LimitNProc=.
LimitNProc= is an rlimit (these also referred to as a ulimit). "See setrlimit(2) for details on the resource limit
concept... Note that most process resource limits configured with these
options are per-process, and processes may fork in order to acquire
a new set of resources that are accounted independently of the
original process, and may thus escape limits set." This is documented in man systemd.exec. RLIMIT_NPROC is one of the exceptions to this quote; it limits the number of processes "for the real user ID" (UID).
TasksMax= is documented in the more specific man systemd.resource-control, as one of the options which "relies on the
Linux Control Groups (cgroups) kernel concept for organizing processes". All such limits apply to the cgroup created for the systemd service. cgroups cannot be escaped by simply forking a new process.
TasksMax= makes much more sense to me. I don't know any reason why you would use LimitNProc=.
edited Jun 29 at 14:10
answered Jun 27 at 19:42
sourcejedi
18k22375
18k22375
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f452284%2fmanaging-nproc-in-systemd%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password