Ardour 2.8.4 100% cpu usage when I stop playback

14 replies [Last post]
vervelover
vervelover's picture
User offline. Last seen 2 weeks 11 hours ago. Offline
Joined: 2009-06-10
Posts:

Hi,
I'm on Ubuntu 9.10 with kernel rt and a Edirol ua-25. well, I have a problem. Every time I stop playback I get really intense cpu-usage (about 80-100%), even with cpu scaling disabled. When I hit play again, the cpu goes down to 4%, but this behaviour is really annoying. Does anybody have the same problem?
Thanks
Alessio

seablade
User offline. Last seen 12 hours 30 min ago. Offline
Joined: 2007-01-22
Posts:

Options>Denormal Handling

Change your settings there and see what happens. Start googling DeNormals to learn more.

Seablade

vervelover
vervelover's picture
User offline. Last seen 2 weeks 11 hours ago. Offline
Joined: 2009-06-10
Posts:

Thanks a lot for answering, I'll try it as soon as I can. I found a ardour web page that explains the denormals thing, though it says it should only happen to p4 or some amd processors, and my laptop is a intel core duo, and also, I remember having already tried all the tweaks in the performance option with no success. I'll try again and post the results..

paul
paul's picture
User offline. Last seen 1 day 5 hours ago. Offline
Joined: 2006-03-16
Posts:

@vervelover: denormals affect all intel chips - they are a "feature" of the architecture.

vervelover
vervelover's picture
User offline. Last seen 2 weeks 11 hours ago. Offline
Joined: 2009-06-10
Posts:

With "USE DC BIAS" and cpu set to max performance I reduced the idle cpu usage in Ardour to 33%, but it still is a lot! It's just 6% during playback! Does this problem affect all cpus in the world then? Why are " denormal handling" options not enabled by default in Ardour then? Anyway thanks a lot for the suggestions, now everything is already far better then before..

vervelover
vervelover's picture
User offline. Last seen 2 weeks 11 hours ago. Offline
Joined: 2009-06-10
Posts:

Ok, I found the "guilty" plugins! It was Calf LV2 Compressor and the new EQ10Q LV2 plugin to cause the problem. No issues with Invada nor LINUXDSP plugins.

linuxdsp
linuxdsp's picture
User offline. Last seen 1 day 2 hours ago. Offline
Joined: 2009-02-04
Posts:

@vervelover: I hope my email clarifies the issues about denormals - although Ardour has settings to deal with denormals, its not really something that Ardour has any 'real' control over since the sample values that are falling into the denormal range and causing the high CPU usage are being generated inside the offending plugin DSP code. It tends to affect Intel Architectures more than e.g. AMD but I've seen similar (though not so severe) problems on some AMD CPUs and I have an Intel machine that is surprisingly resilient to them.

paul
paul's picture
User offline. Last seen 1 day 5 hours ago. Offline
Joined: 2006-03-16
Posts:

@linuxdsp: ardour can't control the internal math in a plugin but we can turn on the FTZ and DAZ flags on the processor ... these can both get rid of most of the issues with denormals, if not all of them.

linuxdsp
linuxdsp's picture
User offline. Last seen 1 day 2 hours ago. Offline
Joined: 2009-02-04
Posts:

@paul: Ah, that makes sense - I was thinking ardour had little control over denormals because they originated inside the plugin (though of course there are other 'external' strategies that can be applied such as adding small amounts of noise - but that is not really recommended) - my plugins (should) handle denormals by implementing what is effectively a software Denormals Are Zero algorithm, which is slightly less efficient but makes no assumptions about the way the host configures the hardware and does not attempt to reconfigure the hardware itself (which I assumed was a very 'impolite' thing for a plugin to do since it cannot know what other side-effects that may have...)

paul
paul's picture
User offline. Last seen 1 day 5 hours ago. Offline
Joined: 2006-03-16
Posts:

@linuxdsp: the "dc bias" option does add a tiny noise level, but that isn't effective in protecting against denormals that occur as a reverb plugin "computes its own tail" so to speak - it can, however, protect the next stage of the processing chain.

linuxdsp
linuxdsp's picture
User offline. Last seen 1 day 2 hours ago. Offline
Joined: 2009-02-04
Posts:

@Paul: Adding a small amount of noise at the input to a troublesome algorithm can help (I've used this technique to diagnose denormal problems) - I tend not to favour that approach though because there's no guarantee that the low level noise will propagate all the way down the plugin 'chain' (for example if a plugin implements its own 'denormals are zero' in software which is a perfectly valid - and in some cases preferable thing to do). In theory low level noise should help with the kind of problems like reverb tales because the constant low level input to the plugin stops the signals decaying completely into the denormal range.
I prefer making sure that each algorithm that is likely to generate denormals in the plugin (IIR filters, reverb combs, compressor side-chains with exponential decay etc etc - there a lots of possibilities..) should be responsible for handling its own denormal behaviour cleanly e.g. with a software Denormals Are Zero function. There are many and varied ways to get caught out by this particularly annoying problem...

paul
paul's picture
User offline. Last seen 1 day 5 hours ago. Offline
Joined: 2006-03-16
Posts:

@linuxdsp: that's why we make it an option :)

vervelover
vervelover's picture
User offline. Last seen 2 weeks 11 hours ago. Offline
Joined: 2009-06-10
Posts:

@ paul

you said:

"ardour can't control the internal math in a plugin but we can turn on the FTZ and DAZ flags on the processor ... these can both get rid of most of the issues with denormals, if not all of them."

Those flags help but the problem with some plugins is still there for me..

thorgal
User offline. Last seen 1 year 21 weeks ago. Offline
Joined: 2007-08-03
Posts:

@vervelover

I recently came across a denormal issue as well:

http://linuxmusicians.com/viewtopic.php?f=27&t=2409#p9736

I "fixed" it by swapping the plugin insertion order.

vervelover
vervelover's picture
User offline. Last seen 2 weeks 11 hours ago. Offline
Joined: 2009-06-10
Posts:

Don't know why but as I restarted Ardour the DC BIAS option seems to have solved the problem..