Managing NProc in Systemd

The name of the pictureThe name of the pictureThe name of the pictureClash 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?







share|improve this question























    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?







    share|improve this question





















      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?







      share|improve this question











      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?









      share|improve this question










      share|improve this question




      share|improve this question









      asked Jun 27 at 17:40









      jacksonecac

      1608




      1608




















          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=.






          share|improve this answer























            Your Answer







            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "106"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            convertImagesToLinks: false,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );








             

            draft saved


            draft discarded


















            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






























            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=.






            share|improve this answer



























              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=.






              share|improve this answer

























                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=.






                share|improve this answer















                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=.







                share|improve this answer















                share|improve this answer



                share|improve this answer








                edited Jun 29 at 14:10


























                answered Jun 27 at 19:42









                sourcejedi

                18k22375




                18k22375






















                     

                    draft saved


                    draft discarded


























                     


                    draft saved


                    draft discarded














                    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













































































                    Popular posts from this blog

                    Peggy Mitchell

                    Palaiologos

                    The Forum (Inglewood, California)