Jump to content

"Spikey" CPU usage in SteamVR/Index


Recommended Posts

I've been re-overclocking my rig. Specs are 8086K @ 5.1ghz, 4.8ghz ring ratio, hyper threading off, RAM at 3800-CL16. Graphics are an RTX 2080 XC Ultra. I've done significant memory and Prime95 overnight testing so I believe the hardware is stable.

 

The game plays pretty well, but I see some 'hitches' where it's not fully smooth. Valve Index at 80hz. Game settings High, shadows off, grass off FXAAx2, far blocks on, not much interesting to report really about the in-game settings. If I use the SteamVR built-in graph, it looks like this:

 

1022150153_Image002.thumb.png.7cc961f1f7bd145025489d0d2ae934b4.png

 

This is while in the hangar looking at the "where should I spawn?" screen on the Combat Box training server. I'm not in a plane, and you can see that there's a CPU spike every 400 frames or so (= 5 seconds). When the spike occurs, the VR system is screwed, and I get a reprojected frame.

 

Here's another graph from a single player scenario. This is a 4v4 and the autopilot is flying my plane for me. Spiky pattern. Again I'm not sure what's causing this, I suspect the mini-spikes are Ai deciding what to do next, but I'm not sure.

 

1258880283_Image003.png.063c77e8f9cc88351edc9d517e0ad58d.png

 

And this is another one. Here I have joined the Combat Box live server, but I haven't chosen a side or spawned a plane.

 

1815872905_Image007crop.thumb.png.c294a54ee2ffe891a8403a0aa8b32ba3.png

 

And here's the graph once spawned in, A-20, sitting at the spawn point:

 

1161486042_Image009crop.thumb.png.a670926a1d2f04fa27327f0feeb8db0e.png

 

Does anyone else see this kind of thing? Can you plot a graph like this in SteamVR and compare? You get the graph by clicking the little menu on the SteamVR status window, then Developer > Advanced Frame Timing.

 

I've tried several things. I've tried switching from High to Balanced, I've tried switching off Far Blocks, basically trying to find things that might be causing CPU usage spikes. I've set the priority of the IL2 process to 'Above Normal' so it gets priority over other processes, and I've closed down as many apps/services as possible. I can soften the spikes, but I can't eliminate them. And it's a spike from ~8ms to ~16ms, there's no way I can overclock my PC enough to smooth that out!

 

The nuclear option is going to be me reinstalling Windows but I figured I'd see if anyone else can do their graph and either show the same problem or show a smooth graph, which at least would give me a hint that it's my PC or the game itself. If it's the game, well OK, I can't do anything about that, but if it's my PC or settings I can fiddle some more.

 

Edit: For anyone reading this in the future, I took the nuclear option and bought a new SSD and installed the bare minimum Windows + IL2 + SteamVR on it. Same problem, so it's not something else on my machine causing the spikes.

Edited by Alonzo
  • Upvote 2
Link to post
Share on other sites

Apologies for bumping my own post, wondering if any SteamVR users could try plotting the graphs above while flying (any kind of flying) and see if you see CPU spikes.

 

@chiliwili69 @=SFG=capt_nasties @c6_lefuneste @Bernard_IV - I hope you don't mind me pinging you by name, but I believe you use SteamVR. Am really looking to see if it's my system or something I've configured wrong, vs a game issue.

Link to post
Share on other sites

@Alonzo (I have an index as well) for me those hitches that you have shown in your first post are GUI related. 

 

It clears up for me if I simply disable the GUI while flying. I have it in the menus as well but I found no remedy there. 

 

 

Edited by Floppy_Sock
Link to post
Share on other sites
1 minute ago, Floppy_Sock said:

@Alonzo (I have an index as well) for me those hitches that you have shown in your first post are GUI related. 

 

It clears up for me if I simply disable the GUI while flying. I have it in the menus as well but I found no remedy there.

 

D'you mean "hide HUD" ?

Link to post
Share on other sites
5 minutes ago, Alonzo said:

 

D'you mean "hide HUD" ?

Yes. Sorry that was unclear. SRS is such a life saver on CB. I can simply listen for the calls instead of having to have my HUD up. 

 

il2gpucpu.png.735f2ed27d5c223f346df3a4dc91c290.png

 

See here I have consistent CPU driven delayed frames much like what you showed. I also have almost idle temperatures which means there's something holding the frame.  That goes away with the HUD disabled for me. I wonder if it's tied to some sort of update call for the HUD?

