Bad performance on new computer

Hello everyone,

I have changed an old computer to a recent one.
My current developing game worked good on that old computer: around 40 FPS.

I expected it to run better on that new computer, or at least similar.

But it’s way worse: performance has now dropped to around 15 FPS.
I don’t understand how it’s possible : the new computer have a way better GPU, CPU and more RAM than the old one.

Is there a known issue with new computers and performance ?

Here are the first lines when i run the project, with GPU’s information:

run:
mai 13, 2024 11:04:11 PM com.jme3.system.JmeDesktopSystem initialize
INFOS: Running on jMonkeyEngine 3.6.1-stable
 * Branch: HEAD
 * Git Hash: 4de10c3
 * Build Date: 2023-06-23
mai 13, 2024 11:04:12 PM com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFOS: LWJGL 2.9.5 context running on thread jME3 Main
 * Graphics Adapter: C:\Windows\System32\DriverStore\FileRepository\nv_dispig.inf_amd64_d3828c822366e497\nvldumdx.dll,C:\Windows\System32\DriverStore\FileRepository\nv_dispig.inf_amd64_d3828c822366e497\nvldumdx.dll,C:\Windows\System32\DriverStore\FileRepository\nv_dispig.inf_amd64_d3828c822366e497\nvldumdx.dll,C:\Windows\System32\DriverStore\FileRepository\nv_dispig.inf_amd64_d3828c822366e497\nvldumdx.dll
 * Driver Version: null
 * Scaling Factor: 1
mai 13, 2024 11:04:12 PM com.jme3.renderer.opengl.GLRenderer loadCapabilitiesCommon
INFOS: OpenGL Renderer Information
 * Vendor: NVIDIA Corporation
 * Renderer: NVIDIA GeForce RTX 4070/PCIe/SSE2
 * OpenGL Version: 3.2.0 NVIDIA 537.13
 * GLSL Version: 1.50 NVIDIA via Cg compiler
 * Profile: Core
mai 13, 2024 11:04:12 PM com.jme3.audio.openal.ALAudioRenderer initOpenAL
INFOS: Audio Renderer Information
 * Device: OpenAL Soft
 * Vendor: OpenAL Community
 * Renderer: OpenAL Soft
 * Version: 1.1 ALSOFT 1.15.1
 * Supported channels: 64
 * ALC extensions: ALC_ENUMERATE_ALL_EXT ALC_ENUMERATION_EXT ALC_EXT_CAPTURE ALC_EXT_DEDICATED ALC_EXT_disconnect ALC_EXT_EFX ALC_EXT_thread_local_context ALC_SOFT_loopback
 * AL extensions: AL_EXT_ALAW AL_EXT_DOUBLE AL_EXT_EXPONENT_DISTANCE AL_EXT_FLOAT32 AL_EXT_IMA4 AL_EXT_LINEAR_DISTANCE AL_EXT_MCFORMATS AL_EXT_MULAW AL_EXT_MULAW_MCFORMATS AL_EXT_OFFSET AL_EXT_source_distance_model AL_LOKI_quadriphonic AL_SOFT_buffer_samples AL_SOFT_buffer_sub_data AL_SOFTX_deferred_updates AL_SOFT_direct_channels AL_SOFT_loop_points AL_SOFT_source_latency

Thanks in advance,

Ga3L

Those are both quite poor frame rates. I’d suggest using a profiler to see what is taking such a long time (assuming you are CPU bound not GPU bound)

There are lots of options for profiling; what IDE do you use, I use intellij which has one built in but only on the paid version.

Here is a more general overview of profiles, some of which are free and some paid https://www.baeldung.com/java-profilers

Is your GPU driver updated? The last time I checked, NVidia driver was 550.78 (Linux) and 552.44 (Windows). Maybe you just have to update it.

I go with JVisualVM all the time. Super simple and doesn’t matter what IDE is used. JVisualVM is not bundled with JDK anymore but a separate download. Still easy to get.

You can use DetailedProfilerState (jMonkeyEngine3) in your jME app for nice details on where the time is going.

I don’t think this is a issue really, but you can try also how LWJGL 3 performs over LWJGL 2 you are currently using.

1 Like
  1. Did you try different JRE ? openJDK temur orical ,version 11, 17, 21, 8 ?
    The Da capo benchmark suit may help you to test performances in different CPUs.

  2. Which cycle stage cause the latency ?
    the Update() loop or the GL rendering loop?

3 .LWJGL 2.9 and Driver version = null ? :thinking: seems troubling

INFOS: LWJGL 2.9.5 context running on thread jME3 Main
Driver Version: null

Try update the driver and switch to LWJGL 3

LWJGL v2 often reports “null” for the driver version. That’s an old, known issue.

1 Like

I bet if we knew the detailed specs of the two machines we could make a reasonable guess on where your game is slow.

Hello, sorry for my lack of responses, i started again the old computer to do test the game in it again, and also to check the specs, so here are the stats:

