[LAU] AMD Ryzen Processors for Linux audio

Len Ovens len at ovenwerks.net
Mon Apr 20 20:17:27 CEST 2020


On Mon, 20 Apr 2020, Ede Wolf wrote:

> That would basically mean i3. Few cores, fast clocks and available 
> without graphics and without hyperthreading. But of course there are

I would choose i5, four cores and four threads. The i3 is two cores four 
threads leaving the user needing to change bios to switch threads off. 
(well this was true when I bought my i5, the new i3 - i9 has changed) If 
you check your interupts, most likely you will find that your audio device 
has all the interupts on one core. Properly designed audio software can 
use more than one processor just fine.

When I was actually testing if hyperthreads affected latency, I found 
turning HT off alowed less than 64/2 (jack setting) with no xruns 
(assuming proper system tweaking) but with HT on there were at least the 
odd xrun even at 64/2. CPU speed is even more important it seems. there 
seems to be no problem with the cpu going up in speed, but if the cpu 
desides to lower the speed with the cpu governor, I often see xruns at 
that point. Both intel and amd play with core speeds to get best 
performance within cpu temperature limits. I have found a more stable 
operation even with cpu speed forced to it's lowest speed (.8Ghz) I have 
seen no xruns even with jack set less than 64/2 over a 24hour period... 
though of course the amount of dsp time available suffers.

So setting the governor to performance is a good start. However, both 
intel and amd also have what intel calls "boost" where if the cpu load is 
high and the temperature allows, the cpu will take one of more core above 
rated speed... this is true even in performance mode. So turn off boost or 
it's amd equiv. From reading amd literature, they do more playing around 
with cpu speed than intel so I don't know easy it is to get their cores to 
run at one speed only. But turning Boost off on my i5 does makes a 
difference at low latency settings. It may also be possible to set 
performance mode at higher than rated speed all the time if you have the 
right cooling... but some way of monitoring cpu temp would be advised.

[edit] I now remember what I was reading about amd cpu from their 
documentation. Their claimed CPU speed is based on allowing cores to run 
at various speeds. So the top documented speed means one core going all 
out and the rest idling rather than the speed with all cores the same 
speed with 100% cpu load. So yes, amd cpu speed may be over rated. I did 
read this two or three years ago, so check the documentation for the 
actual CPU you wish to buy/use.

see this site if you would like to compare some of the cpus out there for 
realtime schedualing latency with different setups:
https://www.osadl.org/Hardware-overview.qa-farm-hardware.0.html

It would be a great idea to compare how intrusive cpu SMIs are from intel 
to amd. Intel does allow turning some SMIs off... which does kill your 
waranty :) I don't know how controlable the SMIs are on amd cpus. I also 
don't know if motherboard manufactures taylor the BIOS towards AMD as 
much.

(have I said I don't know enough times?)


--
Len Ovens
www.ovenwerks.net


More information about the Linux-audio-user mailing list