Stutters when Rolling Cache file is full and start's to get rolled with new data

Description of the issue:

I get sudden stutters while cruising. After I refresh (recreate) the rolling cache and carry on flying, everything’s back normal and smooth again for the next few flights.
After some research and looking through old 2020 bugs also, it seems when the rolling cache file is fully filled and the sim starts to have the data rolling (delete old and save new), this micro stutter issues are starting to appear.

[PC Only] Did you remove all your community mods/add-ons? If yes, are you still experiencing the issue?

yes

How often does this occur for you (Example: Just once, every time on sim load, intermittently)?

Just fly to new places for a while until you see the micro stutters, which I assume it happens when rolling cache is starting to get rolled with the new data.

Please list clear steps you took in order to help our test team reproduce the same issue:

  1. Stutters start after a few flights
  2. Re type my set number in rolling cache and save so it sets a fresh cache
  3. fly until micro stutters start an repeat the above process and stutters disappear.

[PC Only] Are you using Developer Mode or have you made any changes to it?

No

[PC Only] Many issues may be due to an outdated graphics card. Please state your Graphics Card Driver Manufacturer (NVIDIA, Intel, AMD) and Version:

Nvidia driver 5th December 2024 566.36 with fresh DDU install


:loudspeaker: For anyone who wants to contribute on this issue, Click on the button below to use this template:

Do you have the same issue if you follow the OP’s steps to reproduce it?

Provide extra information to complete the original description of the issue:

If relevant, provide additional screenshots/video:

Does the audio stutter too?

Will try to recreate this when i am at home. Is it better with cache disabled altogether?

I’m not sure you can disable the cache on 2024. I’m just running a test as we speak. I deleted my cache file of 100GB and reset the new one and left it at the 16GB it’s shipped with and re-creating the flight I did this morning and see if the stutters come back. I’ll let you know later if the micro stutters start again or it’s a possible cache size issue.

Forgot to say with my audio, I get like a static pop/static now and again when the GPU is at 100% and high vram but I think that’s hopefully going to be addressed in the next update next week.

I get the audio stutters/popping with high FPS and mainthread limited. I will check if removing/resetting the rolling cache file helps.

Yeah do let me know. I found turning my ram from 3600mhz to 3400mhz helped.

I’m almost done with replicating the previous flight where the stutters started in France. With a new cache set and set at the standard 16gb I’ve had no micro stutters so far. I will continue to monitor it over the next few flights on these settings and leave the cache now to see if its working correctly.

So i replicated the exact same flight i had with the previous cache and can confirm i had no micro stutters, it definitely has issues with the cache and when the files get full. I will continue with the 16gb cache and report back over the next few flights if the stutters re appear. Checked the cache file and it already is at 16gb so I’m sure the next flight will tell when i have some time if having a big cache directory introduces stutters or just the cache as a whole has issues when over writing files.

The size of the actual file is always 16GB though, It does not grow, it’s always at full size but only contains the same ‘empty’ character. I changed my cache size to 32GB and the file was 32GB in size instantly (if you exit and enter the folder again in Explorer).

So how do we know how full the cache is? I think it just changes the bytes in the file regardless of their value.

By this logic it shouldn’t matter how much cache is used, because when it’s ‘empty’ every byte is a 0 and it overwrites that. And when it has changed all the bytes in the file it starts at the beginning of the file again and change that byte to the new value.

But i will also do some tests how the cache actually works and try to record some data.

When i first created the file and loaded in, before i did a flight i looked and it said 0 on the file, after the flight it was 16,777mb so I’m presuming it filled it up, i could be wrong though.

Yeah it takes some time to create the file. But you can try it. Resize it in the main menu to something larger. Then re-open the folder in file explorer. It should have resized.

It kind of makes sense, resizing a file later creates a lot of fragmentation on the hard drive. If you create one big file up front you have everything in one piece on the drive.

This doesn’t mean your theory doesn’t work. It just means we have no way to see what the usage of the cache is.

Just doing another flight now so will see if the stutters are introduced, Doing EGAC to EGKK so it should put some stress on it on landing in the FENIX, BATC + GSX!

