Strange perfomance problem: FPS is much better the first time I run openMW (nightly build)

Support for running, installing or compiling OpenMW

Before you submit a bug report for the first time, please read: Bug reporting guidelines
Malak
Posts: 7
Joined: 28 Oct 2018, 00:50

Strange perfomance problem: FPS is much better the first time I run openMW (nightly build)

Post by Malak »

It's been a while I last checked in on openMW. With all the new features since my last time (shadows, distant statics on nightly) and decided to look how it runs these days.

I found a very weird perfomance problem. To be clear, I am not quite sure if it does oder does not happen with earlier versions. More on that later.

The problem is as follows:

1.) Boot Windows 10.
2.) Start openMW from Launcher, start the game.
3.) Load save game. Show FPS and walk around a bit.
4.) Exit openMW. Restart immediatly afterwards through Launcher
5.) Load the very same save game. Perfomance is much worse now, with the same scenery and viewing direction.

The worse perfomance persists until I reboot computer. After that, again, only the first instance runs better.

I have shadows activated and Distant LOD with 13 cells viewing distance and "active grid object paging". For other settings, see the cfg in the attachement.

I have a large mod list, that is basically based on this one (https://github.com/Tyler799/Morrowind-2 ... nd_2020.md), minus the MWSE mods, and replaced some mods with normal maps made for openMW and double checking with the openMW total overhaul list. Come to think of it, I should probably try without mods.

Funny thing is, the perfomance is still fine. I was kind of used of having low FPS in Balmora and the like. But on the first instance, I have something like 50-60 FPS in Balmora...which is really amazing!

Still better if I report my weird problem here, though.

System:
Windows 10
i5 6600k
RTX 2080
16gb RAM
1 TB + 500gb SSD

Say if there are more information I should provide.

Edit: It seems the attachement didn't work. Hm.
Malak
Posts: 7
Joined: 28 Oct 2018, 00:50

Re: Strange perfomance problem: FPS is much better the first time I run openMW (nightly build)

Post by Malak »

It appears that every edit causes this thread to disappear and need to be approved again? I will add the attachaments in a new post then.
I hope the attachaments work this time.

I also forgot some details above:

1.) Problem seems to happen with mods disabled as well.
2.) I'm not sure if it happens with 0.46. At first, if I start it a second time, perfomance appears to be worse. But after some time waiting (about 15s) the FPS suddenly raises and the perfomance is back to normal...
Attachments
ScreenAndCfg.zip
config-Files
(28.94 KiB) Downloaded 154 times
Perfomance second start of openMW
Perfomance second start of openMW
Perfomance first start of openMW
Perfomance first start of openMW
User avatar
AnyOldName3
Posts: 2667
Joined: 26 Nov 2015, 03:25

Re: Strange perfomance problem: FPS is much better the first time I run openMW (nightly build)

Post by AnyOldName3 »

I've not had any good ideas about the performance problem yet, but I can tell you that the reason your post needs approval again after you edit it is so that a spambot can't make a real-seeming post, then edit it to be spam after it gets approved.
User avatar
akortunov
Posts: 899
Joined: 13 Mar 2017, 13:49
Location: Samara, Russian Federation

Re: Strange perfomance problem: FPS is much better the first time I run openMW (nightly build)

Post by akortunov »

Malak wrote: 27 Aug 2020, 07:20 if I start it a second time, perfomance appears to be worse. But after some time waiting (about 15s) the FPS suddenly raises and the perfomance is back to normal...
This particular case seems to be a thread affinity issue, as for me. After loading game updates navmeshes and preload nearby cells.
If OS fails to dispatch all these tasks (e.g. there are no unused CPU cores left), it can execute them on the Draw thread, what can cripple FPS.

By the way, I got multiple reports that there is 1.5-2x more FPS in OpenMW on Linux than on Windows on the same machine (in every case an nVidia GPU is used). I encountered this issue too.
Interesting that on Linux I get FPS drops as well when using the 450.57 proprietary driver, on older versions everything is OK.
Malak
Posts: 7
Joined: 28 Oct 2018, 00:50

Re: Strange perfomance problem: FPS is much better the first time I run openMW (nightly build)

Post by Malak »

