Topic: multicore rendering and performance

Hello,

I'm currently trying out the demo on Linux via Wine.  It is stable and seems to perform well, as long as I DO NOT enable "multicore rendering."  As soon as I enable it, I get "cpu overload" all over the place.  However, when disabled, I can easily acheive 128+ note polyphony.

Hardware:
Intel Core 2 Duo 1.5ghz
2gb ram
Intel integrated "high definition audio" (I just ordered an Echo Audiofire2)

My performance monitor shows my cpu cores working normally at about 10-30% of capacity to render even complex entries.  The little cpu load percentage monitor in Pianoteq shows about a 15-25% range for the default Bach Prelude No 1.  If I turn on multicore rendering, it jumps to 50-70% with transient spikes that cause overload.  Looking at my system monitor confirms cpu usage spikes with multicore rendering enabled.

Anyone else have any similar experience?  Thoughts/suggestions/hypotheses?  My guess is it is specific to Linux/Wine.   Here is my current hypothesis (could be full of crap, but still putting it out there):

By default, Pianoteq through Wine in Linux has access to both cpu cores.  By enabling multicore rendering, we are actually asking Pianoteq to address each core twice, which accounts for the spike in load.

Re: multicore rendering and performance

Hi Ethany

I'm not immensely techie but getting better every day - but I've had the same problem using pianoteq 2 (grand c1 medium) Logic 8 and Dual core imac Problem is solved by disabling multicore rendering and I simply do not understand it. Hope you've managed to sort it out by now!

Re: multicore rendering and performance

On an AMD 2.2 GHz dual core running XP, there is no such problem. With the new version, I think the microphone model may actually be running on a separate thread because if I use the preset with 4 microphones, as soon as I start to play, the second cpu cranks up from its 2% position and may go up to about 20-25% so that the total is around 35-40%. In a binaural preset for example, the total rarely exceeds 25-30%.

The first cpu running the main event loop (I suppose) idles continuously around 10-15% and at that moment the display on the pianoteq GUI goes down to 0%.

Multicore is implemented differently in AMD and Intel, I guess. It works really well on AMD for pianoteq. For example, with version 2, I ran pianoteq with a cpu intensive reverb under Cubase and each used its own core in parallel. But convolution reverbs don't work well on AMD, so nothing's perfect...

Actually the new version shows quite an improvement regarding parallel processing..

Re: multicore rendering and performance

On Intel dualcore actually works way better than AMD. When I have disabled dualcore processing in Pianoteq, I get 15-50% higher CPU load, because only one core is taking all the work. When it's enabled, both cores do their job equally, and more effectively.

Of course, I'm on windows. So I'd say your Wine is acting up on that setting.

Hard work and guts!

Re: multicore rendering and performance

hmmm, thanks for the thoughts and confirmation everyone -- it looks like an issue specifically with Wine.  I will try to find some time to post a bug ticket to Wine.  This could be a big opportunity for some more performance optimization!

In the mean time, Pianoteq standalone is working great, and I haven't hit any performance ceilings yet under anything remotely close to normal playing circumstances.  I'm always surprised at how efficient the program is, especially when compared to other software instruments (synthesizers specifically)!

Re: multicore rendering and performance

I have been experimenting with 4 speakers through an Audigy 2 ZS multi-channel sound card that I also have and results are really interesting.

Even with cheaper speakers assigned to microphones 3 and 4, if you put the speakers in the same room position as the microphones are with the standard 4 microphones positionning (optimized for standing waves, I presume), the sound field is much closer to headphone listening...great job!

The reason I post this under multicore rendering, is also to report that I get wrong  "Detected CPU frequency" in the Options panel, last one was 12668 MHz.

When I first started using version 3, this value was more accurate, showing around 2200 Mhz the value for one core, but now it shows varying unreasonable high values constantly.

Maybe a bug with the Pianoteq30.prefs file ?

The CPU identification is ok:  AMD Athlon 64 X2 Dual Core Processor 4200+

I also found out that the so-called idle speed that I reported before on one of my cpus is probably caused by the Tascam US-122 ASIO driver, because there is no such CPU usage at idle with the Creative ASIO driver! So PTQ is quite right in displaying 0% at idle...

A last remark, the GUI takes a lot of time to disappear when quitting, maybe an hourglass would prevent us from thinking it's frozen.

Little things, but I am still amazed at the quality of the new version!

Re: multicore rendering and performance

You are lucky

My T9300 at 2.50 GHz is detected at only 872 MHz

Re: multicore rendering and performance

Hi Gilles,

