Better Pianoteq performance on the Odroid N2+

Post Reply
Groove On
Posts: 13
Joined: Thu Sep 21, 2017 12:12 pm
languages_spoken: english
ODROIDs: Odroid N2+
Has thanked: 4 times
Been thanked: 2 times
Contact:

Better Pianoteq performance on the Odroid N2+

Post by Groove On »

I was able to get a very nice performance boost from Pianoteq on the Odroid N2+ by assigning the 4x high-performance cores to Pianoteq and leaving the 2x low-performance cores for the Ubuntu-MATE OS.

This is how to assign the 4 cores to Pianoteq on startup (2,3,4,5 are the 4x high-performance cores).
taskset -c 2,3,4,5 'Pianoteq 7 STAGE'
When Ubuntu-MATE was doing the core load-balancing, it did a poor job. Ubuntu-MATE mostly overloaded the first 2x low-performance cores and under-utilized the 4x high-performance cores (grrrr ...). Eventually it would re-distribute the load to the other cores, but for live music, it was too slow. By the time it figured out there was an "intense musical event" happening, it was too late, the moment had passed. Performance in Pianoteq was sub-par, the program was always gasping for air.

After the 4x cores are assigned to Pianoteq, it gets super-charged, performance sky rockets. There are still polyphony limits with the Odroid N2+/Amlogic chip, but for everyday playing and performance Pianoteq runs better on the Odroid N2+ than my 2013 MacBook Air (i5-5250U).

Here's the normal core load-balance with Pianoteq and Ubuntu-MATE's default load-balancing. Notice the 1st low-performance core is overloaded. Image

Here's the core load-balance with Pianoteq assigned to the 4x high-performance cores (CPU3,4,5,6). Notice the high-performance cores have a nicely distributed load. Also notice the first 2x low-performance cores are free to attend to OS requests.
Image
Last edited by Groove On on Fri Mar 19, 2021 3:14 pm, edited 9 times in total.
These users thanked the author Groove On for the post (total 2):
odroid (Fri Mar 19, 2021 4:39 pm) • m_ueberall (Fri Mar 19, 2021 4:41 pm)

Groove On
Posts: 13
Joined: Thu Sep 21, 2017 12:12 pm
languages_spoken: english
ODROIDs: Odroid N2+
Has thanked: 4 times
Been thanked: 2 times
Contact:

Re: Better Pianoteq performance on the Odroid N2+

Post by Groove On »

Here's a comparison of the internal Pianoteq Performance Index, before and after assigning cores.

Before assigning cores to Pianoteq, the program is gasping for air. Take a look at the Performance Index/Audio Load graph. The blue line represents overall CPU availability, in real-time, that line keeps fluctuating between 18-35, depending how Ubuntu is feeling. The orange graph represents the audio load, as you can see it's exceeding CPU availability. RED lines are basically x-runs/drop outs.

note: I'm running Pianoteq full blast, with all the settings at MAXIMUM.
Image

After assigning cores, Pianoteq runs solidly at a Performance Index of 34 with only small fluctuations (30-35). Notice the blue line is pegged to the top of the graph, which means CPU cycles are readily available for Pianoteq. In real-time, the blue line basically stays there, only rarely dropping a few points. Notice the orange audio load is more efficiently managed and well below the blue line. There are still occasional x-runs, but rare. The main limit is polyphony. The Odroid N2+ performs solidly up to around 128 polyphony, above that, it begins to run out of gas.

note: I'm running Pianoteq full blast, with all the settings at MAXIMUM.
Image

Groove On
Posts: 13
Joined: Thu Sep 21, 2017 12:12 pm
languages_spoken: english
ODROIDs: Odroid N2+
Has thanked: 4 times
Been thanked: 2 times
Contact:

Re: Better Pianoteq performance on the Odroid N2+

Post by Groove On »

To get an idea of what kind of performance to expect, I ran a musical stress test using "challenging" classical pieces. The Pianoteq/Odroid N2+ played very cleanly below 128 polyphony. But in pieces where the polyphony soars to 190+, the Pianoteq/Odroid N2+ crashed and burned. To get better polyphony performance would require something like a hexacore i5.

Here's an example with the 3rd Movement of Moonlight Sonata. Pianoteq is running full blast, with all the settings at MAXIMUM. Notice the Performance Index mostly stays pegged at 34, rarely fluctuating. There were only 5-6 minor x-runs/drop outs, not noticeable from the playback. notes: MIDI file is from the Yamaha Signature MIDI Collection. Performer is Scott Meek.


Here's an example with La Campanella where the Pianoteq/Odroid N2+ crashes and burns. Pianoteq is running full blast, with all the settings at MAXIMUM. The playback is clean up until 4:10 where the polyphony soars to 190+ and crashes the playback. notes: MIDI file is from the Yamaha Signature MIDI Collection. Performer is Liza Ali.


*** MORE MUSICAL STRESS TESTS ***
Full Playlist for the Pianoteq and Odroid N2+
https://www.youtube.com/playlist?list=P ... z0JrQRAfnF

User avatar
odroid
Site Admin
Posts: 37286
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1749 times
Been thanked: 1127 times
Contact:

Re: Better Pianoteq performance on the Odroid N2+

Post by odroid »

Thank you for sharing the information about how the 'tasksel' command is useful for musicians as well as engineers.
ARM's Big-Little architecture and Linux Kernel load balancing algorithm still seem to be quite unbalanced. ;)
A balanced audio sound quality from a XLR jack on the N2+ add-on board must be awesome though.
viewtopic.php?p=324736#p324736

BTW, consider overclocking the CPU clock from 2.2Ghz to 2.4Ghz to increase the number of polyphony to 200+ if 4GB system RAM is not a bottleneck.
https://github.com/mdrjr/n2_bootini/blo ... ni#L77-L85
These users thanked the author odroid for the post:
Groove On (Fri Mar 19, 2021 10:05 pm)

User avatar
rooted
Posts: 8490
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 740 times
Been thanked: 342 times
Contact:

Re: Better Pianoteq performance on the Odroid N2+

Post by rooted »

I added this to my ~/.bash_aliases on my XU4, it can easily be adjusted for any device.

Code: Select all

alias little='taskset -c 0-3 $f'
alias big='taskset -c 4-7 $f'
Then you just run a command:

Code: Select all

big someheavytask
little somelighttask
This has served me well for years :)
These users thanked the author rooted for the post:
Groove On (Mon Mar 22, 2021 4:43 pm)

Post Reply

Return to “General Topics”

Who is online

Users browsing this forum: No registered users and 2 guests