Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FPS drop when playing the immortal lock after updating from 1.31.0 to 1.31.1 (And following versions up to 1.32.0) #771

Closed
NeurusEx opened this issue Jan 29, 2025 · 14 comments
Assignees
Labels

Comments

@NeurusEx
Copy link

Describe the bug

I've been using vkQuake 1.31.0 to play the Immortal Lock for a while with no issue whatsoever and stable FPS's. This morning, after updating to 1.32.0 the game went from stable 40-60fps's to 10-15. I decided to test the whole 1.31.x range of updates, and found out that the issue started in 1.31.1.

I've tried with both fullscreen and windowed modes and updating the drivers. I did gain a bit after the update and switching to fullscreen, but once many enemies started to appear on screen, the FPS's came back down.

I've also launched vanilla quake and the performance was normal (40-60 fps).

Screenshots

  1. vkQuake 1.31.1 playing Immortal Lock on a zone with not many enemies (Similar results could be expected on 1.32), showing 11 fps:

https://imgur.com/N1IBD5J

  1. vkQuake 1.31.0 playing Immortal Lock on an arena with too many vores for my liking showing 58fps:

https://imgur.com/UAy8UPO

Desktop (please complete the following information):

  • OS: Windows 10 (64 Bit)
  • GPU vendor and model: NVIDIA GeForce GTX 1060 6GB
  • Driver version: 32.0.15.6636
  • Launching the game and the data files from an SSD.

Mod
The Immortal Lock, 1.9.

Additional context

I've gone... through an "update" journey for this thing. While I started with vkQuake 1.31.0, older drivers and Immortal Lock 1.7. Updating both the drivers and the mod's version (That thankfully didn't broke my saves) did help a bit, but going back from 1.32.0 to 1.31.0, with everything updated, means "regaining" an average of 10-20 fps on the arena shot linked above.

@vsonnier
Copy link
Collaborator

vsonnier commented Jan 30, 2025

Please provide:

(attach all the relevant files into this issue)

@NeurusEx
Copy link
Author

NeurusEx commented Jan 30, 2025

EDIT: While the command did fix most of the issues, on what I assume is the final arena (In the middle of the void, right after another arena with tentacles that mentions "altars charging" with jump pads and all that):

https://imgur.com/q5WAvAP

After some of the waves of enemies have spawned (More or less when a cloud of scrags appear) and the enemy count gets to very high levels, the performance drop on 1.32.0 is way less manageable (3 fps) than in 1.31.0 (17-20). While the amount of enemies is extreme, there's a huge difference on performance between both versions.

Wow, sv_fastpushmove1 not only fixed it but also made it faster than in 1.31.0

  • Intel(R) Core(TM) i5-3570 CPU @ 3.40GHz
  • The slowdown was generalized in the whole level. Difference on FPS between sv_fastpushmove1 and sv_fastpushmove0 is from 15 fps to over 70 stable. On 1.31.0 the average was 50fps.
    Attached file (in case there's a use for it) a bit after the screenshots provided. I've changed extension from .sav to .txt so I could attach it.
    quick.txt
  • Config files attached, also in case there's a use for them (also, changed extension to txt):
    autoexec.txt
    vkQuake.txt

As I've mentioned, in my side the issue is fixed, so feel free to close it. I'm leaving the issue open just in case you need something more on my side.

Thanks!

@j4reporting
Copy link
Contributor

Out of interest, could you please try version 1.31.1 and change host_maxfps to 70 or 71 instead of 72?
Try the same with 1.32.0 with sv_fastpushmove 0.

@j4reporting
Copy link
Contributor

@vsonnier vkquake enables the renderer/network isolation with host_maxfps 72 instead of 73 because of debcaca
this was between 1.31.0 and 1.31.1

]host_maxfps 72
Using renderer/network isolation.
]host_maxfps 71
Disabling renderer/network isolation.

Maybe we should use a value 72.0 in the if statements in host.c, but keep host_netinterval as it is?

vkQuake/Quake/host.c

Lines 134 to 148 in b86bf56

