Frequent hitching and stuttering in Metal Gear Solid V: The Phantom Pain: what causes this

metal-gear-solid-5-the-phantom-painpc

Update (30/09/2015)

Troubleshooting steps you should try if you're experiencing hitching in order of effectiveness:

  • Lower shadow quality (also consider increasing the 'CascadeShadowRangeScale' property, which can be found in 'gr_init_dx11.lua')
  • Disable/enable 'Shader Cache'
  • Revert to NVIDIA GeForce driver v347.25

Original Post

Frequently while playing Metal Gear Solid V: The Phantom Pain I have run into small, and sometimes larger amounts of hitching and stuttering; the game freezes for a moment but all user inputs are registered. The hitching and stuttering occurs independently of the graphics settings I choose. This has been happening often enough for me to put the game down, and I've been trying to troubleshoot the issue and isolate what might cause this. I've come across many others encountering this issue across a wide range of system configurations.

I meet the minimum system requirements and by all accounts haven't had any issues maintaining 60 FPS. I'm running the game on a GTX 690 (SLI) and an Intel i7-3820 at 4.2 GHz. The game is installed on Windows 10 on a 256GB SAMSUNG PM830 SSD. The game's 'optimal settings' on my system, as recommended by GeForce Experience, are 'Very High' across the board with Volumetric Clouds on and the resolution at 2715×1527 DSR (I've been playing at 1080p).

Here are some examples of the hitching and stuttering in question:

Troubleshooting steps I've tried:

  • Lowering the resolution
  • Changing graphics preset level (Low through Extra High)
  • Changing from fullscreen to borderless fullscreen to windowed mode
  • Enabling and disabling HBAO+ via NVIDIA Control Panel
  • (Re)Unparking all cores
  • Enabling HPET
  • Increasing prerendered frames
  • Running the game as administrator
  • Running the game in Windows 8 compatibility mode
  • Setting the game process to high priority
  • Disabling cores 4 through 7 via process affinity
  • Locking the framerate externally with both NVIDIA Inspector and RivaTuner
  • Overclocking my GPU (GTX 690)
  • Enabling K-Boost
  • Disabling SLI
  • Reinstalling the game on another SSD
  • Setting 'framerate_control' to 'Variable'
  • Altering (lowering) system audio sample rate and bit depth
  • Changing the drive that Windows paging files are stored on
  • Disabling P2P Windows updates
  • Playing the game in offline mode
  • Running a GPUView trace to detect memory overcommitment

Could this be to do with the game loading and unloading assets, updating enemy AI routines, a hardware issue, or something else entirely? Generally, when encountering hitching and stuttering like this, what is typically going on behind the scenes, and where is the best place to start troubleshooting?

Update 1 (12/09/2015)

At Yorik's recommendation, I went ahead and monitored the game via Resource Monitor during gameplay. The only finding of note so far was Steam writing data to 'TPP_GAME_DATA' every time the game hitched. As far as I'm aware, 'TPP_GAME_DATA' acts as the game's save file, but the amount of hitching I've experienced doesn't really jive with the amount of saving going on (unless the game saves data all the time).

'TPP_GAME_DATA' is located in the Steam 'userdata' directory. Assuming this is anything to do with read/write speeds, I wonder if moving this folder to a ram-disk partition and then Symlinking them might help. Failing this, and if the cause of the hitching is indeed the game saving game data, I'm not quite sure what the root cause of the issue might be, how to resolve the issue, or how to troubleshoot the issue further.

Update 2 (14/09/2015)

I captured a GPUView trace in a location where hitching happens more frequently to determine whether or not I'm experiencing stuttering or hitching. I followed the steps described in an article titled, 'Are You Running Out of Video Memory? Detecting Video-Memory Overcommitment using GPUView' in order to do this.

The 'EvictAllocation' events I captured (which are correlated with stuttering) occurred during startup and the main menu, but not during gameplay. http://i.imgur.com/uffL0kg.png

Hitching shows up in the GPUView trace as GPU-queue gaps. http://i.imgur.com/98CMlvh.png Here's a closer view of one of these gaps. http://i.imgur.com/XIR5V9M.png

I'm not entirely sure how to interpret these results properly. One possibility is that I'm experiencing memory overcommitment, but this doesn't really jive with the fact that the game hitches independently of resolution, texture quality, post processing, etc.

Update 3 (15/09/2015)

Setting 'Shader Cache' to 'Off' in NVIDIA Control Panel or NVIDIA Inspector seems to eliminate all hitching. Some people have also suggested to me that lowering shadow quality also eliminates hitching. The former solution worked in my case.

Update 4 (30/09/2015)

After a lot more testing, it became clear that messing with the 'Shader Cache' property wasn't a foolproof method of eliminating hitching. However, it appears to be possible to blunt most hitching by downgrading to GeForce driver version 347.25. Lowering shadow quality also seems to help here. Lowering the shadow presets does have the side effect of reducing the distance at which shadows are drawn in, so if you're in the hitching boat and have no choice but to lower shadow quality, I suggest also increasing the 'CascadeShadowRangeScale' property, which can be found in 'gr_init_dx11.lua'. This way, you'll get the "benefit" of lower shadow quality but shadows will still draw in at a reasonable distance.

Update 5 (30/09/2015)

It is possible to eliminate all hitching by fiddling with shadow quality. I was able to eliminate hitching entirely by altering the 'Medium' shadow quality preset in 'gr_init_dx11.lua'. This requires that you un/repack '~\Steam\SteamApps\common\MGS_TPP\master\0\00.dat' using MGSV_QAR_Tool. I ended up settling on a shadow resolution somewhere between 'Medium' and 'High' but pushed the range scale ('CascadeShadowRangeScale' property) out further than 'Very High' to eliminate draw in.

Best Answer

The hitching in question seems to be related to shadow quality, or perhaps the way recent NVIDIA drivers handle shadows.

It is possible to eliminate all hitching by fiddling with shadow quality, either in game or via 'gr_init_dx11.lua'. I ended up altering the 'Medium' shadow quality preset in 'gr_init_dx11.lua'. This requires that you un/repack '~\Steam\SteamApps\common\MGS_TPP\master\0\00.dat' using MGSV_QAR_Tool. I settled on a shadow resolution somewhere between 'Medium' and 'High' but pushed the range scale ('CascadeShadowRangeScale' property) out further than 'Very High' to eliminate draw in.

So, these are the troubleshooting steps you should try, in order of effectiveness, if you're experiencing hitching:

  • Lower shadow quality (also consider increasing the 'CascadeShadowRangeScale' property, which can be found in 'gr_init_dx11.lua')
  • Disable/enable 'Shader Cache'
  • Revert to NVIDIA GeForce driver v347.25