Bug where FPS locks to 18-20 range on marines

eyeriseyeris Join Date: 2013-09-10 Member: 188088Members
edited February 2018 in Technical Support
If I use all minimum quality settings, I get about 65-95fps at 1600x1050 resolution on most maps (100-120fps at 1440x960). Sometimes when I'm on marines, the fps will get pegged between 18-20fps. This doesn't always happen. The amount of time I play does not matter. Sometimes it happens as soon as I start playing. Other times I can play 5-6 games without the issue and then it suddenly starts. It's not specific to any particular map at particular loadout. When it starts, it's usually at one of these times:
  • 40% When I use an armory, especially the very first time I use an armory.
  • 30% As the game begins, during the dramatic camera tracking watching me replicate on my IP.
  • 20% When I first join a team in the middle of a game.
  • 10%When I use a phase gate.

Once it begins, nothing reliably fixes it but there are a few things that do fix it sometimes:
  • Using a phase gate. If the problem began when I used a phase gate then it usually won't be fixed by using a phase gate.
  • Using an armory. This is much more rare. Like the phase gate, if it started at an armory it usually won't be fixed by using an armory.
  • Switching resolutions (up to down does not matter).
  • Switching between fullscreen mode and windowed mode. I usually play in fullscreen mode but I used to play in windowed mode as the problem seems to occur equally in both modes.
  • Joining aliens (NOT the ready-room or quitting to the main menu).

Linux (debian)
16 GB RAM
Nvidia 465 GTX (1GB RAM)
I'm currently using driver 384.111. That's the most up-to-date for my operating system. The problem has occurred on multiple versions of the nvidia drivers though. I tried using the open source nouveau driver but the rendering was broken in ns2 so I couldn't really test it for a point of comparison

@BeigeAlert pointed me to the profile console command. I was able to capture screenshots of a few good profiles and a few bad profiles. You can check those out here: https://imgur.com/a/fSNoQ

The 3 bad profiles don't all look the same but 2 of the 4 show OpenGLDevice::Present taking a very long time without showing much to account for that time. I'm far from an expert on how NS2 works but that seems to imply that it's waiting on something on another thread or out of process. I have wait-for-vsync disabled in the game and it runs with the driver environment variable __GL_SYNC_TO_VBLANK=0, so it should not be waiting on the refresh cycle. One interesting thing is that if I jack the resolution up to 1900x1200, once the game is stuck in this state I can stand in one place and wiggle my mouse around with the profile view open. The delay (which is more like 90ms at that resolution) pings back and forth between the Game and Rendering labels at the top. That seems to suggest the delay might be due to lock contention between those threads?

The other 2 bad profiles show OpenGLDevice::DrawIndexedPrimitives taking most of the time. That seems to imply that the GPU is just running slowly. Using the nvidia-settings program I was able to confirm that the GPU was running at maximum clock speed and was in the normal thermal range. So if the GPU is running slowly then it seems the slowness has something to do with the way the game is using it (e.g. shaders causing pipeline stalls) or the driver. I've tried running the game with different combinations of these environment variables, without any change:
export __GL_SYNC_TO_VBLANK="0"
export __GL_ConformantBlitFramebufferScissor="0"
export __GL_ALLOW_FXAA_USAGE="0"
export __GL_LOG_MAX_ANISO="0"
export __GL_YIELD="NOTHING"
export __GL_SHADER_DISK_CACHE="0"
export __GL_ConformantBlitFramebufferScissor="0"

A few other notes:
  • Las suggested disabling the minimap in NS2+ options. That reduced the rendering time by about 3ms (52 down to 49).
  • I can reproduce it with all client mods disabled.
  • I could not reproduce it on a local NS2 server. Maybe it's server-mod related?

Anyone know what is causing this? Or a good way to narrow it down?



Comments

  • BeigeAlertBeigeAlert Texas Join Date: 2013-08-08 Member: 186657Members, Super Administrators, Forum Admins, NS2 Developer, NS2 Playtester, Squad Five Blue, Squad Five Silver, NS2 Map Tester, Reinforced - Diamond, Reinforced - Shadow, Subnautica Playtester, Pistachionauts
    Good post! I've pinged the other devs in our private chat to take a look at this when they get the chance.
Sign In or Register to comment.