Topic: Performance scaling across cores

Hi everyone,

I'm looking to spec a device to use specifically and exclusively for Pianoteq, and am trying to understand how performance scales across cores.

For reference, I'm currently using Pianoteq 7 with a late 2013 MacBook Pro (dual core i7 4558U), and find that I'm unable to get the level of polyphony that I'd like with the latencies I'd like (generally, I prefer < 4ms, and would love to be able to have the option to run at minimum latency if desired).

What I'm curious about is how things scale with core count. To what degree is Pianoteq able to meaningfully take advantage of more cores, and in order to do so, does one need to sacrifice latency in order to saturate them?

To put the question a bit differently, how well does performance scale across threads, and what's the return on investment for more cores vs more single threaded speed? Obviously, single threaded performance will scale linearly - how close to linear is adding cores, and at what point does one reach diminishing returns in terms of core count?

In terms of my use case, I'm an ex-professional pianist so I'm quite demanding in terms of what I want (polyphony, latency, bitrate etc.)

Thanks for your advice!

Last edited by thesloth (03-12-2020 20:21)

Re: Performance scaling across cores

I can't speak for Windows or Linux users but on Mac I have two scenarios with the standalone version that make me think that 4 cores (8 cores hyperthreads) is a good combination. On a 2013 Mac Pro with latency 1.3 ms (64 samples at 48KHz) only 4 cores are ever used for a normal preset and 16 threads are running. On a 2019 MacBook Air with a 2 cores (4 hyperthreads) all 4 cores are used all the time. Only when I run a layer preset (with the maximum 3 instruments) do all 8 cores on the MacPro show (mostly even) activity and the thread count goes to 19. Organteq in comparison, always uses all 8 cores on my Mac Pro.

I'm sure using multiple instances of Pianoteq in a DAW can benefit from more cores though.

Last edited by Gilles (04-12-2020 00:21)

Re: Performance scaling across cores

Gilles wrote:

I can't speak for Windows or Linux users but on Mac I have two scenarios with the standalone version that make me think that 4 cores (8 cores hyperthreads) is a good combination. On a 2013 Mac Pro with latency 1.3 ms (64 samples at 48KHz) only 4 cores are ever used for a normal preset and 16 threads are running. On a 2019 MacBook Air with a 2 cores (4 hyperthreads) all 4 cores are used all the time. Only when I run a layer preset (with the maximum 3 instruments) do all 8 cores on the MacPro show (mostly even) activity and the thread count goes to 19. Organteq in comparison, always uses all 8 cores on my Mac Pro.

I'm sure using multiple instances of Pianoteq in a DAW can benefit from more cores though.

Thanks Gilles for that - so it seems that at least in your experience, 4 physical cores is a sweet spot for a single Pianoteq voice, and more cores are only really relevant when there is more than one voice layered in.

Do you find this usage varies at all with polyphony? I'm wondering how very high levels of polyphony affect this. To be clear, I don't mean the Pianoteq setting for polyphony but rather the actual number of tones being calculated in any one moment.

Last edited by thesloth (04-12-2020 15:28)

Re: Performance scaling across cores

I assume that by voice you mean a preset. As far as I know, the polyphony setting corresponds to the number of notes of the preset allowed to play at the same time, these notes of course have many harmonics to be computed and interact with currently sounding ones. I usually set polyphony to 256 and, even on my MacBook Air dual core i5 with slightly higher latency (128 samples, 2.7 ms) keeping the sustain down and running fingers up and down the keyboard until I reach 256 doesn't result in crackles. I think recent cpus, even not the fastest ones, will run Pianoteq standalone without any restriction to your musicality.

Rendering dense MIDI files of Liszt or Rachmaninoff, I only noticed surpassing 256 when using the 3 layer preset I posted about somewhere else. That was the equivalent of 3 pianos playing the same piece, and then using Auto polyphony is necessary to avoid overload.

Regarding latency, I'm referring to the value showed in Pianoteq Options. As was discussed somewhere else, the final total latency including the whole chain of events may be larger. In my case, I don't notice any latency with these settings of 64 or 128 samples.

