Debian CGROUP Install doesn't work after reboot

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
5
down vote

favorite
2












After I do this on my Debian Stretch:



sudo apt install cgroup-bin cgroup-tools cgroupfs-mount libcgroup1


I can issue this:



sudo systemctl set-property user-1000.slice CPUQuota=40% 


I have 4 vCPU host, each CPU takes 10% hit with "stress -cpu 4", but after reboot, I can no longer get the "CPUQuota" to work, again.



I have already have "GRUB_CMDLINE_LINUX_DEFAULT="cgroup_enable=memory swapaccount=1"



So how do I get systemd resource management to work after each reboot without having to reissue:



sudo apt --reinstall install cgroup-bin cgroup-tools cgroupfs-mount libcgroup1 






share|improve this question


























    up vote
    5
    down vote

    favorite
    2












    After I do this on my Debian Stretch:



    sudo apt install cgroup-bin cgroup-tools cgroupfs-mount libcgroup1


    I can issue this:



    sudo systemctl set-property user-1000.slice CPUQuota=40% 


    I have 4 vCPU host, each CPU takes 10% hit with "stress -cpu 4", but after reboot, I can no longer get the "CPUQuota" to work, again.



    I have already have "GRUB_CMDLINE_LINUX_DEFAULT="cgroup_enable=memory swapaccount=1"



    So how do I get systemd resource management to work after each reboot without having to reissue:



    sudo apt --reinstall install cgroup-bin cgroup-tools cgroupfs-mount libcgroup1 






    share|improve this question
























      up vote
      5
      down vote

      favorite
      2









      up vote
      5
      down vote

      favorite
      2






      2





      After I do this on my Debian Stretch:



      sudo apt install cgroup-bin cgroup-tools cgroupfs-mount libcgroup1


      I can issue this:



      sudo systemctl set-property user-1000.slice CPUQuota=40% 


      I have 4 vCPU host, each CPU takes 10% hit with "stress -cpu 4", but after reboot, I can no longer get the "CPUQuota" to work, again.



      I have already have "GRUB_CMDLINE_LINUX_DEFAULT="cgroup_enable=memory swapaccount=1"



      So how do I get systemd resource management to work after each reboot without having to reissue:



      sudo apt --reinstall install cgroup-bin cgroup-tools cgroupfs-mount libcgroup1 






      share|improve this question














      After I do this on my Debian Stretch:



      sudo apt install cgroup-bin cgroup-tools cgroupfs-mount libcgroup1


      I can issue this:



      sudo systemctl set-property user-1000.slice CPUQuota=40% 


      I have 4 vCPU host, each CPU takes 10% hit with "stress -cpu 4", but after reboot, I can no longer get the "CPUQuota" to work, again.



      I have already have "GRUB_CMDLINE_LINUX_DEFAULT="cgroup_enable=memory swapaccount=1"



      So how do I get systemd resource management to work after each reboot without having to reissue:



      sudo apt --reinstall install cgroup-bin cgroup-tools cgroupfs-mount libcgroup1 








      share|improve this question













      share|improve this question




      share|improve this question








      edited Apr 8 at 15:18









      Jeff Schaller

      31.1k846105




      31.1k846105










      asked Mar 31 at 19:07









      Hitchhiker2018

      261




      261




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          1
          down vote













          This is how I fixed the problem. (For some reason, after cgroupfs-mount is installed, the file /lib/systemd/system/cgroupfs-mount.service is linked to /dev/null.)



          sudo apt --reinstall instll cgroupfs-mount
          sudo rm /lib/systemd/system/cgroupfs-mount.service
          sudo systemctl daemon-reload


          Now created systemd service file:



          sudo nano /lib/systemd/system/cgroupfs-mount.service

          [Unit]
          Description=CGroups FS Mount

          [Service]
          Type=oneshot
          ExecStart=/etc/init.d/cgroupfs-mount start
          ExecStop=/etc/init.d/cgroupfs-mount stop
          RemainAfterExit=yes

          [Install]
          WantedBy=multi-user.target


          Once the file is created, issue:



          sudo systemctl daemon-reload


          Check on the status and enable startup during boot:



          sudo systemctl status cgroupfs-mount
          sudo systemctl enable cgroupfs-mount


          Now test:



          sudo systemctl set-property user-1000.slice CPUQuota=40%
          sudo systemctl daemon-reload





          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%2f434728%2fdebian-cgroup-install-doesnt-work-after-reboot%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













            This is how I fixed the problem. (For some reason, after cgroupfs-mount is installed, the file /lib/systemd/system/cgroupfs-mount.service is linked to /dev/null.)



            sudo apt --reinstall instll cgroupfs-mount
            sudo rm /lib/systemd/system/cgroupfs-mount.service
            sudo systemctl daemon-reload


            Now created systemd service file:



            sudo nano /lib/systemd/system/cgroupfs-mount.service

            [Unit]
            Description=CGroups FS Mount

            [Service]
            Type=oneshot
            ExecStart=/etc/init.d/cgroupfs-mount start
            ExecStop=/etc/init.d/cgroupfs-mount stop
            RemainAfterExit=yes

            [Install]
            WantedBy=multi-user.target


            Once the file is created, issue:



            sudo systemctl daemon-reload


            Check on the status and enable startup during boot:



            sudo systemctl status cgroupfs-mount
            sudo systemctl enable cgroupfs-mount


            Now test:



            sudo systemctl set-property user-1000.slice CPUQuota=40%
            sudo systemctl daemon-reload





            share|improve this answer


























              up vote
              1
              down vote













              This is how I fixed the problem. (For some reason, after cgroupfs-mount is installed, the file /lib/systemd/system/cgroupfs-mount.service is linked to /dev/null.)



              sudo apt --reinstall instll cgroupfs-mount
              sudo rm /lib/systemd/system/cgroupfs-mount.service
              sudo systemctl daemon-reload


              Now created systemd service file:



              sudo nano /lib/systemd/system/cgroupfs-mount.service

              [Unit]
              Description=CGroups FS Mount

              [Service]
              Type=oneshot
              ExecStart=/etc/init.d/cgroupfs-mount start
              ExecStop=/etc/init.d/cgroupfs-mount stop
              RemainAfterExit=yes

              [Install]
              WantedBy=multi-user.target


              Once the file is created, issue:



              sudo systemctl daemon-reload


              Check on the status and enable startup during boot:



              sudo systemctl status cgroupfs-mount
              sudo systemctl enable cgroupfs-mount


              Now test:



              sudo systemctl set-property user-1000.slice CPUQuota=40%
              sudo systemctl daemon-reload





              share|improve this answer
























                up vote
                1
                down vote










                up vote
                1
                down vote









                This is how I fixed the problem. (For some reason, after cgroupfs-mount is installed, the file /lib/systemd/system/cgroupfs-mount.service is linked to /dev/null.)



                sudo apt --reinstall instll cgroupfs-mount
                sudo rm /lib/systemd/system/cgroupfs-mount.service
                sudo systemctl daemon-reload


                Now created systemd service file:



                sudo nano /lib/systemd/system/cgroupfs-mount.service

                [Unit]
                Description=CGroups FS Mount

                [Service]
                Type=oneshot
                ExecStart=/etc/init.d/cgroupfs-mount start
                ExecStop=/etc/init.d/cgroupfs-mount stop
                RemainAfterExit=yes

                [Install]
                WantedBy=multi-user.target


                Once the file is created, issue:



                sudo systemctl daemon-reload


                Check on the status and enable startup during boot:



                sudo systemctl status cgroupfs-mount
                sudo systemctl enable cgroupfs-mount


                Now test:



                sudo systemctl set-property user-1000.slice CPUQuota=40%
                sudo systemctl daemon-reload





                share|improve this answer














                This is how I fixed the problem. (For some reason, after cgroupfs-mount is installed, the file /lib/systemd/system/cgroupfs-mount.service is linked to /dev/null.)



                sudo apt --reinstall instll cgroupfs-mount
                sudo rm /lib/systemd/system/cgroupfs-mount.service
                sudo systemctl daemon-reload


                Now created systemd service file:



                sudo nano /lib/systemd/system/cgroupfs-mount.service

                [Unit]
                Description=CGroups FS Mount

                [Service]
                Type=oneshot
                ExecStart=/etc/init.d/cgroupfs-mount start
                ExecStop=/etc/init.d/cgroupfs-mount stop
                RemainAfterExit=yes

                [Install]
                WantedBy=multi-user.target


                Once the file is created, issue:



                sudo systemctl daemon-reload


                Check on the status and enable startup during boot:



                sudo systemctl status cgroupfs-mount
                sudo systemctl enable cgroupfs-mount


                Now test:



                sudo systemctl set-property user-1000.slice CPUQuota=40%
                sudo systemctl daemon-reload






                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Apr 28 at 13:39









                GAD3R

                22.2k154891




                22.2k154891










                answered Apr 28 at 13:34









                GaoZu

                111




                111






















                     

                    draft saved


                    draft discarded


























                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f434728%2fdebian-cgroup-install-doesnt-work-after-reboot%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Popular posts from this blog

                    How to check contact read email or not when send email to Individual?

                    Bahrain

                    Postfix configuration issue with fips on centos 7; mailgun relay