if (var->value > MAX_PHYSICS_FREQ || var->value <= 0)
{
if (!host_netinterval)
Con_Printf ("Using renderer/network isolation.\n");
host_netinterval = 1.0 / MAX_PHYSICS_FREQ;
}
else
{
if (host_netinterval)
Con_Printf ("Disabling renderer/network isolation.\n");
host_netinterval = 0;
if (var->value > MAX_PHYSICS_FREQ)
Con_Warning ("host_maxfps above 72 breaks physics.\n");
}

]host_maxfps 72
Using renderer/network isolation.
]host_maxfps 71
Disabling renderer/network isolation.

this still does not explain the difference in FPS between 1.31.0 and 1.32.0, though.

@vsonnier
Copy link
Collaborator

vsonnier commented Jan 31, 2025

this still does not explain the difference in FPS between 1.31.0 and 1.32.0, though.

The only difference between 1.31.0 and 1.31.1 that may affect performance is 58f5bbe.

Anyway I personnally don't see any perfomance difference in versions which stay quite low until the sv_fastpushmove was introduced.

@j4reporting I'm not going to touch anything physics-related unless it breaks now. In the low-moderate fps, (60fps and lower) vkQuake runs physics code more often (I think) than Ironwail resulting a quite smother general impression for the same amount of fps, so I certainly won't change that.

The slowdown was generalized in the whole level. Difference on FPS between sv_fastpushmove1 and sv_fastpushmove0 is from 15 fps to over 70 stable. On 1.31.0 the average was 50fps.
Attached file (in case there's a use for it) a bit after the screenshots provided. I've changed extension from .sav to .txt so I could attach it.
quick.txt

This save is not for the Immortal Lock, you have attached the wrong game here :)

While the command did fix most of the issues, on what I assume is the final arena (In the middle of the void, right after another arena with tentacles that mentions "altars charging" with jump pads and all that)
https://imgur.com/q5WAvAP
After some of the waves of enemies have spawned (More or less when a cloud of scrags appear) and the enemy count gets to very high levels, the performance drop on 1.32.0 is way less manageable (3 fps) than in 1.31.0 (17-20). While the amount of enemies is extreme, there's a huge difference on performance between both versions.

I observe the same thing, where fps will crawl from some time because of the amount of spawned and active monsters. Nothing much can be done except having a more (single-threaded) powerful CPU.

@j4reporting
Copy link
Contributor

no one want to change the physics code, but we should enable the network/rendering isolation if host_maxfps > 72 and not >71.

@NeurusEx
Copy link
Author

NeurusEx commented Feb 2, 2025

Take into account that these replies are all using a save (attached below) of the final fight (As it is the one I had).

Out of interest, could you please try version 1.31.1 and change host_maxfps to 70 or 71 instead of 72? Try the same with 1.32.0 with sv_fastpushmove 0.

Sure:

  • On 1.31.1: Over 32 fps during the first minutes of the fight. When the scrag cloud appears, I get a drop to 13-14.
  • On 1.31.2: FPS stable on the 50-60 range. Scrag cloud pulls the performance to 30 (!) IIRC, this was slightly worse than in 1.31.0

On both cases, if host_maxfps is 72, its unplayable.

This save is not for the Immortal Lock, you have attached the wrong game here :)

Oh dear, probably I attached an old quicksave from the Id1 folder instead the good one. Here it is (as before, change txt to sav, and as I mentioned, its a save right before the big fight):

s0.txt

@vsonnier
Copy link
Collaborator

vsonnier commented Feb 3, 2025

Just to be clear :

On 1.31.1: Over 32 fps during the first minutes of the fight. When the scrag cloud appears, I get a drop to 13-14.
On 1.31.2: FPS stable on the 50-60 range. Scrag cloud pulls the performance to 30 (!) IIRC, this was slightly worse than in 1.31.0

Is this really between 1.31.1 and 1.31.2 ? This is important if we want to track a problem. Initiallly the issue describes 1.31.1 vs. 1.31.0. Although the version increment is small, in practice this covers much different changes in code.

When the scrag cloud appears, I get a drop to 13-14.
On 1.31.2: FPS stable on the 50-60 range. Scrag cloud pulls the performance to 30 (!) IIRC, this was slightly worse than in 1.31.0

I also assume 1.31.2 performance is with sv_fastpushmove 1, because it was introduced in this version.
Besides, my English is certainly not perfect but how 30 can be slightly worse than 14 ?