Last edited by Gilles (04-12-2020 17:34)

Re: Performance scaling across cores

Gilles wrote:

I usually set polyphony to 256 and, even on my MacBook Air dual core i5 with slightly higher latency (128 samples, 2.7 ms) keeping the sustain down and running fingers up and down the keyboard until I reach 256 doesn't result in crackles.

Interesting, because my CPU should be a bit more powerful than your dual i5 and I get crackles all over doing a similar test even with 4ms. I don't think it's background processes as everything's closed when I run Pianoteq, so I wonder what the difference might be.

Re: Performance scaling across cores

thesloth wrote:

I wonder what the difference might be.

Forgive me if this is irrelevant on Macintosh, but... the audio interface, its drivers and/or its communication channel to the computer?

At least on Windows, with ASIO, the buffer size in the Pianoteq options is the buffer size in the audio interface drivers.  I suspect the interface, its drivers and the communication channel (e.g., USB, Firewire, Thunderbolt and the associated chips and drivers) are a significant factor once the CPU is sufficiently powerful that Pianoteq itself isn't overloading the system.

If you two are using different audio interfaces, it might be those -- and not the CPUs or core counts -- that are making the difference.

Re: Performance scaling across cores

thesloth wrote:
Gilles wrote:

I usually set polyphony to 256 and, even on my MacBook Air dual core i5 with slightly higher latency (128 samples, 2.7 ms) keeping the sustain down and running fingers up and down the keyboard until I reach 256 doesn't result in crackles.

Interesting, because my CPU should be a bit more powerful than your dual i5 and I get crackles all over doing a similar test even with 4ms. I don't think it's background processes as everything's closed when I run Pianoteq, so I wonder what the difference might be.

Yes, I checked afterwards and your 2013 i7 is about the same as my 2019 i5, or slightly faster. I admit I did the test on the virtual keyboard (because I only use the MacPro for playing) so, to check, I plugged into the MacBook a USB keyboard using the internal sound and I got some crackles at 256... Reducing the polyphony to 128 corrected it though. Indeed, maybe the drivers of your audio interface, if you use one, could reduce the capabilities by using some cpu or increasing latency.


EDIT: I just updated to 7.0.5 and now there are only two cores used on the MacBook Air, not four like 7.0.4. There are also a bit fewer threads. Changes talk about reducing memory consumption so I guess this was done by also reducing parallelism a bit...I guess the best long term bet is faster cpu rather than more cores.

Last edited by Gilles (07-12-2020 02:42)

Re: Performance scaling across cores

Gilles wrote:

EDIT: I just updated to 7.0.5 and now there are only two cores used on the MacBook Air, not four like 7.0.4. There are also a bit fewer threads. Changes talk about reducing memory consumption so I guess this was done by also reducing parallelism a bit...I guess the best long term bet is faster cpu rather than more cores.

Looks like something Apple Silicon based (pending a native update) is going to be a winner in that case. Perhaps I'll get a Mac Mini to dedicate to Pianoteq duty.

It would be nice to have some sort of little benchmarking tool for Pianoteq - the 'performance index' doesn't really give me anything terribly meaningful.

Last edited by thesloth (09-12-2020 17:48)

Re: Performance scaling across cores

There's an old thread that took a thorough look at Pianoteq on different hardware. Basically, there's a big jump in performance when going from 1 to 2 cores, after that the performance boost from more cores is insignificant. Newer generation CPUs are better than older ones. Though nowadays, anything 5-6 years or older will probably work just fine.

Pianoteq benchmarks -- performance across various hardware
https://forum.modartt.com/viewtopic.php?id=4149


FWIW - I run Pianoteq on an old 2013 MacBook Air with no problems.
CPU: mobile 1.6Ghz Dual-Core Intel i5.
Host/Internal Sample rates: 48Khz/48Khz
Buffer: 192ms 4.0s
Max Polyphony: Auto (Optimistic). This last one Auto (Optimistic) seems to have the most effect on glitches that I've experienced.
Performance Index: 82-107

Last edited by Groove On (10-12-2020 14:54)