Setting "nice" values/high priorities with only one software installed ?

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
Post Reply
echable
Posts: 30
Joined: Mon May 20, 2019 3:03 pm

Setting "nice" values/high priorities with only one software installed ?

Post by echable »

Hi

I use Logitech Media Server with the player on an Odroid xu4. Is there any point in setting the nice values etc. in dietpi-config to maximum for this software as long as it's the only software installed and used on the device ? I tried doing so but it seemed it caused a system freezed, at least I've reflashed now and am reindexing my 300.000+ mp3 plus Tidal etc. :( Thanks for your help.
User avatar
WarHawk
Posts: 610
Joined: Thu Jul 20, 2017 8:55 am

Re: Setting "nice" values/high priorities with only one software installed ?

Post by WarHawk »

No need to adjust nice...

All processes stock should be at equal levels and thus have equal cpu/thread time...only reason to change nice levels is to slow down other programs you don't want to eat up or clog up the cpu

SMP processing should balance all the processes just fine if they are at stock levels, if you turn a single program up too high...it can even interfere with the kernel and other system processes (resulting in the lock/crash)
echable
Posts: 30
Joined: Mon May 20, 2019 3:03 pm

Re: Setting "nice" values/high priorities with only one software installed ?

Post by echable »

Thank you for quick reply

Another thing I did was set up all LMS plugins WITHOUT specifying music directly in initial setup - plugins requires multiple restarts so best to do them before local library scanning begins
User avatar
MichaIng
Site Admin
Posts: 2295
Joined: Sat Nov 18, 2017 6:21 pm

Re: Setting "nice" values/high priorities with only one software installed ?

Post by MichaIng »

Of course there are many other processes running from the core system, so adjusting the nice level always has an effect, especially for audio outputs. But never set it to highest priority as this could block/delay critical kernel threads.

Generally I would only raise (means lower the value) it if you actually face audio output issues and the nice level does a noticeable difference.
echable
Posts: 30
Joined: Mon May 20, 2019 3:03 pm

Re: Setting "nice" values/high priorities with only one software installed ?

Post by echable »

Yeah, it works better without touching nice values /"on demand"-"priority" CPU threads etc.

The tip that skipping the LMS step of specifying music library folder initially, just clicking next on that step, then installing all plugins and have them working, THEN specifying music library folder and have the scan run, took me 1000 tries to learn and now for the first time everything works perfectly - maybe it should be included in the DietPi LMS/Squeezeplayer software instructions ?
User avatar
MichaIng
Site Admin
Posts: 2295
Joined: Sat Nov 18, 2017 6:21 pm

Re: Setting "nice" values/high priorities with only one software installed ?

Post by MichaIng »

Hmm a rescan after enabling the plugins does not work?
echable
Posts: 30
Joined: Mon May 20, 2019 3:03 pm

LMS recommended setup procedure (WAS Re: Setting "nice" values/high priorities with only one software installed ?)

Post by echable »

Let me clarify:

the first-time LMS setup process asks for specifying the folder for local music files - then file scan automatically begins

This brings you to the main page, where one of the first things you want to do is install plugins eg. the invaluable Chromecast bridge,

meanwhile, if you specified local music file folder at the initial setup step, then scan has autostarted,

Installing plugins requires server restarts (all or most plugins requires LMS to restart), this causes the initial local music folder scan to be interrupted and in my experience crash/hang

Therefore, best procedure is:

1. Just click next on inital setup on the step where it asks where local music files are, don't specify any folder at this step, leave it empty

2. Go on to main LMS page, install all the plugins you want, one by one, "restart now" (NOT "restart later") after each plugin install

3. THEN, after you have all the plugins you want up and functioning (I have Bandcamp, Mixcloud, Youtube, TuneIn, Tidal, Wefunk all working successfully)

- go from main LMS page - Settings (bottom right hand corner) - Basic settings - specify media folder - autoscan will start and complete successfully (and quickly, 6 hours for 4TB of approx 300.000 files over a SMB NAS connection from xu4!)

This is the only way I've had everything work perfectly. Another way would probably be, of course, to let initial setup scan finish before you begin installing plugins but that's not my way :)

Currently looking for a way to access LMS remotely over 4G or remote wifi with phone/tablet/another PC as audio out device - there are Android apps for this (but they're ugly, old and expensive as far as I've been able to find) - I had it working on one late night occasion I think, with an Android device on a 4G connection playing from the at home xu4 LMS, but need to do more experiments :)
User avatar
MichaIng
Site Admin
Posts: 2295
Joined: Sat Nov 18, 2017 6:21 pm

Re: Setting "nice" values/high priorities with only one software installed ?

Post by MichaIng »

@echable
Thanks for clarification. Yeah it makes sense to avoid the anyway interrupted files scan then. However I would assume that a service restart, especially when done from internal UI, breaks current scans gracefully, so that another rescan, after enabling plugins and doing the restart, result just the same as if you would have skipped the initial scan. If this is not the case, then this should be probably reported to LMS developers.
Post Reply