Giving docker higher priorty?


Recommended Posts

20 minutes ago, Squid said:

 

For more advanced usage, you can google docker run reference

I saw that before but only saw how to limit cores and thus reduce priority. I did not see anywhere how to increase priority above normal?

 

I will google that in a min and see what turns up. Already googled a fair amount on this topic but could not find a solid universal answer. Just container specific options it seemed.

Link to comment

I googled the run reference and only thing that seems to be along the lines I am looking for is:

 

SYS_NICE Raise process nice value (nice(2), setpriority(2)) and change the nice value for arbitrary processes.

 

It looks like I need to add this to the extra commands section in unraid:

 

--cap-add=SYS_nice -19

 

Is this the correct command and syntax? I am still very new to this.

Link to comment
10 hours ago, TexasUnraid said:

Is this the correct command and syntax? I am still very new to this.

Niceness is in the "do it if you know what you are doing" category. You seem to be focusing on a single thing (niceness) without considering any other option.

 

Read the post Squid quoted.

--cpu-shares is a better option to ensure a docker gets the biggest share of the processing.

 

The default value (if --cpu-shares is not set) is 1024. So for your mumble docker, you want something larger like --cpu-shares=10240.

  • Like 1
Link to comment
2 hours ago, testdasi said:

Niceness is in the "do it if you know what you are doing" category. You seem to be focusing on a single thing (niceness) without considering any other option.

 

Read the post Squid quoted.

--cpu-shares is a better option to ensure a docker gets the biggest share of the processing.

 

The default value (if --cpu-shares is not set) is 1024. So for your mumble docker, you want something larger like --cpu-shares=10240.

Not so much focusing on the niceness option as it is the only option I have found that was not pinning to cores and it seemed to be the linux equivalent to priority in windows.

 

Got to remember that when someone doesn't have a clue what things are called in linux, they don't even know what to search to find the answers they need and will latch on to the first thing that seems to do what they want since by that point that are just glad to see something that might work.

 

I missed the cpu-shares option as it was on the 2nd page. I tried searching for CPU, priority etc but nothing useful came up on the first page.

 

CPU-shares does seem to be what I am looking for, glad you mentioned that I can put the number higher then 1024, that is way easier then trying to change every other docker to lower priority.

 

Will this also give higher priority vs non-docker processes? Not as big of a deal but curious.

  • Like 1
Link to comment
2 minutes ago, TexasUnraid said:

...

Got to remember that when someone doesn't have a clue what things are called in linux, they don't even know what to search to find the answers they need and will latch on to the first thing that seems to do what they want since by that point that are just glad to see something that might work.

...

Will this also give higher priority vs non-docker processes? Not as big of a deal but curious.

Apologies for that.

 

--cpu-shares is docker specific.

Given dockers are like apps, there are very few scenarios which would require giving a docker higher priority than non-docker processes.

 

Link to comment

No worries, I have been in your shoes many times as well just assuming people know basic things and then quickly get put in my place again as soon as I move into another field lol. It is easy to forget the learning curve once you have climbed it.

 

Yeah, I was not super worried about giving it higher then non-docker processes but there are cases, like when doing a parity check for example, where the CPU can be pretty stressed and cause noticeably higher delay in mumble. Although by putting mumble ahead of all the other dockers should be good enough.

 

It just sips resources but it is really noticeable when there is a delay, particularly since some of us are in the same room due to covid right now and you hear them outside mumble and a second later in mumble. Very disorientating lol.

 

I added the cpu shares command, looking forward to testing it out at our next gaming session.

 

This also answers the question I had about how to give handbrake a lower priority.

Edited by TexasUnraid
Link to comment
53 minutes ago, TexasUnraid said:

Slightly off topic question, what is the difference between these in the docker settings:

 

Extra Parameters:

 

and

 

Post Arguments:

Extra param added stuff to after docker run command.

Post arguments added stuff to the very end of the command (e.g. to pass parameters to the docker or to run a command from within the docker).

 

You can think of it as the former is host-level parameters and the latter is guest-level parameters.

Edited by testdasi
  • Like 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.