Dolphin, the GameCube and Wii emulator - Forums

Full Version: Experiencing lag. Please explain.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

vernacular

I am using the default settings with one change: it's set to 1x native resolution. Now I thought my hardware could handle this, but it's running at around half the speed it needs and looks very slow. I monitored the usage of my CPU and GPU during gameplay. Here's an image:
[Image: 36fpsdonkeykongreturns.jpg]

The CPU is only at 26% usage and it isn't fully utilizing the threads. The GPU is only around 45%. I am using an ASUS G53J laptop with an i7 Q740 CPU, an nVidia GTX 460M GPU and 4GB RAM with Dolphin 3.0-235 trying to run Donkey Kong Returns. The power settings are on High Performance with the laptop plugged into the wall hardly anything else is running so there shouldn't be anything limiting the hardware.

The New Super Mario Bros seems to run just fine with less GPU usage and about the same CPU usage:
[Image: 60fpsnewsupermariobros.jpg]

I don't understand why I can't achieve 60 FPS in DKR. Explain please? Recommendations?
PS. I also hear a weird metronome sound all the time in DKR.
NSMB isn't a demanding game. DKCR tends to be slow

vernacular

(12-28-2011, 03:04 AM)LordVador Wrote: [ -> ]NSMB isn't a demanding game. DKCR tends to be slow
I understand that it's more demanding, but I don't understand why my hardware isn't being put to it's full use to compensate for this extra workload.
It's highly unlikely that Dolphin could ever take full advantage of the CPU and GPU. It uses 25% of the CPU, which is about two full cores. As you can see one core is almost fully utilized, which is probably causing the lag. The other threads and GPU simply need to wait for that thread each frame. As with Mario you see clearly that no core is fully utilized and therefor each frame is nicely rendered within the framelimit (or V-sync). Without debugging/timing it's hard to say which thread is causing this lag. But most likely it wouldn't be possible to split that workload over two or more threads, because of the overhead that creates. Also the developers cannot fully control which actions can be seperated over threads, it might be hardcoded in the game.

Consider playing with the settings and watching the CPU usage of the specific core. Perhaps you'll find a setting with low impact on this particular game and decreases single threaded CPU usage.
Using "Lock threads to cores" will use two full cores, but that's not the issue and you will still get about the same speed. The issue is that your CPU is not strong enough to run some games at full speed.

vernacular

(12-28-2011, 04:07 AM)Xoppa Wrote: [ -> ]It's highly unlikely that Dolphin could ever take full advantage of the CPU and GPU. It uses 25% of the CPU, which is about two full cores. As you can see one core is almost fully utilized, which is probably causing the lag. The other threads and GPU simply need to wait for that thread each frame. As with Mario you see clearly that no core is fully utilized and therefor each frame is nicely rendered within the framelimit (or V-sync). Without debugging/timing it's hard to say which thread is causing this lag. But most likely it wouldn't be possible to split that workload over two or more threads, because of the overhead that creates. Also the developers cannot fully control which actions can be seperated over threads, it might be hardcoded in the game.

Consider playing with the settings and watching the CPU usage of the specific core. Perhaps you'll find a setting with low impact on this particular game and decreases single threaded CPU usage.
Oh, okay. I am getting a bluetooth adapter soon for my desktop PC which has a faster CPU @ 4GHz. I'm hoping it plays smoother on there. Am I right in assuming core clock does more than the amount of cores/threads concerning dolphin? The way you put it, it doesn't seem that dolphin can even fully utilize every thread anyways. If I over-clocked the CPU in my laptop I don't think it could dissipate enough of the heat so my desktop PC seems the only option if I want to have a chance at running DKR smoothly although I would have preferred the portable option with my laptop. I vaguely recall using a guide to try to get DKR to run faster, but I was never able to hit 60 fps let alone a stable 40 fps.

Thanks for the info. I think I have a better idea of how it works now.
Correct, in your case higher speed is better than more cores. In general you could say that everything your GPU can't handle at rendertime, will be done by the CPU singlethreaded. However other tasks are probably just as important for the performance (gamelogic, generating textures, responding to input, audio, etc.). Timeslicing (switching between threads on one core) can be a serious impact for timecritical processes, so more cores are likely to be recommended. Just don't expect those cores to be fully utilized. Ofcourse this is a very basic explanation, the reality is more complex.