Dolphin, the GameCube and Wii emulator - Forums

Full Version: Weird performance variation launch-to-launch
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
This is a weird one. I've been noticing some performance discrepancies when launching my benchmarks in Dolphin, and up until now I really thought it was my system that was responsible. But right now, I'm starting to believe it's Dolphin that's causing the issue.

Here's what my test looks like:

1. All minimum graphical settings, 1xIR, no bonus goodies, 640x480, and unlimited game speed with no vsync
2. Load Resident Evil: Remake
3. Start a new game, and skip all cutscenes to the first point you take control of Chris, just after he enters the dining hall
4. Jot down the current framerate

The purpose of this test is to see what the single thread capabilities of my 7700k were, and how much of an impact overclocking had on performance.

I started seeing some weird discrepancies here when doing this, where with the same exact system settings, one run would be 10% slower than another for no explicable reason. First I thought my system was unstable, so I put it all down to stock, even RAM, and saw the same exact 10% swings in performance. Then I remembered all that non-sense about Ryzen getting hit with bad performance without HPET, and thought maybe it was the RTC messing with performance readouts. Nope, it was none of those things.

Then I decided, on a good run where I am hitting 100% of my peak performance, let's make a Save State at my benchmark spot, and see what happens.

Sure enough, during a "bad boot" where I am down 10% performance, loading the Save State immediately boosts me back to my 100% max speed, without resetting the game or Dolphin. Proof:
https://www.youtube.com/watch?v=SS17J470vHQ

You will notice that just by loading a save state from a "good boot" my performance in the exact same point in the game instantly jumps from 93-94 up to 99-100. A roughly 7.5% increase in performance. I've seen better boots than this good boot, and I've seen worse boots than this bad one, where the peak difference is 10% performance gap.

What could be happening under the hood that one time the game runs 10% worse than another time? It can't be due to RTC variation, as if it were then loading the save state should yield the same results. Clearly something is going on with that particular boot of the game, something is going wrong, and it's causing performance to be hampered somehow.

I realize in the grand scheme of things, this doesn't matter. But I am reaching out to the Dolphin developers as I believe you guys care about your code, and would want to get to the bottom of what's causing this discrepancy. I know I sure do, and I'm not even a coder on this project.

Here are the two save state files for REmake:
http://www.mediafire.com/file/9xtz9qyd9h...eSaves.rar

The first save is a good load, the second is a bad one. They are the ones seen in the video.

I would greatly appreciate it if anyone could take the time to study these two save states and see if they can replicate my results. So far I've seen very little feedback from my in-depth posts like this on these forums, hoping this one will be different because it really bugs me and it speaks on some underlying glitch in the code that causes variable performance for no explicable reason. If there is a better place/way for me to be in direct contact with developers who would be willing to figure this out with me, please let me know where to go. I really want to see this one through.

Either way, I'm just glad to have discovered the Save State test and realize it is not my system or settings that's causing the performance variation. I am quite confident this is a Dolphin thing. One last thing that confirms this is, running various other CPU benchmarks yield consistent results that only vary in less than 1% difference run-to-run. 10% is way outside margin of error, and is a clear indication that something is going wrong.

Look forward to any thoughts on this. Thanks.
Resident Evil is one of the worst ever things to test this one as savestates cause performance counters in the game to go crazy.

Anyway, the 10% variation has to do with graphics drivers most of the time and is out of our control iirc. Because of perf-counters in these games I can't exactly tell if the savestates are reliable in this.
The variation is a Resident Evil only thing then yeah? That definitely makes sense to me as I also test Metroid Prime and don't get the same issue there.

You seem familiar with what's happening here. When you say graphics drivers, any clues as to what about them is causing this?
Resident Evil uses performance counters, which means the way it determines how fast/slow to run has to do with something really stupid. I don't know how/what/why it works, but, it's one of those nasty hacks in Dolphin to get it working at all.
Very interesting. Well this puts it to bed, it isn't my computer. I was pulling my hair out trying to determine what was causing it, I really thought it was some misalignment of RTC ticks or something. Glad it is just the one game itself.

I find RE:0 does the same thing as well. Same engine so I guess it's to be expected.
All Resident Evil games do it. They all use the perf-counter thing on the GameCube.
Just wanted to post an update to this. The variation in performance I was getting from launch to launch has since ceased once I put my 1080 Ti in this computer and stopped using the Intel HD 630. All indications point to Intel's driver being crap and not playing well with Dolphin. Now, every single launch, performance is exactly the same.
That's great to hear. Thanks for the update!