Adjusting Jail Thread Priority?

Status
Not open for further replies.

Sasayaki

Explorer
Joined
Apr 20, 2014
Messages
86
Hey guys,

I'm a real noob to FreeBSD so be gentle.

My issue is that I run NZBGet in a jail, and on another jail, I have Plex. When NZBGet is going hard and unpacking things, it can stall my Plex streams due to lack of CPU.

How can I adjust the thread priority of NZBGet on launch, so that if it happens that I need to transcode something, the full priority is given to Plex instead of NZBGet's thread?

Ideally it would affect just the NZBGet thread rather than the whole jail, but if that's the only solution I'm open to it.

Is there an easy way of doing this on boot so it's always playing nice with Plex?
 

yottabit

Contributor
Joined
Apr 15, 2012
Messages
192
Can't you edit the jail init scripts to 'nice' the launch of nzbget? By default I think BSD will nice the process and subprocesses at 10, but you could specify 19 or 20 if needed. Though I read in the BSD kernel notes that the process niceness is simple and not weighted. So a process at a niceness of 0 (the default) will always get time before a process with a higher niceness.

Sent from my Pixel XL using Tapatalk
 

Sasayaki

Explorer
Joined
Apr 20, 2014
Messages
86
Did you find a way to do this?

I didn't figure it out, no. I tried to manually adjust the niceness value as a test but it actually didn't seem to help much; even at 20/-20, the workload seemed to be spread evenly, which was frustrating. Maybe I wasn't doing it right.

Can't you edit the jail init scripts to 'nice' the launch of nzbget?

I don't know how to do this. Like I said, I'm a huge noob. Any suggestions? :)
 
Status
Not open for further replies.
Top