Fix (most) Stuttering in LFM NLS sessions (and big grids in general)

Discussion in 'Technical & Support' started by Bruno Gil, Feb 25, 2023.

  1. Bruno Gil

    Bruno Gil Registered

    Joined:
    Oct 12, 2020
    Messages:
    128
    Likes Received:
    79
    Hi folks.This guide was done with LFM drivers in mind, but as the info and tweaks here can help everyone and forum formatting is just better, I decided to post it here. Do test it and let me know the results.

    Since a lot of people are having problems with stuttering in the NLS sessions, especially in the first lap, I decided to put together a guide to minimize this to the extent that your hardware allows, without sacrificing visual fidelity where not necessary.
    The problem
    is that newer s397 content eats up A LOT of memory, and especially with the huge field of NLS on one of the most demanding tracks of the game, pretty much everyone will use up all of their available memory (both VRAM and RAM), and windows will start pushing data from the RAM into the paging file. If the paging file size is dynamic, it's "growing" will worsen the problem a lot by hanging the game process, which is in my opinion what most people are experiencing.
    I also suspect there is a memory leak since the last update as 32GB for lowest settings at 1080p is just too much
    To fix this, you need to set the paging file size as fixed and big enough to hold all the game's data.
    - In windows search type "advanced system settings", open it. In the advanced tab, under Performance, click Settings... Go to Advanced tab, and under Virtual memory click Change... Disable the check mark on Automatically manage paging file size for all drives. Click the C drive, set Custom size. Now you have two choices:
    -1): Set both Initial size and Maximum size to a value which when summed to your RAM equals 36GB OR MORE. Go as high as you want but keep in mind that it is disk spce you're using. I have 8gb (don't judge me lol), so, in my case 36000-8000(MB, rounded)= I would set both these fields as 28000. Then, you'd have to stick to the graphics settings I will post below.
    EDIT: this is for my 8GB of VRAM. If you have more, you can remove the difference from your paging file - as long as you stick to the settings I posted below
    -2):
    Load this replay with the graphics settings you wish to use (59 cars from another NLS session - I link the replay because the game won't allow you to add more than 40 something cars in SP, but you can get around this by loading a replay with more cars), wait for everything to load and settle down, then open task manager, in the performance tab click Memory, and check the value you currently have under "committed". Use this value plus another 2 to 5 or so GB to be safe in both the initial size and maximum size (in MB). You should then be able to race with your chosen graphics settings with minimal stuttering, as long as your page file size doesn't end up being much bigger than your RAM. Low FPS is another matter entirely, but I can say that with these tweaks, the game remains playable/responsive even when under 60fps (most of the time).
    Make sure that other drive's page files are set as None. Hit apply and okay, and reboot if prompted. After doing this, you need to:
    -Optional: go to rfactor 2 root folder/UserData and make a copy of Config_DX11.ini. Then go to /UserData/Player and make a copy of your player.json
    -Optional: open player.json with a text editor, search for "Opponent Texture Override", set it to 3. This will retain texture quality of the car skins, making them look much better while not hitting memory because of high poly models.
    -Open the game and set the graphics config as follows (if you followed first option. Some settings can be increased, explained further below).
    [​IMG]
    Optional: disable replays in the game's settings. Some people swear by it, I don't find it makes much of a difference after this fix.
    -Optional/Highly recommendable: Load the replay I linked (put it under /UserData/Replays), let it load and settle. Then scroll to around 1 minute mark or later, select a car from the class you wish to drive, and press Resume. You will now be driving that car and can test both the performance and the all-so-important rolling start with AI takeover-handover. NOTE: for some reason, when first resuming, the AI up the field will crash, create a massive pileup, and crete a whole lot of stuttering because of that (That is CPU related and not much can be done about it so, remember: don't crash ;) ). To fix this I simply press pause after I have control of the car, and click Restart race. Then AI will behave correctly.
    -Restart the computer right before you join the Race server!
    -Optional: after the race, you can rename Config_DX11.ini and player.json to for example Config_DX11_NLS.ini and player_NLS.json, and rename the copies you made prevously to their original names. This way you recover your usual settings, and when next NLS comes around, you just do the opposite.
    About the graphics settings:
    as I mentioned, the problem is related to running out of memory and not a lack of processing power, which means that you can increase some settings to increase visual fidelity without needing more memory/ a bigger page file. So, these settings WILL increase memory usage and should be kept as low as possible for this event:
    -Resolution
    -MSAA
    -Circuit Detail
    -Player Detail (not so much)
    -Opponent Detail - huge in big fields
    -Texture Detail
    -Shadows
    All else you're free to play with (I think, one or two settings im not 100% sure)
    Notes
    - This will remove most constant stuttering, especially in the first lap. However, depending on how much data is on the paging file, you will always get some stutters when the game needs such data. Think when you're exiting the GP section and entering the Nordschleife, for example. The only TRUE fix for stuttering would be to have enough RAM to hold all Committ charge - needing no pagefile -for your graphics settings and the number of vehicles running. In this case you can see how 32GB of RAM is not enough to hold everything in low settings at 1080p! (Uses around 33GB of Committ Charge). And this is 59 cars - afaik the splits in NLS can go up to 80! (Even then it might not be enough to fix it 100% as swapping from RAM to VRAM also causes some microstutters - and good luck holding all the game's 3d data on the VRAM alone)
    - If there is are lots of accidents / there's a pile up, stuttering WILL happen due to CPU usage spiking. Keep safe, don't ruin yours and other's races!
    -If you spin and need to stop, you may or may not get A LOT of stuttering while the field goes past you. This is due to the game swapping cars that were previously not visible and hence on the paging file / RAM into the VRAM, as mentioned above. However it doesn't always happen.
    -With these settings I can run CrewChief and Simhub no problem. However, I recommend closing the browser window after opening the game.
     
    Last edited: Feb 25, 2023
    Kahel likes this.
  2. Julianbruyns

    Julianbruyns Registered

    Joined:
    Mar 18, 2023
    Messages:
    5
    Likes Received:
    1
    Thank you, this fix worked great. I was unable to run a full grid LFM yesterday and today it ran so smooth. Lost all sound about 5 min in but think turning dwn audio samples from 250 to 160 will help this.
     
  3. ebeninca

    ebeninca Registered

    Joined:
    Sep 7, 2016
    Messages:
    741
    Likes Received:
    535

Share This Page