New PC:
CPU: 13th Gen Intel(R) Core™ i7-13700KF 3.40 GHz
RAM: 32 GB
OS: Windows 11
GPU: NVIDIA GeForce RTX 4070
Performance: ~15FPS

Old PC:
CPU: Intel(R) Core™ i5-6400 CPU @ 2.70GHz 2.71 GHz
RAM: 16,0 Go
OS: Windows 10
GPU: NVIDIA GeForce GTX 750 Ti
Performance: ~40FPS

I have updated the Nvidia driver on the new PC and switched to LWJGL, it didn’t change anything.
I didn’t had time yet to try another JRE nor doing fine profiling.
But i think it the GL rendering which is causing the latency in both case: when i look away from the place where most detailed models are, FPS is better, it even reach the 60 cap in the old PC.

So i know that i need to optimize the models and i plan to do it, but i also try to understand why a better computer is showing worse than half the performance of the old one.

Thanks in advance,

Ga3L

When you are looking towards the most detailed models or whatever… take a screen shot with the JME standard stats HUD enabled. (The one that shows object counts, FPS, etc.)

2 Likes

This is info from my laptop, basic game with lwjgl 2.9.5

 Running on jMonkeyEngine 3.6.1-stable
 * Branch: HEAD
 * Git Hash: 4de10c3
 * Build Date: 2023-06-23
LWJGL 2.9.5 context running on thread jME3 Main
 * Graphics Adapter: aticfx64
 * Driver Version: 8.17.10.1698
 * Scaling Factor: 1
OpenGL Renderer Information
 * Vendor: ATI Technologies Inc.
 * Renderer: AMD Radeon(TM) Vega 8 Graphics 
 * OpenGL Version: 3.2.0 Core Profile Context 22.20.27.09.230330
 * GLSL Version: 4.60
 * Profile: Core

After switch to lwjgl3:

Running on jMonkeyEngine 3.6.1-stable
 * Branch: HEAD
 * Git Hash: 4de10c3
 * Build Date: 2023-06-23
 LWJGL 3.3.2+13 context running on thread jME3 Main
 * Graphics Adapter: GLFW 3.4.0 Win32 WGL Null EGL OSMesa VisualC DLL
 OpenGL Renderer Information
 * Vendor: ATI Technologies Inc.
 * Renderer: AMD Radeon(TM) Vega 8 Graphics 
 * OpenGL Version: 3.2.0 Core Profile Context 22.20.27.09.230330
 * GLSL Version: 4.60
 * Profile: Core

As you can see Even choose to use GL 3.2 as default, the GLSL Version is 4.60, this is supposed to be correct response from glfw.
Is your GLSL version still : 150 NVIDIA via Cg compiler?
BTW The Cg Toolkit is a legacy NVIDIA toolkit no longer under active development or support.

Hello, here are a screenshot with stats:

And here are the current info i get at start:

INFOS: Running on jMonkeyEngine 3.6.1-stable
 * Branch: HEAD
 * Git Hash: 4de10c3
 * Build Date: 2023-06-23
mai 23, 2024 10:42:48 PM com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFOS: LWJGL 3.3.2+13 context running on thread jME3 Main
 * Graphics Adapter: GLFW 3.4.0 Win32 WGL Null EGL OSMesa VisualC DLL
mai 23, 2024 10:42:48 PM com.jme3.renderer.opengl.GLRenderer loadCapabilitiesCommon
INFOS: OpenGL Renderer Information
 * Vendor: NVIDIA Corporation
 * Renderer: NVIDIA GeForce RTX 4070/PCIe/SSE2
 * OpenGL Version: 3.2.0 NVIDIA 552.44
 * GLSL Version: 1.50 NVIDIA via Cg compiler
 * Profile: Core

Thanks in advance,

Ga3L

1 Like

I don’t remember if it’s on by default but F5 or F6 will turn on the basic profiling and it will tell you where each frame is spending its time. (You can also add the more advanced profiler for more detail.)

Based on your stats, I’m going to guess that you are CPU bound in update() and that the GPU is not even working very hard. At a guess, I’m going to say physics is taking a lot of time per frame.

…hard to say for sure, though, without some profiling.

1 Like

Hello,

Well i tried F5 and F6, it just toggle off the bottom left menu.
But you were right: it was the physics which was provoking the down of performance, especially church’s one, as shown here:


I use a “simplified” version of church’s model for collisions, but it’s way not enough: i’ll remove all ceiling curves and others almost-useless part of it to have a simpler collision model.

So my problem here is kinda “fixed”, but i still don’t understand why the new computer take it harder than old one.

Thanks a lot !

1 Like

When the GPU and the CPU are fighting, it’s hard to predict how things will go sometimes.

…anything below 60 FPS is of concern, especially at this early stage of the game.

Put vsync on and try not to drop below the refresh rate of your monitor… optimize your update loops to be way less than the frame rate on average. Let the GPU do it’s thing.