no one want to change the physics code, but we should enable the network/rendering isolation if host_maxfps > 72 and not >71.

Ah right I'll do something about it, although it doubt it will change anything in the end.

@j4reporting
Copy link
Contributor

j4reporting commented Feb 3, 2025

On 1.31.2: FPS stable on the 50-60 range. Scrag cloud pulls the performance to 30 (!) IIRC, this was slightly worse than in 1.31.0

I also assume 1.31.2 performance is with sv_fastpushmove 1, because it was introduced in this version.
Besides, my English is certainly not perfect but how 30 can be slightly worse than 14 ?

I guess he compared FPS between 1.31.0 (host_maxfps 72) and 1.31.2/1.32.0 host_maxfps 70 or 71 and sv_fastmove 0

we should enable the network/rendering isolation if host_maxfps > 72 and not >71.
Ah right I'll do something about it, although it doubt it will change anything in the end.

I can reproduce this on my old skylake nuc with iGPU with version 1.31.0 and the provided save game.
load savegame, don't move and just wait.
host_maxfps 72: fps 50 but drops to ~35 when the fiends spawn and attack
host_maxfps 73: drops to 4 or 5 => unplayable

version 1.31.2 playable with sv_fastmove 1 ( host_maxfps 72 )
unplayable with sv_fastmove 0 (host_maxfps 72)
best with host_maxfps <72 and sv_fastmove 1

the fixed host_frametime = host_netinterval does not cope well with situations when engine spends most of the time in server code. ( host_speeds 1 shows > 200 for server )

@NeurusEx could you please do your test again with version 1.31.0 and change host_maxfps to 73 or 74
I assume that it's going to be unplayable on your HW?

@j4reporting
Copy link
Contributor

#772 works as expected on my old nuc.

There is another issue with the savegame, though. For some reason the savegame will trigger a "vkWaitForFences failed" error while loading this savegame on my newer HW with the unmodified vkQuake 1.32.0 version!
Only fastload seem to work like

skill 1
map immortal
fastload  save_issue771.sav 

Win10 or Linux does not matter...
I guess I'll open a new issue

@j4reporting
Copy link
Contributor

j4reporting commented Feb 4, 2025

Additional context
I've gone... through an "update" journey for this thing. While I started with vkQuake 1.31.0, older drivers and Immortal Lock 1.7. > Updating both the drivers and the mod's version (That thankfully didn't broke my saves)

@NeurusEx, updating immortal lock to a newer version broke your savegame later. This savegame has many problems. If you update to a newer version of a map, start from the beginning. Or continue playing the old version if you have altready progressed too far and don't want to start from the beginning again.

@vsonnier
Copy link
Collaborator

vsonnier commented Feb 6, 2025

Thanks all for your investigation, I've added a commit suggested by @j4reporting here : 60957d1

That basically adopts the same way Ironwail has to compute the host_frametime and which apparently solves the excessive server time spent in case of host_maxfps 0 which make the fps crawls.

This is very sensitive code though, so even put in master branch I'll let it sit here for people to test in various levels and situations. Because Immortal Lock is litterally the only level where the issue occured, we must check this particlar fix do not affect all the other levels out there.

In other words, If we note regressions in other levels and situations, I'll revert the change.

I'm not going to make a new release anytime soon, so for now let's just play games and see how it goes.

@vsonnier vsonnier closed this as completed Feb 6, 2025
@j4reporting
Copy link
Contributor

the map marooned has a similar issue but shows the slow down effect with too many edicts in use even better than immortal.

there is a lieutenant enforcer waiting in a small room, accessible through a ladder and a panel in the roof/floor.
This is quite at the start of the level. You can't defeat him at the very beginning, but later on with better weapons.

If you manage to defeat him, you can open a larger door to the hanger. The door swings up for several seconds.
It's a quite different experiance with >8000 edicts at end of the map ( server time >150 and more FPS drops to 14 or even 5 )
and the same room at the start with 4800 edicts (used impulse 9 to get weapons) is not noticable..

marooned_door.zip

vkquake 1.32.0 ( 1.31.0 - 1.32.0 show similar results)
sv_fastpushmove 0
host_maxfps 200

s0.sav is the "normal progress ( s1.sav) is after the fight but door to hanger still closed )
Overall fps howers ~100fps in that small room on my system

s10.sav is early after map start in front of the ladder and impulse 9 ( SNG with lava nails can fnish the enforcer quickly)
FPS ~150

s0:
]edictcount
num_edicts :  8163
active     :  8134
free       :    29
view       :  3377
touch      :  2950
------------------
move step  :   113
move push  :  2615
move none  :  5332
move noclip:     4
]max_edicts
"max_edicts" is "11000"
]sv_fastpushmove
"sv_fastpushmove" is "0"

