miniant-git / REAL

Reduce audio latency on Windows 10
MIT License
478 stars 20 forks source link

REAL Locking a CPU thread? #9

Open Luadih opened 4 years ago

Luadih commented 4 years ago

REAL version: v0.2.0

Describe the bug When REAL is open in the background or is open at the startup and then closed, it "locks" up a thread in the cpu, by now, i think its only a visual lock, but if it has a performance decrease it is a slight one at least in the benchmark i tested.

To Reproduce Steps to reproduce the behavior:

  1. Launch REAL
  2. Try to get the CPU Usage to max.
  3. Watch the CPU Usage in Task Manager or HWMonitor
  4. 1 Thread does not reach its max. usage

Expected behavior CPU Usage monitoring showing what it should (100% CPU Usage)

Screenshots https://prnt.sc/tsjr57

bthanl commented 4 years ago

Can confirm that this IS an issue. Performance decrease is definitely there. I've tested multiple times using various benchmarks and they all have similar results. My CPU is an i5 9600k which has 6 cores and the benchmark scores/results are around 5/6 of what they should be when REAL is not open.

It doesn't seem to be "locking" the core, just hogging it. Setting the affinity of a program to only use the core that is "locked" will result in that core having normal CPU usage, albeit programs obviously will run terribly.

skipfie commented 4 years ago

I can confirm this issue as well, getting low to no usage on core #9 on a 2700x benchmarking on cinebench with REAL running. Closing the program and restarting the PC "frees" up the core, and improves the benchmark by ~200 pts.

I've also noticed windows not sleeping due to the audio stream being used

indexftw commented 3 years ago

Same with 8600k. I get about 20% performance cut in all applications. Benchmarks, baking and games. It's not REAL issue but AudioClient3 thing. I don't think real dev can fix this.

Devocub commented 2 years ago

it's windows audio service + scheduler to blame. It does it to be able to maintain low latency. Good thing is to add notification about this in the app and balloon if it's trayed. https://forums.tomshardware.com/threads/1-core-not-working-on-amd-ryzen-3-3100.3763694/

xiiyuki commented 1 year ago

Has anyone ever found a fix for that?? I was literally using REAL for 1,5 years trying to find the culprit of why my CPU 0 doesn't randomly work

Devocub commented 1 year ago

@Oxi-nya Restart Audio service.bat

@echo off
net stop Audiosrv /y
net start Audiosrv /y
xiiyuki commented 1 year ago

@Oxi-nya Restart Audio service.bat

@echo off
net stop Audiosrv /y
net start Audiosrv /y

After restarting it will revert the buffer size, right?? considering that I'd restart Audiosrv while the program is running

Luadih commented 1 year ago

I don't use REAL anymore but something like this should be possible to use to launch REAL, loop till it detects REAL is closed, and then restart the audio service right? It should just need a few line changes I think

https://www.reddit.com/r/Batch/comments/po07ql/comment/hcychjw/?utm_source=share&utm_medium=web2x&context=3

Devocub commented 1 year ago

@Oxi-nya restarting audio service is like restarting pc but only audio is restarted. So things are at default if not rerequested by some program (for example osu reinitializes audio engine, if it had low latency thing it would reask system to make buffer small again. REAL doesn't reinitialize).

@Luadih the solution you provided is bad and messy. Don't use it. It can be added into REAL properly. This cpu core locking is windows bug - it should be fixed in first place.

Luadih commented 1 year ago

@Devocub Yeah, just meant for it to be a band-aid for people who want to use it and want to work around it using any way possible. REAL and Windows should include a fix for it. Though I don't know if REAL will get updated now, unless someone forks it and works on it.

EDIT: Changed like 3 words for a better meaning