Edited by Floppy_Sock
  • Thanks 1
Link to post
Share on other sites
16 minutes ago, Floppy_Sock said:

Yes. Sorry that was unclear. SRS is such a life saver on CB. I can simply listen for the calls instead of having to have my HUD up.

 

See here I have consistent CPU driven delayed frames much like what you showed. I also have almost idle temperatures which means there's something holding the frame.  That goes away with the HUD disabled for me. I wonder if it's tied to some sort of update call for the HUD?

 

Super interesting, I'll give that a try. Thanks so much! (And to everyone else who responded).

  • Like 1
Link to post
Share on other sites

You may never find what's causing this because it could be CPU threads' deadlocking (circular scenario where thread 1 waits for 2, while 2 waits for 1), or threads contending for access to a non-sharable resource (ie. semaphoring). In situations like those where the internal software code causes those problems, only software devs with deep understanding of all the pertinent parallel processing nitty gritty can even attempt to tackle them (or in our case: one dev who "wears many hats").

Link to post
Share on other sites
13 hours ago, Alonzo said:

but I believe you use SteamVR

 

Tomorrow I have a bank holiday day, so plenty of time to test. I also use Index at 80Hz, but in a more modest CPU.

Let me know a screenshot of your game settings and the map to try. I only fly SP.

Edited by chiliwili69
Link to post
Share on other sites

Greetings,


I am having the same problem as well. I noticed that if I play single player, or on a server with a low ping, I do not get these high spikes in my frame time. I have a 3700x/2080TI and run 80MHZ with 130 supersampling on my Valve Index. Sitting idle on a runway in single player or on a low ping server, I will get around 7ms GPU and 6ms CPU frametime. On a busy server, I will get these ramdom CPU red spikes that go up to 20ms constantly. This is with or without the HUD on. I seen a thread on the DCS server that might apply to this situation as well but havent looked into it further. The FPSVR screenshots are what I just took from the coconut server at a 22 ping, and the Wings of Liberty that was 218. Both on the runway with the exact same settings..


https://forums.eagle.ru/showthread.php?t=212325

Wings of Liberty.jpg

Coconut.jpg

Edited by UperDinero
Link to post
Share on other sites

I have done some testing:

 

Just in hangar: Everything OK

100142906_hangarview.thumb.jpg.8aa8e21e28b269f244b638d0a4c929dc.jpg

 

picking kuban place, all OK

373906618_pickmap-place.thumb.jpg.bef5d20a2c645ba820558337d78b792d.jpg

 

just 2 fighters agaisnt 2 fighter and 4 bombers: Just straight fly. No clouds.

1617741399_at1500m.thumb.jpg.3a23a591e827108a63a86f0314658702.jpg

 

inafter heavy combat being injured:

combat.thumb.jpg.045538dde60972b0efb2f652a65a7a4e.jpg

 

I don´t know how to play in MP but I can try to see if I can see the periodic sttuters.

 

Link to post
Share on other sites

I have just tried MP in CombatBox training and dogfight.

At the hangar I see exactly the same spikes, it is just frame missed by CPU:

handar_mp.thumb.jpg.d707d25c60064827368297d869beed23.jpg

 

The same at place selection:

1207060004_pickmap-place_MP.thumb.jpg.92128413d1d8cee3434dd4e39828a8e7.jpg

 

I looked at the detail view in the frame times. It´s seem the root cause is the orange line which is "new frame ready":

detail.thumb.jpg.898d674f81d7ed35fc8276a08836ed77.jpg

 

I have no idea about how to interpret those trendlines correctly (not a VR developer or guru).

 

What it is clear is that this problem only appears in MP in my case. And already apear in the hangar, so not related to performance or settings.

 

Is there any app to look at what the CPU is processing at any time?

  • Upvote 1
Link to post
Share on other sites
6 hours ago, chiliwili69 said:

I have no idea about how to interpret those trendlines correctly (not a VR developer or guru).

 

What it is clear is that this problem only appears in MP in my case. And already apear in the hangar, so not related to performance or settings.

 

Is there any app to look at what the CPU is processing at any time?

 

This is excellent data, thank you for doing that. It looks like you have reproduced my problem. The graph scrolls right-to-left:

 

spiky-reproject-2-frames.thumb.png.29286864f86e6f5a683769a19be029f0.png

 

The above shows a single frame spike on the CPU and then about 2 frames of reprojection (red, bottom) after the frame spike. I tried turning my HUD off last night and it made no difference.

 

