osu-stable-issues icon indicating copy to clipboard operation
osu-stable-issues copied to clipboard

Lag with game mode and background apps

Open its0ka opened this issue 2 years ago • 18 comments

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 avatar Oct 10 '23 11:10 its0ka

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 avatar Oct 10 '23 12:10 its0ka

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

its0ka avatar Oct 10 '23 12:10 its0ka

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

Something else on your system might be doing this.

peppy avatar Oct 10 '23 13:10 peppy

@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}

its0ka avatar Oct 10 '23 14:10 its0ka

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.

peppy avatar Oct 10 '23 15:10 peppy

@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 avatar Oct 10 '23 15:10 its0ka

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)

its0ka avatar Oct 10 '23 16:10 its0ka

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

peppy avatar Oct 10 '23 16:10 peppy

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

its0ka avatar Oct 10 '23 16:10 its0ka

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

its0ka avatar Oct 10 '23 16:10 its0ka

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.

peppy avatar Oct 10 '23 16:10 peppy

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 avatar Oct 10 '23 16:10 its0ka

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 avatar Oct 10 '23 17:10 its0ka

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 avatar Oct 10 '23 20:10 its0ka

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

its0ka avatar Oct 10 '23 21:10 its0ka

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 avatar Oct 11 '23 03:10 peppy

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.

peppy avatar Oct 20 '23 05:10 peppy

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

its0ka avatar Oct 20 '23 14:10 its0ka