A wrong cpu frequency estimate should not alter the behaviour of pianoteq. It is possible that installing "AMD Dual-Core Optimizer Version 1.1.4" ( http://www.amd.com/us-en/Processors/Tec...18,00.html ) would fix that ( I'm not sure, though)

Pianoteq should not be slow to quit, since it is doing nothing special. It could be that your soundcard driver (or midi driver) is slow to close ?

Re: multicore rendering and performance

ldeza wrote:

My T9300 at 2.50 GHz is detected at only 872 MHz

This is more usual: your cpu was running in low power mode when ptq was started , so it measured the reduced frequency of the low power mode. Disabling energy-savings should fix that (and may prevent cracklings if the cpu decides to switch into low power while you are playing)

Re: multicore rendering and performance

julien wrote:
ldeza wrote:

My T9300 at 2.50 GHz is detected at only 872 MHz

This is more usual: your cpu was running in low power mode when ptq was started , so it measured the reduced frequency of the low power mode. Disabling energy-savings should fix that (and may prevent cracklings if the cpu decides to switch into low power while you are playing)

Thanks for the answer But it was in high performance mode

This seems to be a bit erratic.

My power saving settings are

100% processor at high performance

50% processor at power saver

Just run 3 tests with each option closing and restarting Pianoteq 3 x64

HP: 2494, 539, 2494

PS:996, 340, 722


Now repeating the operation

HP:2380, 517, 843

PS:607, 436, 514


Hope this helps

Re: multicore rendering and performance

well..

* scratching my head *

I'm running out of explanations !

Re: multicore rendering and performance

julien wrote:

well..

* scratching my head *

I'm running out of explanations !


But I do not mean that there is a problem in the performance of Pianoteq, just the number displayed.

In HP the CPU reported use is usually lower than 10%.

In PS below 30%


Anyway the CPU identification is right, so why is needed the second part (detected CPU frecuency)? To show the user that the CPU is not used at full speed?

Re: multicore rendering and performance

julien wrote:

Hi Gilles,

A wrong cpu frequency estimate should not alter the behaviour of pianoteq. It is possible that installing "AMD Dual-Core Optimizer Version 1.1.4" ( http://www.amd.com/us-en/Processors/Tec...18,00.html ) would fix that ( I'm not sure, though)

Pianoteq should not be slow to quit, since it is doing nothing special. It could be that your soundcard driver (or midi driver) is slow to close ?

It looks like a random initialization error; I quit then started again, and got a negative value! So I quit without doing anything and started again and now I get a correct value (2201) which seems stable now. There was no effect on the behavior.

The slow closing is also a bit random. The first time I closed without doing anything, it was instantaneous. The second time, without doing anything again, the display took maybe 5 seconds before disappearing, leaving an empty window which then went away. This behavior is the same with both my drivers.

I mentioned it because version 2.3 always went down instantaneously.

Again, no crashing or anything, just bizarre behaviour. There is more memory to be released than version 2.3 but this should not matter. I have 2GB installed.

Re: multicore rendering and performance

Just to add more confusion


Just tried with my desktop PC, a core 2 duo 6600 at 2400 MHz

5 times and always perfect, 2400


Regards

Last edited by ldeza (23-02-2009 23:03)

Re: multicore rendering and performance

as far as I know, it is not an initialization error, but difference between the local clocks of the two cores, they are not synchronized so if the windows scheduler moves the thread from one core to another during the frequency measure, you can obtain any value, even a negative one. It is something the amd prog is supposed to fix (never tried myself , we don't have dual-core amds here)

Maybe should I remove the cpu freq estimation as it is raising many questions for which I don't have definive answers

Re: multicore rendering and performance

That looks like a good explanation. In fact version 3 doesn't always start on the same core as 2.3 did! Sometimes (rarely) it uses only a single core.

Another AMD quirk I guess...I'll give a try to the Optimizer you mentioned.

Maybe this also explains the slow shutdown.

Thanks!

Re: multicore rendering and performance

hmm, Pianoteq 3 seems to be detecting my processor and max frequency correctly.

i don't think i am going to report a bug in Wine, though, here's why:

My system monitor shows both processors under load when running Pianoteq through Wine with "multicore rendering" option disabled.  i think Pianoteq broadcasts a "single processor" signal out to Wine, which then translates it to Linux as a dual processor signal.  so my guess is when the option is enabled, it's just doubling the processor load without any real performance.  pianoteq locks up very quickly and i have to force quit and restart (i noticed Pianoteq now has crash detection .

so maybe it has "multicore rendering" already without that option enabled by the design of how Wine interfaces with the Linux O/S.  Maybe i'm wrong though and there is a bug that could increase performance if fixed...

ethan

PS VERY NICE upgrade to the VST interface!!!!  It now responds fully in real-time, which makes it just as usable for tweaking under Linux as the Standalone program!!  (previous versions the display did not update correctly in VST mode, so i had to do all sound tweaking in Standalone and then import the fxp to the VST)

Re: multicore rendering and performance

I am not surprised that wine has issues with multicore rendering, this is something that is very demanding on the scheduler, and as wine is just a layer above linux, it is hard to ask it to mimic the windows behaviour. Especially if you are using stuff like wine-asio.

However if you are satisfied with single core perf. I would suggest that you do not lose too much time with multicore !

Re: multicore rendering and performance

This CPU frequency reading is not only happening on AMD. I have an Intel E4400 @2.2 GHz and I get various readouts too, as I said in betatest phase. Currently it's on -12000 Hz

Hard work and guts!

Re: multicore rendering and performance

I am happy to see the polyphony metering where I can hit a single note, then do a short passage and watch as the poly doesn't climb until many notes, and sos or sustain pedals come into play.
With most Piano libraries it is alarming to watch the polyphony sky rocket from the massive amounts of layers that my controller cannot even possibly access.
I have multicore rendering on an E8600 DAW and hardly see a CPU hit.
I have always used Scope DSP cards to avoid being a slave to a CPU.
So most of my CPU cycles go to romplers, Giga and Modartt.
I have played for 2 days, and today I will report back with results of disabling the reverbs, etc.
I route hardware effects into my projects because I hate the sound of IR's and see no need to waste CPU cycles on them.
There's a possibilty I might keep different IR's on the Grand, Upright preset, Rhodes and Wurly though, as they sound pretty good and I can apply a splash of the PCM91 to all of the above while altering their Early reflections and mic placements. They are all on the same channel so this might be necessary.
GigaPulse's Pedal Down IR's were all I ever used before, so I will definately be saving cycles by removing those libraries.
Many developers of gigantic romplers are probably watching Modartt with a cautious eye.
These same developers offer no sostenuto pedal, or a Harmonic pedal,...they need tons of HDD space, lot's of RAM, quad core CPU's, etc.etc.......and here comes the low power laptop masterpiece which has to make them nervous. But then again, many rompler lovers seem to enjoy all of the pictures and dozens of layers that can only be accessed by a sequencer editing pass.
I happen to love all of them, but I will be using P3.0 for my live work, and I finally have a 3rd hand thanks to the sostenuto feature, which the rompler developers don't think is necessary.
That little trade-off choice just might come back to bite them in the arse....

Hardware Analog, DSP, PhysMod. VSTi Romplers....

Re: multicore rendering and performance

teamsterjim wrote:

I route hardware effects into my projects because I hate the sound of IR's and see no need to waste CPU cycles on them.

Try RaySpace, it's a realtime modelled space reverb... you can draw your own room and some crazy stuff... I find it realistic and a good companion to Pianoteq. And it's VERY cpu-effective, in contrast to convolution reverbs!

Hard work and guts!

Re: multicore rendering and performance

julien wrote:

as far as I know, it is not an initialization error, but difference between the local clocks of the two cores, they are not synchronized so if the windows scheduler moves the thread from one core to another during the frequency measure, you can obtain any value, even a negative one. It is something the amd prog is supposed to fix (never tried myself , we don't have dual-core amds here)

Maybe should I remove the cpu freq estimation as it is raising many questions for which I don't have definive answers

You were right, Julien! I installed the dual core optimizer and now I the get correct frequency each time. I notice also that there seems to be less parallelism when looking at the task manager graphs, but total cpu usage is the same as before.

Probably, as was already mentioned, multi-core rendering of pianoteq is better with Intel Core 2 duo. Doesn't matter, it sounds great!

I still have the slow shutdown most of the time, maybe other AMD users could confirm if they have the same behavior.

Re: multicore rendering and performance

While Julien is in a bug-chasing mood, I would like to recall the curious 5 second delay I get when closing ptq3 (Windows 32 bits) on a double-core AMD. It is a random bug, but it happens I would say 80% of the time. I uploaded a short video on picasaweb to demonstrate this:

http://picasaweb.google.ca/gllsprs/Pian...L8qZCP9gE#

(Please display in high quality on a normal size window for best results)

The reason I mention it is that there were also quitting bugs reported on the Linux version and I thought it might be related.

As far as I can see, my keyboard doesn't issue MIDI events if I don't play.

I get the problem with either of my two soundcards (Tascam US-122 or Creative Audigy 2 ZS) so it is not a driver problem.

I get it also if I disable multi-core rendering and I use the AMD dual-core optimizer.

As soon as I hit the quitting icon, cpu usage goes down and memory is released.

I just don't understand why the GUI takes another 5 seconds to go away.

Is it a threading problem? Or a quirk with JUCE on AMD?

Re: multicore rendering and performance

maybe you could try to uncheck all midi devices in the pianoteq options/device panel, and see if it still slow to quit. That would be a good hint. You can also select "none" as the audio output and see if it helps ? If not, then you can try to uncheck multicore rendering ?

Re: multicore rendering and performance

Well, Julien, you were right again! If I uncheck all MIDI input devices and play with the included keyboard, the problem goes away. If I use the current MIDI input port correctly, everything is fine.

The thing is I was lazily checking "Listen to all midi input" instead of the current MIDI port I am using (Tascam or Audigy).

This is probably the origin of the delay, and maybe it exists also on non-AMD cpus if many soundcards are available.

Thanks!

Re: multicore rendering and performance

Gilles wrote:

This is probably the origin of the delay, and maybe it exists also on non-AMD cpus if many soundcards are available.

Thanks!

I have an Intel Pentium M 1.86GHz, single core CPU, single soundcard Edirol UA25 and I get the quitting "bug" too.  I'll check when I'm at home which MIDI inputs PTQ is set to listen on.

Best//Neil

Re: multicore rendering and performance

Yes I would like to know which midi input is causing that "slow quit" bug, that would be interesting (especially if it is the same midi input for both of you)

Re: multicore rendering and performance

I just added in the same picasaweb album an image of my choice of midi inputs in ptq3.