Dolphin, the GameCube and Wii emulator - Forums

Full Version: 2 Strange performance issues
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
  • CPU doesn't overheat/barely increases in heat while emulation is running.
  • CPU Cores are never 100% utilized. Even with hyperthreading disabled the 4 CPU Cores never exceed 60% utilization (Task Manager).
  • GPU is at around 25-30% utilization at Native Internal Resolution and 85% at 3x Internal Resolution (GPU-Z).
  • GPU doesn't overheat.

At 3x Internal Resolution I start to run in to performance issues even though the GPU is never peaking above 90% usage and none of the CPU Cores hit 100% (Hyperthreading doesn't improve performance). Why does 3x Internal Rendering Resolution tank my FPS from 60 down to 19?

-------------------- -------------------- -------------------- -------------------- --------------------

While Dolphin is emulating a game the whole computer system exhibits big delays when reacting to my mouse inputs. For example: Clicking another program window to bring it in to focus will result in a 2 to 3 second delay before that program is brought in to the foreground and then that program is snappy to my inputs. Switching to another program will also incur a big delay after which that program becomes snappy to my input. Clicking back on to the emulation window that is displaying the running game software incurs a 2 to 3 second delay before the emulated game's window is brought in to the foreground. Clicking the emulator program's game list window incurs a 2-3 second delay (the emulated game doesn't stall during any of these "delay" periods). Performance in programs other than the emulated game's window, is also overall worse in general.

I tried using Task Manager to adjust the emulator's Process Affinity and prevent it from utilizing 2 Logical Cores/1 Physical Core, but the performance issue remained.

What causes these delayed responses to bringing programs in to focus and responding to inputs in a timely manner? Is Dolphin making heavy use of the CPU Caches or something? Would that cause the phenomena? Edit: Strangely, disabling Hyperthreading completely fixes this strange delay phenomena and also boosts overall multi-tasking performance while Dolphin is operating. So it seems Dolphin is a clear example of a situation where Hyperthreading is counterproductive at its objective (perhaps Hyperthreading was resulting in a physical CPU Core being burdened with double the number of context switches per second? I've heard context switching is a task that desktop CPU's aren't very efficient at doing rapidly).
A "CPU Utilisation" of (say) 60% actually means that 60% of the time the CPU is doing something (thus working at 100%), and 40% of the time idle or waiting for something. This does not mean that the 'spare' 40% time is always usable and you're not CPU-limited.

Especially in emulators like dolphin, there's complex timing interactions between the different hardware blocks (such as between the CPU and GPU) - this means that a fair amount of time the CPU will have to wait for the result from a GPU command (and visa-versa) before it can continue work. This is often much more obvious in emulators, where the game dev could rely on the specific console hardware and timings, than on "native" PC games (but still exists there, so "CPU usage of 50%" doesn't always mean "you can get 2x the speed").

This, plus possibly waiting on other blocks (e.g. the dsp thread), plus overheads may well end up meaning you're hardware bound despite the metrics not showing 100% cpu/gpu usage.
Plus Dolphin typically uses only 2 cores at a time, which is why throwing more cores at it doesn't help (aka why most AMD CPUs before Ryzen aren't great at Dolphin because they have a lot of cores but each core is slow). Dolphin will sometimes use a third core, but only in specific scenarios.

Like JonnyH states, there is a lot of back and forth between the CPU and GPU that relies on timings and caches, so which is why it's not always maxing out certain aspects.

As for the Hypertheading issue, you want to make sure that Dolphin is attached to 2 different physical cores, not logical cores. Hyperthreading works by taking unused CPU time/resources on a physical core and giving it to another logical core to use. So if you constrain Dolphin to the 2 logical cores on the same physical core, it will slow things down since you're basically telling to it run on one core, but still run all the timings back out through the system instead of inside the same core, making it slow down.
I'm now at a complete loss as to what the multi-tasking performance problem was in the first place after testing out some different hardware configurations today (All tests had Hyperthreading enabled):

1) I just reverted my motherboard settings to run the CPU at its default clock speed of 2.66Ghz via setting the CPU Multiplier to 20x and changing everything else back to Auto and the problematic multi-tasking performance does not occur while Dolphin is running in any configuration.

2) I repeated the process with the CPU multiplier increased to 21x (2.793Ghz) while leaving everything else on Auto, which is the original configuration that the issue first occurred on. The problem won't occur anymore.

3) The problem also doesn't occur while the CPU was overclocked to 3.42Ghz with several motherboard chipset components over-volted.

4) Various PC games unrelated to Dolphin are strangely performing better with significantly improved frame pacing.

Did over-volting my motherboard chipset components when overclocking to 3.42Ghz resolve an issue with some of the hardware somehow? Maybe it fixed a dodgy capacitor somewhere (temporarily maybe)?

I also fixed the emulation performance issues I was having when increasing the Internal Rendering Resolution. I mistakenly miss-understood what Exclusive Ubershaders mode does. All the examples in the Ubershader article mention Ubershaders being used to fix the stutter that certain effects cause in games, what it failed to mention/emphasize though was that Exclusive mode causes the GPU to be utilized for most (all?) visual related emulation and NOT just the effects that were causing the stutters!

It looks like Hybrid Mode is actually what I thought Exclusive mode did. Switching to Hybrid mode massively reduces GPU utilization as the Internal Rendering Resolution is increased, resulting in massive performance increases (compared to Exclusive mode).