[LAU] Performance tuning audio apps -- Success!

Ken Restivo ken at restivo.org
Tue Aug 18 22:14:51 EDT 2009

On Tue, Aug 18, 2009 at 10:02:32AM +0300, David Baron wrote:
> On Tuesday 18 August 2009 01:30:30 Ken Restivo wrote:
> > Success!
> >
> > I ended up using the following flags:
> >
> > -msse -msse2 -mfpmath=sse -ffast-math -fomit-frame-pointer -O3
> > -fno-finite-math-only -pipe
> >
> > And all is well. I can run azr3, two fluidsynths, jackd, lashd,
> > jackminimix, linuxsampler (!), and four jack-rack instances with plugins
> > from CAPS, TAP, CALF, and Fons's autowah, and play them with responsiveness
> > and no glitches... on a dinky little Atom 1.6Ghz netbook... while compiling
> > software and running Firefox. Yay Linux!
> Wow! I will have to try some of this stuff on the next synth I compile.
> Must EVERYTHING be compiled like this or just cpu-hogs like synths?
> Hardware limitations? I have a pentium-III dinosaur.
> >
> > Fluidsynth through jack-rack seems a lot more responsive too; less latency,
> > even though latency was already quite low. The exception here is
> > LinuxSampler which has a little  bit of a lag, understandably.
> >
> > Couple issues:
> > 1) At Fons's suggestion, I had to add "LDFLAGS += -shared -nostartfiles" to
> > the debian/rules of CAPS 0.4.3 to get it to build.
> >
> > 2) Fluidsynth is acting very strangely. It "gets jealous". If I'm playing
> > another synth, which is demanding a lot of CPU, Fluidsynth throws a tantrum
> > and sucks up spikes of 80% CPU (according to top). AZR3 does this too
> > sometimes. Why is that? Why would a synth be sucking up tons of CPU even if
> > no MIDI data is going into it? Is it getting starved by the others.
> I had this issue with most all synths, both on Windows (I paid good cash for 
> them!) and on Linux. Timidity is an example.
> After discussions with the authors of the Windows synths: they must be 
> programmed to drop resources when idle. Otherwise, their code has no way of 
> knowing when it is "off-line" or idle. One of them, I forget which, did this 
> after we discussed it.
> >
> > 3) Volume levels on AZR3 are sane now, for the first time ever, which
> > suggests maybe it had a denormal issue in there which one of those
> > optimization flags might have fixed.
> >

I only recompiled the programs I listed above (or somewhere in this thread, I don't recall where). The big CPU pigs are the LADSPA plugins, by far, with CAPS AMP VTS being the top of the list.

LinuxSampler is stunningly efficient. Fluidsynth is pretty good too, though it makes me nervous for some reason. Both are playing samples rather than doing heavy math; it's the LADSPA plugins that are crunching numbers.


More information about the Linux-audio-user mailing list