INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Thread priorities  (Read 2632 times)

Wybe

  • World Citizen
  • ***
  • Posts: 129
Thread priorities
« on: September 15, 2017, 10:44:11 am »

I'm on Debian Jessie and MC 23.0.21 and I performed the steps to get thread priorities working. At first it did not work, but I found out that it didn't work because I autostart MC with the /mediaserver option. I have two questions:

1. Can someone confirm that thread priorities does not work when you autostart MC with the /mediaserver option?

2. Does it makes sense to configure thread priorities when you only use the Media network option (to a UPNP device)? In other words, I do not output audio via usb or a soundcard.

Greetings, Wybe
Logged

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13875
Re: Thread priorities
« Reply #1 on: September 15, 2017, 11:00:07 am »

I'm on Debian Jessie and MC 23.0.21 and I performed the steps to get thread priorities working. At first it did not work, but I found out that it didn't work because I autostart MC with the /mediaserver option. I have two questions:

1. Can someone confirm that thread priorities does not work when you autostart MC with the /mediaserver option?

2. Does it makes sense to configure thread priorities when you only use the Media network option (to a UPNP device)? In other words, I do not output audio via usb or a soundcard.

Greetings, Wybe

I just tested that on my system and it still creates thread priorities even if you use the /mediaserver option.

If you are outputting to a UPnP device it's not as useful.
Logged

Wybe

  • World Citizen
  • ***
  • Posts: 129
Re: Thread priorities
« Reply #2 on: September 20, 2017, 03:28:05 am »

I added Nice=-10 to /etc/systemd/system/jriver.service to give mediacenter23 a higher priority. What do you think of that?

  [Unit]
     Description=JRiver
     After=display-manager.service

  [Service]
     Nice=-10
     Type=simple
     Environment=DISPLAY=:0
     User=your_user_here
     ExecStart=/usr/bin/mediacenter23 /MediaServer
     Restart=always
     RestartSec=10
     KillSignal=SIGHUP
     TimeoutStopSec=45

  [Install]
     WantedBy=graphical.target
Logged

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13875
Re: Thread priorities
« Reply #3 on: September 20, 2017, 10:46:40 am »

I added Nice=-10 to /etc/systemd/system/jriver.service to give mediacenter23 a higher priority. What do you think of that?

  [Unit]
     Description=JRiver
     After=display-manager.service

  [Service]
     Nice=-10
     Type=simple
     Environment=DISPLAY=:0
     User=your_user_here
     ExecStart=/usr/bin/mediacenter23 /MediaServer
     Restart=always
     RestartSec=10
     KillSignal=SIGHUP
     TimeoutStopSec=45

  [Install]
     WantedBy=graphical.target

If thread priorities are working that's better than nice-ing the whole thing.
If the user you are specifying in the service start exists and is in the audio group and you configured the limits.conf you should be seeing the different priorities for the MC 23 threads.
Logged

Wybe

  • World Citizen
  • ***
  • Posts: 129
Re: Thread priorities
« Reply #4 on: September 20, 2017, 12:04:48 pm »

You're right, but I'm only outputting to a UPNP device, so thread priorities aren't as useful. I looked for an alternative to give MC some more priority (and get even closer to the holy grail of reproducing recorded music!).
Logged

Wybe

  • World Citizen
  • ***
  • Posts: 129
Re: Thread priorities
« Reply #5 on: September 21, 2017, 05:41:53 am »

I did a clean, minimal install with Debian Stretch (only gnome-session) and the primary (and only) task is to run MC23. What could be a downside when configuring nice=-10 for mediacenter23?
Logged

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13875
Re: Thread priorities
« Reply #6 on: September 21, 2017, 09:17:43 am »

I did a clean, minimal install with Debian Stretch (only gnome-session) and the primary (and only) task is to run MC23. What could be a downside when configuring nice=-10 for mediacenter23?
There are probably no downsides given your situation.
I don't know if it will actually help to make the whole app run at a higher priority as much as it would if you had thread priorities working.
Logged
Pages: [1]   Go Up