Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set TasksMax in addition to LimitNPROC in systemd service files #19391

Merged
merged 1 commit into from Jan 18, 2016
Merged

Set TasksMax in addition to LimitNPROC in systemd service files #19391

merged 1 commit into from Jan 18, 2016

Conversation

cdauth
Copy link
Contributor

@cdauth cdauth commented Jan 16, 2016

systemd sets an additional limit on processes and threads that defaults to 512 when run under Linux >= 4.3 (see here). The problem has been described in #9868 and #19124.

This patch sets the TasksMax in the example systemd service files provided with docker.

@GordonTheTurtle GordonTheTurtle added status/0-triage dco/no Automatically set by a bot when one of the commits lacks proper signature labels Jan 16, 2016
systemd sets an additional limit on processes and threads that defaults to 512 when run under Linux >= 4.3.
See more information here: http://unix.stackexchange.com/a/255603/59955

Signed-off-by: Candid Dauth <cdauth@cdauth.eu>
@GordonTheTurtle GordonTheTurtle removed the dco/no Automatically set by a bot when one of the commits lacks proper signature label Jan 16, 2016
@thaJeztah
Copy link
Member

ping @jfrazelle because you're our systemd master now 😄

@cpuguy83
Copy link
Member

This is controlling the pids cgroup, it seems. So not related to #9868 it would seem.
This should be documented as to what it's doing, because it will limit the number of containers someone can spin up and limit the number of processes a container can spin up.

@cpuguy83 cpuguy83 added this to the 1.10.0 milestone Jan 17, 2016
@cpuguy83
Copy link
Member

I'm going to set the 1.10 milestone as the current behavior will be horrible for anyone on the newer kernel.

@jessfraz
Copy link
Contributor

LGTM

1 similar comment
@cpuguy83
Copy link
Member

LGTM

@mcmohd
Copy link

mcmohd commented Feb 5, 2016

@dandric-activevideo, you are absolutely right, Do you have any alternate solution to set TasksMax for CentOS 7?

@cdauth
Copy link
Contributor Author

cdauth commented Feb 11, 2016

@dandric-activevideo: I’m not sure that’s relevant. This commit only affects the systemd example service files. It is up to the package maintainers what service files they actually distribute.

@mcmohd: In systemd before 228 there is no need to set it, as the task limit is not implemented yet. It is basically always set to Infinite. If you want to limit the number of tasks, use the LimitNPROC (although I think it will be per user, not per service).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants