raboof / realtimeconfigquickscan

Linux configuration checker for systems to be used for real-time audio
GNU General Public License v2.0
260 stars 26 forks source link

Detect if Intel CPU has Hyper-Threading Enabled #27

Closed wingedrhino closed 2 years ago

wingedrhino commented 5 years ago

It's recommended to disable HyperThreading for more consistent realtime performance. So the realTimeConfigQuickScan.pl script should check for that.

I found a shell script to do the same on Unix StackExchange here: https://unix.stackexchange.com/a/121989/149056

I can confirm that the above script works. If I get time I'll try to convert it to Perl (which I haven't used for ~5 years so a bit rusty now) and submit a pull request. Otherwise someone else can take this up!

raboof commented 5 years ago

Sounds good to check for it!

Hard to say if it is always the right choice to disable it though - I can imagine on some workloads the hyperthreading might achieve higher throughput at still-acceptable latencies.

Do you have and good insight/resources on this?

wingedrhino commented 5 years ago

You're right. It probably depends on the sort of workloads we run.

It's just a suggestion I've seen thrown around online in a bunch of places and I'm yet to verify on my 2-weeks old Ubuntu Studio setup. Logic indicates that if your system doesn't have a very high CPU load, disabling HT shouldn't cause any problems and your latency would be reduced.

But, I think the script itself should still check for this and explain to the user that they should try and disable HT and see if it reduces the number of XRuns.

I've designated the next weekend to monkey around with my current setup and I'll try and see whether my own workload benefits from disabling Intel-HT. Usually I can only record one instrument at a time - it's either a guitar (goes through a processor first and then has some effects added on the laptop), a vocal mic (usually just reverb, delay, distortion, pitch shift or octave effect added) or a midi keyboard (chained through a few different apps).

raboof commented 5 years ago

I think the script itself should still check for this and explain to the user that they should try and disable HT and see if it reduces the number of XRuns

Agreed!

I'll try and see whether my own workload benefits from disabling Intel-HT

Would be interesting to get more data on this indeed!

raboof commented 2 years ago

This project has been rewritten and moved to https://codeberg.org/rtcqs/rtcqs - I'll close this issue here