You touched on multiple aspects. Here are some thoughts and observations from my tests:

  • A) Yes … the cache file should extend to max cache size right after adjusting it in the settings
    • B) … but some people report that they cannot adjust the size at all.
  • C) Yes … from the outside you cannot tell how much actual data is in the cache
  • D) I so far have not seen any hint how the cache is actually operated, meaning …
    • how and when space in this buffer is reused (FIFO, LRU, TLRU, … etc),
    • how the index is handled (is there some embedded SQLite index?)
  • E) Fragmentation would be an issue on HDDs … but has no impact of SSDs
    • … the zero prefill (today, in the SSD age) seems to be more about pre-claiming the large space on the disk, so that no other process will grab it “behind” the sims back.
  • F) Most of the sound (now) seems to come from files on disk … not the rolling cache.
  • G) I fear (hope?) that the stutters are not related to the cache.
    • In contrast to FS2020 I am now no longer “main thread limited” … and so I do hope that all the cache and network handling is no longer affecting the main thread.

I am using an AMD card and in FS2024 so far flights have been really smooth. But there are other reports on this thread too … and so obviously something is still “not smooth” with the data pipeline … from the servers to the VRAM.

If you are interested in my RollingCache recordings (where I for example stumbled over the sound data source) you can look here:

It might provide you with some helpful “order of magnitude” data volumes to allow a good guess about how much data gets written to the cache over a certain period of time (say a flight at 3,600 ft at 180 ktas).

1 Like

Thanks for this info, ill take a proper read shortly.

I can say that my test flight to Gatwick was somewhat successful. No micro stutters occurred, Did get some performance loss on landing like reported on other threads, but it came back right away as i slowed and taxied to the gate. I’ll do a few more days of test flights with the cache left alone and left at 16gb and see if it has solved the micro stutters. It might seem that if i raise my cache size like i did to 100gb before, it might introduce the micro stutters for some reason. So far though 2 flights of over an hour each and no micro stutters at the moment. I’ll report back when I’ve done a few more test flights.

Another thing ive noticed today is turning the Off Screen Terrain Pre-Caching down to low from high and medium has completely changed the sim in terms of performance. No stutters, and buttery smooth even on TAA. I think a lot of our vram and performance issues are related to cache and pre-caching.

This sounds plausible … and would be in line with what Sebastian said during the last dev stream.

I have no idea how DX12 works, but it sounded like games can “allocated” more memory on a GPU then that GPU has actual VRAM … which will cause the GPU (DX12 driver?) to “swap” out memory over the PCI bus back to main RAM. If that really is how it works it must be a true performance killer.

In that case what you @Mercian87 are recommending makes a lot of sense … if your VRAM usage is very close the actual VRAM size.

In my cases the opposite seems to give me better performance. I see a lot of unused VRAM, and as a sightseeing goose I often look around (e.g. look back) … and if “previous” data is still in VRAM then it does not need to be copied over PCI again.

I think it is very important the Asobo document the different “sliders and checkboxes” so that tuning the system for different hardware and usage patterns becomes easier. In that context I really liked to hear that the game will (does?) bring up an alert panel warning the user that this VRAM-swapping is going on. This kind of transparency is very helpful.

Having some advanced metrics (e.g. via the Developer menu) would be even nicer.

2 Likes

Interesting to hear about micro stutters when fs2024 cache is getting full as this was exactly what happened for me in msfs2020. It was reported as a bug for a while, but they didn’t address it, but it was enough of an issue for me to completely disable my rolling cache file which led to a much smoother and generally stutter free msfs2020 experience.

It’s disappointing to hear that this issue is still a thing in fs2024 as caching is now more important than ever given the sim’s high level of streaming.

I haven’t tried changing the pre cache setting at all and have mine currently set to Ultra.

1 Like

Same for me in FS2020. The correlation was obvious. I disable the cache and was happy ever after.

However, in FS2024 the RollingCache did (so far) not seem to trigger stutters on my system. I hope (suspect) that the radical multithreading rewrite of the engine did modify the flow of data inside the game in a substantial way.

But I am not claiming that others are not seeing stutters nor do I claim there can not be a causal influence from the cache. However, personally I suspect that there are other causes. Overall stutters are sadly hard to reproduce.

2 Likes

I recently purchased the iFly 737 Max 8 and experienced audio stuttering while taxiing to the runway and after landing. I started looking for solutions on the iFly Discord - unnecessarily, as I remembered that I had rolling cache enabled in MSFS 2020 (100GB on a fast NVMe drive). After clearing and disabling the rolling cache, the audio stuttering issue is gone.

1 Like

That’s interesting, I can’t remember if my audio was audio stuttering, but visuals certainly were. Probably both tbh. I got fed up with emptying the cache on a random basis so ended up disabling it instead in fs2020.
In 2024 I have 120GB cache and haven’t seen any issues with it (yet).

1 Like