I am wondering if the CB training server is doing something bad, for example you can see we have many many airfields. It could be that the server is sending an update to the client that "here are the 30 available airfields" and the client chokes a little on that data. Or some other data related to multiplayer. I'm going to try again with different multiplayer servers to see if this is a Combat Box problem or a more general issue.

 

 

Link to post
Share on other sites

This is Berloga, sitting in the lobby before spawning. They have a sensible number of airfields (unlike CB training! ha!) so my conclusion is there's something going on, probably multiplayer sync related, but I'm not sure what.

 

spiky-reproject-berloga.png.cf4cdb3ece1f5e0f47cce44c4243ec83.png

Link to post
Share on other sites
1 hour ago, ECV56_Lubermatz said:

Should we move this to technical issues? Or the MP stuttering thread?

 

It certainly looks like an issue confirmed by several people, and it's multiplayer related. How do we move a thread?

Link to post
Share on other sites

That same problem happened to me after the last bos update, I discovered (try it) that already inside the server you start the flight and you simply hit the ESC on your keyboard and hit ESC again to keep flying ... inexplicably That nonsense took away those CPU spikes, which I did as a result of this ... Reinstalling the sim completely, once reinstalled it worked perfect.

Link to post
Share on other sites
  • 2 weeks later...

Guys, I went down the rabbit hole with this spiking again yesterday.

 

I went searching through the forums not related to IL2 to see if this issue crops up elsewhere and it does.

 

It seems that in certain cases, i/o interrupts seem to have profound effects on the CPU. 

 

See this reddit post for example: 

 

Additional software / hardware that might cause issues similar (this comes directly from the steamvr support page):

  • Asus AI Suite
  • JDS Labs ODAC USB Audio device
  • TP-LINK 300Mbps Wireless N PCI Express Adapter TL-WN881ND

Turns out I had a lot of these things running in the background and if ya'll are running an Asus, MSI board I would check to see if you do as well. I've uninstalled all of it and stopped a lot of these processes from running and I've noticed considerable improvements in these very short but consistent CPU driven dropped frames. 

 

There is also a thread about AMD drivers causing an issue but this is from last year so I'm not sure that's still relevant. Similarly, I've seen threads saying that an idle wifi adapter was causing these interrupts as well. Potentially similar to why that above card wasn't recommended by steam.

 

Long story short, spend some time looking very carefully at the services you have running in the background. Be weary of LED control software. Try to cut all those background utility programs out and see if it helps you. Even ones that don't seem to be eating any CPU. 

 

 

Link to post
Share on other sites

I bought a new SSD and installed a fresh copy of Windows to it. I then removed all the default bloatware (Spotify, Microsoft, really?) and installed just enough to get IL2 working. So IL2 (non-Steam version), Steam (for SteamVR), latest NVidia drivers, and nothing else. No graphics card control software, virtually nothing running in my task bar.

 

The same issue still persists. While there are spikes in single player or SP vs AI QMB, I think they're all to do with loading geometry or textures or sound effects. After about a minute, there are zero CPU spikes in single player. In multiplayer, there is a persistent CPU spike every 5 seconds. I have a 5.1ghz 8086K with 3800mhz RAM and an RTX 2080.

 

At this point I am convinced there is something happening every 5 seconds in multiplayer that causes this hard CPU spike and corresponding VR frame drop.

 

I'm sure my PC will be happier now I have a dedicated "VR" hard drive and my overall experience will be better, but this issue is definitely real and definitely to do with the IL2 engine itself.

  • Upvote 1
Link to post
Share on other sites
11 minutes ago, Alonzo said:

I bought a new SSD and installed a fresh copy of Windows to it. I then removed all the default bloatware (Spotify, Microsoft, really?) and installed just enough to get IL2 working. So IL2 (non-Steam version), Steam (for SteamVR), latest NVidia drivers, and nothing else. No graphics card control software, virtually nothing running in my task bar.

 

The same issue still persists. While there are spikes in single player or SP vs AI QMB, I think they're all to do with loading geometry or textures or sound effects. After about a minute, there are zero CPU spikes in single player. In multiplayer, there is a persistent CPU spike every 5 seconds. I have a 5.1ghz 8086K with 3800mhz RAM and an RTX 2080.

 

At this point I am convinced there is something happening every 5 seconds in multiplayer that causes this hard CPU spike and corresponding VR frame drop.

 

