ppy / osu-stable-issues

Report critical osu-stable issues here
60 stars 11 forks source link

Lag with game mode and background apps #1166

Open its0ka opened 11 months ago

its0ka commented 11 months ago

right after osu.exe spawns it has process priority id of 13=high, then it changes to 8=normal after i make the window active and after i switch to another window, osu priority changes to 13=high. This doesn't seem right at all to me. Why osu works at normal priority during use and switches to high when inactive? video: https://drive.google.com/file/d/1JwD7gtfogeGaJJElikT012QrvTh2ECu9/view?usp=sharing im (also my friend) so tired of stutters and im trying to understand where they come from

its0ka commented 11 months ago

saving high priority with process informer allows me to play even while stress testing the cpu. Without saving high priority osu is very stuttery

its0ka commented 11 months ago

i downloaded osu from 2015 and it's the same there. devs please make high priority always on, not only when osu window is inactive or minimized, the experience is so much better with it

peppy commented 11 months ago

osu! does not change process priority, beyond setting ProcessPriorityBoost and PriorityClass=High.

Something else on your system might be doing this.

its0ka commented 11 months ago

@peppy nothing is running on my PC except bare windows and it's still the same, also tested on my friends computer https://drive.google.com/file/d/1KJ4tGOwo-RMOsa5yY4BeK1MXQH4qvf_-/view?usp=sharing i used this powershell command while ($true) {wmic process where "Name='osu!.exe'" get priority; sleep 1}

peppy commented 11 months ago

What you are seeing here is normal and correct behaviour. osu! is benefitting from game mode. In this mode, osu! gets a dedicated CPU, so "process priority" becomes meaningless. Windows will set it back to "normal" in this case. You can test by disabling game mode temporarily (although make sure to set it back – it's very beneficial to have on).

Again, this is normal and good. I'd go as far as saying any benefit you are seeing from your manual override is either due to running such an expensive tight-looped script causing your CPU to behave definitely, or placebo.

its0ka commented 11 months ago

@peppy ok, it really was game mode messing with priority, but it doesn't help at all, the game stutters while i use discord in the background until i save priority.

I enabled Game mode and made this vid: 0:00 only osu is running, good frametime 0:10 started CPU stress testing (linpack), frametime is very bad after starting 0:55 started CPU stress testing with System Informer priority saving, frametime is good https://drive.google.com/file/d/1br9Jroi2BkEzKpkrsxr21gDubB6WTgNf/view?usp=sharing

and as you can see system informer only uses ~1% of cpu

its0ka commented 11 months ago

also after disabling game mode osu always uses high priority and doesn't stutter at all while i stress test the cpu. (works better without game mode than with it)

peppy commented 11 months ago

do you have discord game hooks turned on (overlays etc.)?

its0ka commented 11 months ago

discord overlay (and presence) is disabled and i don't have any other overlays

its0ka commented 11 months ago

it's not only discord and cpu stress testing utility. https://www.youtube.com/watch?v=LXb3EKWsInQ in the background with game mode on: both video and osu stutter game mode off: only video stutter (osu frametime is perfect)

also i rebooted after changing game mode

peppy commented 11 months ago

You're doing very unconventional tests. Decoding a video at the same time as running a game is not a great test. The video playback could for instance also be getting game mode preference due to GPU acceleration requirements.

If you think you have better time with the settings you have, then go ahead and use them. For the average user, game mode is definitely optimal. I've tested this multiple times in the past to be the case.

While you're testing, you should probably also test lazer and see how that behaves for you, since it already has more stable performance than stable in the majority of cases.

its0ka commented 11 months ago

Decoding a video at the same time as running a game is not a great test

it's great because a lot of people stream osu in discord. my friend is one of them and it's not convenient at all for him to play with stutters while streaming. my game also stutters when i watch his stream in the background

If you think you have better time with the settings you have, then go ahead and use them

i don't think, it's clearly visible on the video, and i guess it affects all people with low-end computers

For the average user, game mode is definitely optimal. I've tested this multiple times in the past to be the case.

can you do it again? maybe windows update changed game mode (and ruined it for me), i don't remember such stutters a year ago

its0ka commented 11 months ago

partially tested lazer: game mode doesn't matter at all, stress testing the cpu makes the game very stuttery, but after saving high priority stutters disappear, so, it's very similar to stable

its0ka commented 11 months ago

i would rather have my discord stream (or any other background task) stutter than osu. People quit the game because of this. (same with multiplayer and slow downloads) "osu stutters" and "slow downloads" are very popular thread names on the forum also i spent too much time following useless (sometimes harmful) advice on youtube and forums to get rid of this issue

its0ka commented 11 months ago

also

game mode. In this mode, osu! gets a dedicated CPU

this is clearly not the case for me and my friends, or background processes (linpack,discord,chrome) steal that dedicated CPU for themselves.

also this is how osu utilizes my CPU (i have 4/4 core cpu so 25%=100% of 1 core) image

peppy commented 11 months ago

Please edit previous post rather than posting many times in a row.

All I can say at this point is that your methods and assumptions on data that you're seeing are very incorrect. I'll report back after confirming everything looks okay from our end.

peppy commented 11 months ago

We have tried to reproduce using your testing methods but can't make any kind of slowdown happen. So this is likely software/hardware dependent. That said, with at least one other user reporting the game thing it's clear we should take action, so I've rolled out a hotfix for now. Please set your game mode setting back to on and switch to this release.

Also please don't close this issue thread, I'll provide ongoing feedback if we learn more.

its0ka commented 11 months ago

No stutters after updating! Thank you. Game mode ON and priority always stays at 13 now.

I have an intel i5-3330 (2012) and my friend has a ryzen 2100ge (2018) and it was the same for both. What hardware and software did you use to reproduce? im asking because linpack doesn't work on amd cpus

before and after: https://drive.google.com/file/d/15W1224RmCHN8Dq6dzoFrruUAtbWpxENf/view?usp=sharing