host_speeds when the door swings up on a rebooted system
10.07 tot  7.89 server  2.18 gfx  0.00 snd
 2.70 tot  0.17 server  2.54 gfx  0.00 snd
12.43 tot  9.93 server  2.50 gfx  0.00 snd
13.05 tot 10.70 server  2.35 gfx  0.00 snd
14.92 tot 12.54 server  2.38 gfx  0.00 snd
17.41 tot 14.86 server  2.55 gfx  0.00 snd
17.64 tot 15.12 server  2.52 gfx  0.00 snd
24.74 tot 21.92 server  2.82 gfx  0.00 snd
29.90 tot 27.70 server  2.19 gfx  0.00 snd
29.04 tot 26.91 server  2.13 gfx  0.00 snd
31.76 tot 29.55 server  2.21 gfx  0.00 snd
46.01 tot 43.66 server  2.35 gfx  0.00 snd
43.25 tot 40.87 server  2.38 gfx  0.00 snd
42.77 tot 40.47 server  2.30 gfx  0.00 snd
45.23 tot 42.47 server  2.76 gfx  0.00 snd
46.39 tot 4



4.07 server  2.31 gfx  0.00 snd
58.51 tot 56.05 server  2.46 gfx  0.00 snd
57.17 tot 54.99 server  2.18 gfx  0.00 snd
55.51 tot 53.13 server  2.38 gfx  0.00 snd
58.35 tot 56.20 server  2.15 gfx  0.00 snd
58.81 tot 56.54 server  2.27 gfx  0.00 snd
58.03 tot 55.72 server  2.30 gfx  0.00 snd
69.62 tot 67.35 server  2.27 gfx  0.00 snd
71.77 tot 69.52 server  2.26 gfx  0.00 snd
71.57 tot 69.31 server  2.25 gfx  0.00 snd
73.96 tot 71.63 server  2.33 gfx  0.00 snd
70.94 tot 68.63 server  2.30 gfx  0.00 snd
72.64 tot 70.33 server  2.31 gfx  0.00 snd
87.94 tot 85.66 server  2.28 gfx  0.00 snd
84.36 tot 81.87 server  2.49 gfx  0.00 snd
84.36 tot 81.87 server  2.49 gfx  0.00 snd
84.11 tot 81.64 server  2.46 gfx  0.00 snd
83.56 tot 81.18 server  2.38 gfx  0.00 snd
84.99 tot 82.74 server  2.25 gfx  0.00 snd
82.31 tot 80.06 server  2.24 gfx  0.00 snd
82.53 tot 80.14 server  2.40 gfx  0.00 snd
82.36 tot 80.10 server  2.25 gfx  0.00 snd
81.73 tot 79.31 server  2.42 gfx  0.00 snd
87.81 tot 85.54 server  2.27 gfx  0.00 snd
86.38 tot 83.98 server  2.40 gfx  0.00 snd
95.19 tot 92.94 server  2.26 gfx  0.00 snd
89.27 tot 86.73 server  2.54 gfx  0.00 snd
98.41 tot 96.10 server  2.30 gfx  0.00 snd
97.62 tot 95.15 server  2.47 gfx  0.00 snd
95.11 tot 92.55 server  2.56 gfx  0.00 snd
96.59 tot 94.35 server  2.24 gfx  0.00 snd
96.24 tot 93.78 server  2.46 gfx  0.00 snd
95.72 tot 93.19 server  2.53 gfx  0.00 snd
95.40 tot 93.05 server  2.35 gfx  0.00 snd
95.31 tot 92.83 server  2.48 gfx  0.00 snd
87.00 tot 84.58 server  2.42 gfx  0.00 snd
93.07 tot 90.74 server  2.32 gfx  0.00 snd
84.25 tot 81.98 server  2.26 gfx  0.00 snd
81.84 tot 79.62 server  2.23 gfx  0.00 snd
82.15 tot 79.82 server  2.33 gfx  0.00 snd
82.90 tot 80.53 server  2.37 gfx  0.00 snd
81.65 tot 79.41 server  2.24 gfx  0.00 snd
82.80 tot 80.30 server  2.50 gfx  0.00 snd
84.83 tot 82.50 server  2.33 gfx  0.00 snd
83.53 tot 81.11 server  2.42 gfx  0.00 snd
84.19 tot 81.75 server  2.44 gfx  0.00 snd
90.77 tot 88.58 server  2.19 gfx  0.00 snd
100.58 tot 98.27 server  2.31 gfx  0.00 snd
96.23 tot 93.85 server  2.39 gfx  0.00 snd
100.57 tot 98.27 server  2.29 gfx  0.00 snd
96.27 tot 94.05 server  2.22 gfx  0.00 snd
101.06 tot 98.30 server  2.75 gfx  0.00 snd
96.44 tot 94.08 server  2.36 gfx  0.00 snd
96.37 tot 94.06 server  2.31 gfx  0.00 snd
97.24 tot 94.74 server  2.49 gfx  0.00 snd
100.39 tot 97.92 server  2.47 gfx  0.00 snd
90.13 tot 87.58 server  2.55 gfx  0.00 snd
55.48 tot 52.96 server  2.52 gfx  0.00 snd

