I’m not sure I understand. For system processes that are hungry, setting nice -n19 only implies that the processor will dedicate time to those tasks as available. I don’t see where there is any use case for abuse. The ‘nice’ level is entirely arbitrary as long as it is more ‘nice’ than the main system processes. If the main Plex process has a nice level of ‘0’ as most processes do, then nice -n 7 is effectively the same as nice -n 19.
Agreed that if someone’s machine is underpowered they should re-evaluate…was just using that as an example. The same situation applies for the Most Powerful System-in-the-World™. Since the static transcodes want to happen as fast as possible, they will consume all system resources to do it. Whether the system is meek or powerful, 100% of its capacity is 100% of its capacity. It would just happen more often for the weaker system…
Limited to a maximum of 2 threads, it simply won’t have much of an impact on any system where the number of available threads is greater than two…which should be around 100% of systems running Plex. But this also has the unfortunate effect of underutilization. Hence my request.
However, if the static transcodes cap is lifted or set to user configurable, it is then easily possible to crush your own machine by simply setting the “max transcodes” allowed to be more than your available number of threads. So for a 4-core, 2-thread-per-core system, doing 9 simultaneous transcodes is guaranteed to peg-out your box.
Does this matter? It depends. If the prirority of the tasks that are hungry for resources is lower than that of your important tasks (e.g. streaming transcodes) it will greatly reduce the impact on those processes. So doing nice -n <whatever> would be beneficial here. It also should have zero negative impact. The static transcode tasks will still work at 100% utilization of the resources available…they will just politely try to not interfere with any process with a higher priority.
You indicated that a nice level of ‘7’ was the default. I’m not seeing that. For Example:
PID USER PRI NI VIRT RES SHR S CPU%▽MEM% TIME+ Command
2523953 plex 20 0 8948M 203M 170M S 46.3 0.6 0:15.53 /usr/lib/plexmediaserver/Plex Transcoder -codec:#0x01 h264 -hwaccel:#0x01 nvdec -hwaccel_fallback_threshold:#0x01 10 -threads:#0x01 1 -hwaccel_output_format:#0x01 cuda -hwaccel_device:#0x01 cuda -codec:#0x02 aac -analyzeduration 20000000 -probesize
1497719 plex 20 0 4934M 257M 40616 S 9.8 0.8 29:23.52 /usr/lib/plexmediaserver/Plex Media Server
This is my system doing a static transcode, the process is at that top. As you can see in column #4, the ‘nice’ level is ‘0’
Just for extra clarification…the higher the “nice” level, the more the priority of the task is lowered. Meaning nice -n 19 being the “nicest”.
Anywhichway, thank you for helping with clarification and moving this forward. It is supremely appreciated.