I could try it out and see how it performs on Linux. Still have Arch Linux on my computer, but I have not really used it for some quite time, was just to lazy to remove it. I probably need to fiddle around with updates first, because not updating for a while on a running release distribution is certainly not a good idea.

I will update once I get results.
User avatar
AnyOldName3
Posts: 2667
Joined: 26 Nov 2015, 03:25

Re: Strange perfomance problem: FPS is much better the first time I run openMW (nightly build)

Post by AnyOldName3 »

I saw someone claiming to have better framerates with MinGW instead of MSVC, so maybe we've got a hot path that GCC optimises much better than MSVC does if there's a Linux versus Windows comparison with similar results.
User avatar
psi29a
Posts: 5356
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: Strange perfomance problem: FPS is much better the first time I run openMW (nightly build)

Post by psi29a »

AnyOldName3 wrote: 28 Aug 2020, 16:57 I saw someone claiming to have better framerates with MinGW instead of MSVC, so maybe we've got a hot path that GCC optimises much better than MSVC does if there's a Linux versus Windows comparison with similar results.
MSVC supports using clang... so we can try to compare cl against msvc as well.
Malak
Posts: 7
Joined: 28 Oct 2018, 00:50

Re: Strange perfomance problem: FPS is much better the first time I run openMW (nightly build)

Post by Malak »

The results on Linux are somewhat...in between, I guess?

Well, what I can say is that I don't get the weird "better perfomance on first start" problem there. However, the perfomance is simply worse than the "good" perfomance on Windows - at least for the nightly build. However, perfomance is still better than the "second start" one on Windows. Thats why it is somewhat in between, if you compare with above screenshot.

I also compared for 0.46. In this case, perfomance on Linux is a bit better. I compared with 0.46 on Windows, of course, because I would generally expect a bit higher FPS on 0.46 in only because there are no distant statics.

On a site note, on 0.46 the FPS drops heavily if opening the last profiler window. Doesn't happen on the nightly. Has probably nothing to do with the topic and is no big deal, just thought to mention it. Maybe I'm wrong and it is important.

Since akortunov mentioned 450.57, I tried to downgrade by driver to the version before, using the arch archive. Well, it did not go very well, x server did not start and had to fix it from console :lol: Well, there is good reason why I'm going away from Linux, I really had no idea what I was doing there.

Point is, it is feasible downgrading the nvidia driver on (arch) linux? If it's possible, I might try that as well.
Attachments
Nightly build (from Arch AUR)
Nightly build (from Arch AUR)
openMW 0.46 (from community repo)
openMW 0.46 (from community repo)
openMW 0.46 - all profiler windows
openMW 0.46 - all profiler windows
openMW 0.46 on Windows 10
openMW 0.46 on Windows 10
ramnozack
Posts: 1
Joined: 01 Feb 2021, 04:01

Re: Strange perfomance problem: FPS is much better the first time I run openMW (nightly build)

Post by ramnozack »

I'm also having an issue that sounds pretty much identical to this. Using the 0.47 nightly I'm having a problem where my performance is pretty good even in places like Balmora I'm running at 100+ fps, but when I close the game to add some more mods on to test and then start it back up, my performance tanks.

Even after reverting the changes to openmw.cfg to what they were before I added the new mods, even restoring a vanilla openmw.cfg, the bad performance remains. I go from 60-70 fps in Seyda Neen looking at the village from the silt strider platform to around 30 fps to give an example of the performance loss.

The only consistent way I've found to restore good fps is to restart my computer.
Malak
Posts: 7
Joined: 28 Oct 2018, 00:50

Re: Strange perfomance problem: FPS is much better the first time I run openMW (nightly build)

Post by Malak »

I randomly stumpled on a related problem on discord.
akortunovs advice was "Did anyone actually try to check if it is an IncrementalCompileOperation's fault by disabling it via environmental variable?".

This did indeed work. Tested by starting launcher from explorer vs from cmd with "set OPENMW_DONT_PRECOMPILE=1" before start. Perfomance is now always on the "first start since boot" level.

Important note: I upgraded my system since last time, I know have a Ryzen 5900x processor and 32gb RAM, but same GPU. However, I still had the exactly same problem on the new system.
Post Reply