Home Computer Audio Asylum

Music servers and other computer based digital audio technologies.

RE: foobar priority setting

Real time priority may or may not fix your problem. One example would be if foobar is locked out of a critical section until a process at lower priority finishes. This is called priority inversion. This will depend on other system activities. If you use real-time priority be prepared for a the system to lock up. This may happen if a critical operating system process gets locked out and, for some reason or other, the real time priority process doesn't give up the CPU. Setting the priority to real time amounts to trolling for a class of bugs. In general the best cure for these problems is not to increase the priority of the audio application as much as it is to isolate the problem processes and eviscerate them. (Or at least not run them during listening sessions.)

Real time scheduling problems are complex, but the situation often can be simplified down to two dimensions: processor load and scheduling latency.
If the problem is one of processor load there is no hope, you need to do less or get a faster processor. Obviously, one can not schedule the processor more than 100% on a single core system. However, if one wants to use priority scheduling one can't even run at 100% without running into problems using a priority scheduling algorithm. (Up to 100% can be approached with a dead-line scheduler which some real time OS have, but not garden variety Windows.) As a general rule of thumb, if processor load is less than 15% percent you will probably be OK. Above that things become complicated. (Yes that sounds crazy, but it's like road traffic. Cars travel smoothly only during light traffic.)

If the problem is latency, then the best solution is to increase the buffer sizes. In addition, increasing the buffer sizes may help somewhat with processor load issues by minimizing the overhead of processor context switches. The down side of this is that smaller buffers usually sound better.

Become familiar with the Windows task manager, especially in the mode where it shows all the system processes. Observe what goes on when the system is working well and what goes on when the system isn't. This will tell you what processes must be killed or somehow forced not to run when you are listening.

Note: I have observed all the phenomena described on several different Windows operating systems, most recently Windows 7 64 bit. However, I don't normally use Foobar, so my comments are not specific to it. I have observed various behaviors described here with cPlay and with HQPlayer. The main thing I did to cure the problems with my Windows 7 system was to disable anti-virus software, expand the RAM from 4 GB to 12 GB, and to disable paging. System maintenance processes are still scheduled by the task scheduler for the middle of the night or at system logon. I stay powered up and logged/on 24/7 so this overhead doesn't run while listening. I do not run non-audio applications such as web browsing or email while listening to music.


Tony Lauck

"Diversity is the law of nature; no two entities in this universe are uniform." - P.R. Sarkar


This post is made possible by the generous support of people like you and our sponsors:
  Analog Engineering Associates  


Follow Ups Full Thread
Follow Ups
  • RE: foobar priority setting - Tony Lauck 12/28/1410:33:36 12/28/14 (2)
    • Thanks! - scruffy_ 11:15:19 12/28/14 (1)

FAQ

Post a Message!

Forgot Password?
Moniker (Username):
Password (Optional):
  Remember my Moniker & Password  (What's this?)    Eat Me
E-Mail (Optional):
Subject:
Message:   (Posts are subject to Content Rules)
Optional Link URL:
Optional Link Title:
Optional Image URL:
Upload Image:
E-mail Replies:  Automagically notify you when someone responds.