I've seen worse:

87.78 tot 85.33 server  2.45 gfx  0.00 snd
101.43 tot 98.98 server  2.45 gfx  0.00 snd
101.41 tot 99.01 server  2.40 gfx  0.00 snd
101.18 tot 98.84 server  2.35 gfx  0.00 snd
100.78 tot 98.29 server  2.49 gfx  0.00 snd
117.69 tot 115.20 server  2.48 gfx  0.00 snd
116.68 tot 114.36 server  2.32 gfx  0.00 snd
128.36 tot 126.17 server  2.19 gfx  0.00 snd
132.11 tot 129.80 server  2.31 gfx  0.00 snd
127.41 tot 125.18 server  2.22 gfx  0.00 snd
129.85 tot 127.50 server  2.35 gfx  0.00 snd
139.09 tot 136.59 server  2.50 gfx  0.00 snd
141.61 tot 139.04 server  2.57 gfx  0.00 snd
146.61 tot 144.21 server  2.40 gfx  0.00 snd
153.48 tot 150.97 server  2.51 gfx  0.00 snd
157.73 tot 155.44 server  2.28 gfx  0.00 snd
151.08 tot 148.61 server  2.47 gfx  0.00 snd
159.82 tot 157.51 server  2.31 gfx  0.00 snd
157.13 tot 154.44 server  2.69 gfx  0.00 snd
173.77 tot 171.46 server  2.31 gfx  0.00 snd
178.30 tot 175.95 server  2.35 gfx  0.00 snd
193.32 tot 191.16 server  2.16 gfx  0.00 snd
211.93 tot 209.53 server  2.40 gfx  0.00 snd
198.66 tot 196.48 server  2.17 gfx  0.00 snd
216.55 tot 213.66 server  2.89 gfx  0.00 snd
209.35 tot 206.90 server  2.46 gfx  0.00 snd
229.67 tot 227.29 server  2.38 gfx  0.00 snd
200.23 tot 197.79 server  2.44 gfx  0.00 snd
146.02 tot 143.74 server  2.28 gfx  0.00 snd
101.02 tot 98.47 server  2.55 gfx  0.00 snd
72.42 tot 69.82 server  2.60 gfx  0.00 snd
50.22 tot 47.99 server  2.23 gfx  0.00 snd
41.38 tot 39.15 server  2.23 gfx  0.00 snd
30.16 tot 27.95 server  2.21 gfx  0.00 snd
20.61 tot 18.18 server  2.43 gfx  0.00 snd
20.49 tot 18.15 server  2.33 gfx  0.00 snd

@vsonnier vsonnier reopened this Feb 7, 2025
@vsonnier vsonnier closed this as completed Feb 7, 2025
@vsonnier
Copy link
Collaborator

vsonnier commented Feb 7, 2025

Hi @j4reporting the advanture continues there: #775

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants