sched-ext / scx

sched_ext schedulers and tools
https://bit.ly/scx_slack
GNU General Public License v2.0
862 stars 81 forks source link

[scx_lavd] Getting large pauses and stutters in-game #234

Closed ChrisLane closed 5 months ago

ChrisLane commented 5 months ago

I read about scx_lavd on Phoronix and decided to give it a try and get some basic benchmarks.

I have observed that I am able to quite reliably reproduce stutters and pauses, sometimes several seconds long while running around my ship in Helldivers 2.

Here's the output from sudo scx_lavd while I was running the game with several stutters in the period (not sure on exact timestamps: https://gist.github.com/ChrisLane/1945f66b5d8a2f36a530ca9ac8abcfa1

Please let me know if I can do anything to debug or provide more useful info for your debugging purposes.

System: Distro: Arch Linux Kernel: 6.8.7-1-cachyos GPU: AMD Radeon RX 6800 XT (RADV NAVI21) CPU: AMD Ryzen 9 5900X 12-Core Processor RAM: 36GB

DasLeo commented 5 months ago

Hey folks,

I ran a test again now to attach my inxi.log + scx_lavd-01-05-2024.log

Some facts:

Hope this helps, otherwise just ping me.

Galcian79 commented 5 months ago

Here is the log of another game. I just found logs cannot run for more than 3hrs.

1658280_stamps.tar.gz

multics69 commented 5 months ago

Thanks @DasLeo and @Galcian79 for narrowing down the problem. I will take a close look and improve it in the next version (hopefully).

multics69 commented 5 months ago

@all -- Could you please test if the problem still exists? PR #274 should fix the problem.

ptr1337 commented 5 months ago

@ALL -- Could you please test if the problem still exists? PR #274 should fix the problem.

FYI, please test on the 6.9 linux-cachyos-rc kernel, since LAVD requires cpufreq support which is not included in the cachyos 6.8 Kernel currently. Ive updated the scx-scheds-git package with the above mentioned patch.

bunkbail commented 5 months ago

I wanted to test the latest lavd but I only have kernel 6.8.9 and latest lavd refuses to launch there. I tried reverting commit a24e1d7 (reverting commit 6892898 causes merge conflict) and build, but it still refuses to launch where pretty much other scx schedulers are running just fine. I'll wait until 6.9 hits stable then I'll be able to test lavd.

Galcian79 commented 5 months ago

1604030_lavd.tar.gz

multics69 commented 5 months ago

@Galcian79 Thank you for sharing your log. Did you notice any stuttering? Is the problem getting worse or better?

Galcian79 commented 5 months ago

@Galcian79 Thank you for sharing your log. Did you notice any stuttering? Is the problem getting worse or better?

I haven't noticed any stuttering.

DasLeo commented 5 months ago

Tried to build Cachy 6.9-rc7 (I guess) yesterday but I got BTF errors in the final vmlinux step, need to figure this out to start further testing.

DasLeo commented 5 months ago

I was testing for a while today on 6.7-rc7 and hadn't had any issues nor micro-stutter. FPS stays the same with and without the scheduler attached.

Great work folks! 👍👍👍

Here are my logs if you still wanna have a look:

Will use the scx_lavd from now on. ✌️

bunkbail commented 5 months ago

Same here. I'm on the stable 6.9 kernel, no micro-stutter during gaming and desktop responsiveness under load is also good. Great work @multics69!

ChrisLane commented 5 months ago

Compiled at fa1c146cad9bea33acfb2e1c2d65fda50382586e and tested with the same setup but 6.9.0-rc7-5-cachyos-rc and didn't experience any of the severe stuttering that I was having before :tada:

Closing this issue. Thank you for the help!