Massive FPS drop if vram goes to system ram and <= 1 GB vram video cards #1206

Open
jyte opened this Issue Oct 17, 2016 · 6 comments

Comments

Projects
None yet
4 participants

jyte commented Oct 17, 2016

The problem is pretty hard to describe, and seems to occure totally randomly.
The game start, and is playable, I usually run between 90 and 150 FPS. And at some point, which is still quite quickly (no more than 3 rounds if lucky, 10s after joining if not so lucky), FPS drops to around 10.

I use ubuntu 16.04 with Unity as a DE. Pretty much stock install except I added a PPA to try a more recent video driver.
More info on setup here

Elements I noticed / tried:

  • I tried to change video settings to minimal (everything, resolution included, which reload the game), still 10 fps.
  • I played the same overwatch replay, the FPS drop does not occur at the same moment (thus, the random occurrence).
  • Alt tab during that bug, prevent smooth dragging of windows around the screen (even typing this in my browser is laggy).
  • I tried upgrading my Nvidia driver from 361.42 to 370.28. Problem persist.
  • Quitting the game and going back to the main menu keep the menu at 10fps (moving the cursor is a real pain).
  • Quitting CSGO and relaunching from desktop get me back to normal.
  • Bug often happen on spawn for new round, but not always, and not only. (which is sad since quitting the game to get FPS back to normal will likely work to spectate my team mate, and will likely drop back down to 10FPS on the next round start, making the game simply unplayable).
  • In net_graph , var is arround 80ms when bug happens, and doesn't get over 1ms when everything is fine
  • CSGO console does not indicate any error when the bug trigger.
  • Nothing either in /var/log/kern.log , /var/log/Xorg.0.log , /var/log/syslog
  • CPU isn't stuck at full load (none of the 4 core).
  • Memory isn't full, system is not swapping, activity monitor indicate 2GB memory used by CSGO, which seems fine.
  • From nvidia-smi, VRAM isn't full and GPU does not seems to be overloaded since fan are 47%, but I might be wrong.
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 370.28                 Driver Version: 370.28                    |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 560 Ti  Off  | 0000:01:00.0     N/A |                  N/A |
| 47%   48C    P0    N/A /  N/A |    858MiB /   960MiB |     N/A      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID  Type  Process name                               Usage      |
|=============================================================================|
|    0                  Not Supported                                         |
+-----------------------------------------------------------------------------+

Game is currently unusable.

Contributor

Tele42 commented Oct 17, 2016

Hello @jyte, fwiw, your symptoms sound like you are maxing out your vram.

When a vram allocation fails, the video driver kicks the entire vram allocation to system ram, or make a magic decision on what goes to the system ram. So, if the game is making large course-grained allocations, then there can be a fair amount of free vram while still using system ram mapped to the video card. Your best bet is to switch to a lightweight DE which needs less vram than Unity and see if the framerate drop happens less often or at a later round.

It may be interesting to monitor PCIe link utilization in nvidia-settings during the normal and degraded performance scenarios, but at the same time, the large framerate difference may obscure any insight. Another thing to try out is if enabling/disabling multitcore rendering improves the framerate once it becomes degraded.

I have a feeling that the cache of gun models and skins is what is pushing you past 1GB but we'll need to wait for a Valve dev to see if they want to handle this scenario. Macs with 1GB of vram or less may also be affected.

@Tele42 Tele42 added the Linux label Oct 17, 2016

jyte commented Oct 17, 2016

Thank you for the quick response.
1st of all. For real ?! 1Go of VRAM isn't enough for CSGO ?! And it's not even 4k...

Beside that, the "PCIe Bandwidth Utilization" sky rocket when the bug appears, it seems to be around 10% when the problem isn't there. I have no clue what that mean, maybe you can tell me.

I would agree on the lack of VRAM, I lowered the resolution and put some settings to minimal (like texture details that i think should impact vram usage). I didn't had any issue for the little time I played, nor during overwatch review.
However, I have that screeshot (taken while alt+tab during the bug). Bug was happening (see high % of pcie bandwith utilization), but VRAM was clearly not full, and far from it. But maybe that's normal, you tell me :-)

nvidia-settings

And other weirdness to me is that starting a game on low settings is ok, but changing settings from high to low once the bug has triggered, won't change a thing, despite reloading the game.

On a side note, if indeed it is due to the lack of VRAM, any tips to keep it "low" ? Is it possible to disable skin in CSGO ? Or which settings impact the more VRAM usage ?

The game was running fine with that very setup (weeks/months ago). I reinstalled ubuntu last weekend and now the game is unsuable. With the exact same graphical settings...

Contributor

Tele42 commented Oct 17, 2016

Very high PCIe utilization is confirmation that part of the hot path of the game's render pipeline is getting bumped to system ram. Beyond the previous suggestion to free up more vram system-wide, I do not have any more specific adjustments that you can try.

@Tele42 Tele42 changed the title from [Linux] Massive and random FPS drop. to Massive FPS drop if vram goes to system ram and <= 1 GB vram video cards Oct 22, 2016

@ghost

ghost commented Nov 9, 2016

Hi, I think I have the same issue, but didn't narrow it down so as you did. Basically, I have GTX 650 Ti right now and consider upgrading my GPU, but it wouldn't make sense if it's purely bad Valve programming practice. I play on Gentoo Linux, xmonad, nvidia-smi shows 53MiB vram usage when all aplications are off. I currently have nvidia-drivers 375.10 but the same stuff went on with 370.xx, 367.xx etc., so I'm likely to rule out the drivers (they are already too new for this GPU if anything).
Now, about the actual gameplay - on low settings, everything is fine, I got like 300fps in menus, always over 120 during gameplay in full HD. I don't run any background processes other than firefox during the game and swapping is disabled (I have 32GB of RAM, never use more than a half), since I hate dying from OS lags. I manipulated with video settings and basically even the smallest deviation from low settings ultimately causes the game to drop down to 5fps or so. It happens instantly if I switch all settings to high, or even in 15 minutes on something lower. I specifically noted once that after picking up some fancy weapon skin from the ground I've got instant framerate drop. I didn't do any profiling at the time, nor collected any logs, since it wouldn't help. Currently I don't play the game since too many cheaters are in the official matchmaking. But all your description seems to match my case too. I also observed that switching video settings (no matter if from low to high or vice versa) during a match causes a 30-40% framerate decrease and it doesn't occur if I make a switch from the main menu or restart the game afterwards. Perhaps that's another issue but I'm not eager to report it. I was actually considering cooling issue or nvidia's power saving mode, since the main issue is somewhat corelated to GPU temperature, but neither monitoring the temperature or switching nvidia-settings's "PowerMizer" to "Prefer Maximum Performance" gave any interesting result.
I wonder if there is any vram-quota mechanism on Linux, perhaps BIOS settings might have something to do with that. The same GPU seems to work well on windows client with maximum settings enabled though. Oh, and one more thing, enabling multicore rendering in game seems to bee the fastest way to achieve performance drop. I thought it's related to heating but now I think it's poor code quality, as always in this project (I personally reported 4 segfaults from this and other account). To sum up, I confirm the bug and suggest the OP to test the same hardware with Windows client to rule out hardware issues.

I believe I am also suffering from this issue.

me too here. my VRAM is only 384 MB. Will increasing it give me more trouble?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment