Announcement

Collapse
No announcement yet.

CGroups?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    CGroups?

    I'm having a bit of trouble gettings the hang of cgroups and have been following this tutorial: https://www.devinhoward.ca/technolog...untu-or-debian

    I'm trying to limit the CPU usage of handbrake (It uses a lot of CPU, and setting the niceness and IO values via System Monitor only goes so far).

    What would be the best way to limit the CPU and I/O useage of the handbrake process?

    So far I've done:
    Code:
    sudo cgcreate -a sarah -t sarah -g cpu:limitgroup
    echo 512 > cpu/limitgroup/cpu.shares
    cgexec -g cpu:limitgroup handbrake
    But this hasn't been very effective, and it's still using above 80% CPU for some reason.

    I also don't really understand what I'm doing exactly.

    For example:
    Code:
    :limitgroup
    I'm not sure what this does.

    How can I limit handbrake's CPU and I/O usage to 50% using cgroups?

    #2
    I'm no expert on cgroups, but my question to you would be what problem are you trying solve?
    - Handbrake intermittently taking 80% of CPU?
    - Handbrake constantly taking 80% of CPU?
    - Handbrake keeping other processes from starting?
    - General freezing conditions with your PC?

    I looked at the cgroups man page, until my eyes started to water. So let's start with problem solving and define the problem(s) that you observe Handbrake causing.
    The next brick house on the left
    Intel i7 11th Gen | 16GB | 1TB | KDE Plasma 5.24.7 | Kubuntu 22.04.4 | 6.5.0-18-generic

    Comment


      #3
      @jglen490 I had a similar experience.

      Handbrake making firefox Youtube videos unstable is my main issue.

      I set the niceness values to their lowest using system monitor (It's a CPU issue, not a disk issue, verified by iotop).

      When the handbrake conversions are running I can't watch anything basically. The video drops frames like crazy when I do that.

      Comment


        #4
        Sorry, I've never tried Handbrake on YouTube videos. I've only used it to rip DVD to disk.

        Maybe if you could describe your process to bring the YouTube into HB, that might help.
        The next brick house on the left
        Intel i7 11th Gen | 16GB | 1TB | KDE Plasma 5.24.7 | Kubuntu 22.04.4 | 6.5.0-18-generic

        Comment


          #5
          Surely what the OP means is that when Handbrake is running in the background, CPU usage can't be set to "nice" in a way that would allow tasks like watching a video?

          Comment


            #6
            There comes a point when one has to either upgrade their hardware or schedule their viewing/transcoding activities.
            If you think Education is expensive, try ignorance.

            The difference between genius and stupidity is genius has limits.

            Comment


              #7
              have you tried starting handbrake with
              Code:
              nice -n 19 handbrake
              ps: nice values are

              Niceness values range from -20
              (most favorable to the process) to 19 (least favorable to the process).
              VINNY
              i7 4core HT 8MB L3 2.9GHz
              16GB RAM
              Nvidia GTX 860M 4GB RAM 1152 cuda cores

              Comment

              Working...
              X