I'm sure my PC will be happier now I have a dedicated "VR" hard drive and my overall experience will be better, but this issue is definitely real and definitely to do with the IL2 engine itself.

 

I'm curious if in addition to this, you try @SAS_Storebror's FUMS utility?  It certainly gives me a smoother experience, and I think it has to do mainly with the adjustment it makes in the main thread's affinity mask.

Link to post
Share on other sites
10 hours ago, Alonzo said:

The same issue still persists. While there are spikes in single player or SP vs AI QMB, I think they're all to do with loading geometry or textures or sound effects. After about a minute, there are zero CPU spikes in single player. In multiplayer, there is a persistent CPU spike every 5 seconds. I have a 5.1ghz 8086K with 3800mhz RAM and an RTX 2080.

 

At this point I am convinced there is something happening every 5 seconds in multiplayer that causes this hard CPU spike and corresponding VR frame drop.

 

Very good experiment. Now you have isolated and identified the issue much better.

I wonder if there is a software able to spy what Windows is doing every milisecond. Something like Event Viewer, but I really don´t know too much about it.

Link to post
Share on other sites
17 hours ago, Izel said:

 

I'm curious if in addition to this, you try @SAS_Storebror's FUMS utility?  It certainly gives me a smoother experience, and I think it has to do mainly with the adjustment it makes in the main thread's affinity mask.

 

@ECV56_Lubermatz I think it's this one: https://www.sas1946.com/main/index.php?topic=59488.0

 

@Izel What's your CPU config and which affinity mask are you using? I have an 8086K which is 6 core, hyperthreaded, but I turn HT off so they are all physical cores.

 

I'm not hopeful that process priority or affinity masks are going to do anything, this is literally the IL2 process deciding to use 20ms to process a frame, once every 5 seconds.

  • Like 1
Link to post
Share on other sites
  • 4 months later...
On 9/10/2020 at 10:18 AM, DBCOOPER011 said:

 

 

Greetings,


I am having the same problem as well. I noticed that if I play single player, or on a server with a low ping, I do not get these high spikes in my frame time. I have a 3700x/2080TI and run 80MHZ with 130 supersampling on my Valve Index. Sitting idle on a runway in single player or on a low ping server, I will get around 7ms GPU and 6ms CPU frametime. On a busy server, I will get these ramdom CPU red spikes that go up to 20ms constantly. This is with or without the HUD on. I seen a thread on the DCS server that might apply to this situation as well but havent looked into it further. The FPSVR screenshots are what I just took from the coconut server at a 22 ping, and the Wings of Liberty that was 218. Both on the runway with the exact same settings..


https://forums.eagle.ru/showthread.php?t=212325

Wings of Liberty.jpg

Coconut.jpg

 

 

ANy updates on this issue? this is exactly the problem I am having with VR. My fpsVR looks the same, usually green but with orange/red spikes just like this Very frustrating and really detracts from the experience which would otherwise be very good.

Link to post
Share on other sites

Its still occurring for me in certain circumstances, but to a much lesser extent. I know have a 3090, 10700k at 5.1 GHZ,Valve Index and gigabyte fiber internet that dropped my ping time about 20ms.
I play IL2 almost all maxed out at 90MHZ, using MSAA at 2X combined with 130 super sampling,  I have very little or no re-projection at all in single player or in server that less crowded. I do however notice that  I get CPU frametime spikes frequently in a crowded online server. I assume this is because of the amount of traffic the CPU has to process and the 10700k just don't cut it as much as I would like

Link to post
Share on other sites

Yes and yes. But: Part of it is IL-2's engine. Turn off the HUD completely and see if there spikes get lower or disappear. It pings updates and creates those spikes even in my system as long as the HUD is active.

 

Link to post
Share on other sites

Here are my frametimes on 2 different servers with the same exact settings etc.. Finnish Server (ping-200ms) was maxed out with 84/84 players. AKA Expert Server(ping-13ms) was 7-40 players. My unscientific guess is that because I was hit harder on my CPU frametimes then GPU it most likely because of the traffic the CPU had to process. It might be something involved with the internet/IP ping times, or a combination of both. I wish we could specifically identify what it is..

Finnish Server VR.JPG

AKA Expert Server.JPG

  • Upvote 1
Link to post
Share on other sites

Forgive me for requesting a test I could do myself - but have you noticed these stutters increase when you fly near other aircraft?
Also, have you tried disabling "show custom skins" in settings -> game?

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...