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 gpu node to low process priority when non-tdarr NVENC processes are detected. #502

Open
kage1414 opened this issue Nov 4, 2021 · 1 comment

Comments

@kage1414
Copy link

kage1414 commented Nov 4, 2021

Is your feature request related to a problem? Please describe.
Sort of, Tdarr tends to be a resource hog. When other applications use NVENC encoding while Tdarr is using NVEC, performance suffers on those other applications (notably Plex). Setting Low FFmpeg/HandBrake process priority to on tends to help this issue.

Describe the solution you'd like
Couple possible solutions: When non-Tdarr processes are detected on the node, the node should either:

A. Turn on Low FFmpeg/HandBrake process priority for that node or,

B. Stop all processes on the node entirely until the other processes have completed.

This could be accomplished by querying processes on a schedule with a package similar to ps-node or simple event listeners.

Describe alternatives you've considered
This could easily be done with scripting and a cron job, but as far as I'm aware Tdarr doesn't have a cli that would make this possible.

Additional context
Slow transition times between low and normal process priority could still cause issues for other applications.

@kage1414 kage1414 changed the title Set node to low process priority when using NVENC and other NVENC processes are detected on the gpu. Set gpu node to low process priority when non-tdarr NVENC processes are detected. Nov 4, 2021
@HaveAGitGat
Copy link
Owner

It wouldn't be possible to instantly stop the node entirely (not in a simple cross-platform way ) but in 2.00.13 you could run a script which sets low CPU priority whenever you like (don't run on 2.00.12 or below):

const result = await axios.post(`${config.baseURL}/api/v2/update-node`, {
  headers: {
    'content-Type': 'application/json',
  },
  data: {
    nodeID: 'your-node-id',
    nodeUpdates: {
      lowCPUPriority: true
    },
  },
});

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

No branches or pull requests

2 participants