Occasional Freeze/Studder

Discussion in 'Technical & Support' started by TheSuisseExpress, Jun 16, 2020.

  1. TheSuisseExpress

    TheSuisseExpress Registered

    Joined:
    Jun 16, 2020
    Messages:
    7
    Likes Received:
    8
    Hi all,

    I've been playing Rfactor 2 for a few months now (I've racked up 46 hours and counting), but have only recently hit a snag in my racing. Every so often (Maybe every 15 minutes?) I get a quarter to half second freeze where my car stops, but the timing, AI and delta react as if I have suddenly stopped for a split second and then resumed my racing.

    I've done some (limited) diagnostics to try and figure out what it is, and I've discovered its definitely a CPU limitation - which makes little sense because, not only am I running a nearly new machine with fairly decent specs (see below), but 95% of the time the bar in the CPU Time display (I think it was that one - the one with the histograms) was never more than 25-30%, but spikes to 100% when the freeze occurs. I'm not pushing the sim especially hard when it comes to field size, only 16 ISI stock cars around a modded Darlington track that I was using as a benchmark to try and track down the problem.

    The plot continues to thicken because, as far as I know, there aren't any background programs that could cause such a hiccup (again, brand new computer). I can get the CPU usage down to 1% with only Task Manager open, so there's not a lot to see there. I've tried turning down graphics, but that didn't seem to help, considering I wasn't really pushing them as it was. I do record some of my races, which I though was the cause of this problem, but this was evidently not the issue because my tests today had the freezes, but OBS (recording software) wasn't running, let alone recording. I was listening to a podcast running off YouTube in the background, but this was probably also not the case because a) it was the only tab open, and b) I've had it occur when its just me driving around with AI.

    I've done some research into solutions, but most seem to be a few years old and suggesting what I've already checked. Background programs raining on your parade? Checked. Wheel running at a different frequency to the game? Double checked. Overclocking software? Running my Ryzen 7 3700x at base clock. Overheating? The case is all fans.

    I'm not sure where the problem lies, but I was hoping someone in the community has an idea of where to look/what to change. I've heard some people say to try deleting some files in the directory to essentially reset them, which I may give a shot. I was hoping to get video of what is occurring, but as luck would have it, for the 40 minutes I was recording, it never happened.

    Thanks in advance.

    Specs as promised:

    Ryzen 7 3700x
    RTX 2060 super
    16 GB Corsair 3000mhz Ram
    Rf2 is on a HDD because I ran out of room on SDD; afaik this only affects loading time since you are going around in circles, thus rF2 doesn't need to load and dump parts of the track in every lap.
    Thrustmaster TMX Forcefeedback wheel (nothing fancy)
     
  2. Highlandwalker

    Highlandwalker Registered

    Joined:
    Nov 11, 2016
    Messages:
    528
    Likes Received:
    1,617
    Try this it may be of help. I think what happens is when it is saves to disc it causes the cpu to spike which causes the stutter or slight pause, when saving to memory the hard drive is not used to save while driving. It is only used to save replay when you return to the pits. My cpu usage never goes above 40% at the worst.
    In the player json file, scroll down to the Game Options section and find the lines as below and set to true. This setting totally cured all my stuttering problems and I have never had any memory problems with 16gb of memory. I tried a lot of other suggestions on the forums to stop stuttering but this is the only thing that worked. This is my permanent setting, it's worth trying and if it doesn't work for you, it' easy to reset. Good luck.
    "Record To Memory":true,
    "Record To Memory#":"record replays to memory rather than disk (may possibly reduce stuttering, but at your own risk because memory usage will be significant for long races)",
     
    HomieFFM likes this.
  3. TheSuisseExpress

    TheSuisseExpress Registered

    Joined:
    Jun 16, 2020
    Messages:
    7
    Likes Received:
    8
    I did some thorough testing with the change you suggested, and it seems to have fixed the problem (knock on wood). I was even able to turn up graphics a ton knowing they weren't the cause. Thanks a ton!
     
    Highlandwalker likes this.
  4. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    9,448
    Likes Received:
    4,468
    It's really curious how this is an issue for some systems and not others. Until 2 years ago I was running a potato and although I had occasional CPU issues from advancing rF2 physics, I never had problems writing replays to my hdd - despite also logging constantly with motec.

    Must be a pattern - surely not as simple as the drive going to sleep? Think it would pause for longer in that case.
     
  5. Highlandwalker

    Highlandwalker Registered

    Joined:
    Nov 11, 2016
    Messages:
    528
    Likes Received:
    1,617
    Glad it worked for you
    I found this out because when I had the stuttering I noticed the hard drive light was flickering and the cpu bar of the display was also peeking, so I scoured through the player json to find any thing that may be connected to this and found that this was the only thing that may be connected. Changed to true and instantly no more stutters or pauses, at the time I had 16gb of memory and had no problems. I have now increased my memory to 32gb to be on the safe side. I have had look at the size of the replay files in rf2 and the biggest file is just over 2gb which was a 20 lap race at Le Man with a grid of 56 cars and running at max graphic settings. If your doing a practise session, each time you press ESC to go back to the pits it saves a replay so you may have several replay files for practise session but only one file for a race. I don't think it's the actual write time to the hard drive but the initial activation of the drive that causes the stutter, it seems to record in chunks and the more complex the track and the more cars the more chunks it records and more stutters, when ESC is pressed or the race is finished the record file is closed. I am not a programmer or computer technician, these are just my observations and thoughts on this problem. I think any body who has a stuttering problem should try this first.
     
  6. pety100

    pety100 Registered

    Joined:
    Nov 29, 2019
    Messages:
    58
    Likes Received:
    9
    Hello. So If I turn off completely the replays in the game, I can achieve the same result, right? I'm just curious about that. Because If I understands well, these stutters for him happened because of replay was on?

    Thanks
     
  7. Highlandwalker

    Highlandwalker Registered

    Joined:
    Nov 11, 2016
    Messages:
    528
    Likes Received:
    1,617
    I haven't tried that because I want to have replays, you may be correct. You can not tun off instant replay you can only reduce to 10-seconds, so may still be possibly to get stutters. I have replays set to full and record to memory is my default setting and have absolutely no problem with these settings.
     
  8. pety100

    pety100 Registered

    Joined:
    Nov 29, 2019
    Messages:
    58
    Likes Received:
    9
    I can. If you set to off both of the replay options, record replays and record hotlaps. At least I think, because I don't get any instant replay with these options. Or correct me if I am wrong.
     
  9. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    9,448
    Likes Received:
    4,468
    I would say the short instant replay is always stored in memory and won't affect things.
     
  10. HomieFFM

    HomieFFM Registered

    Joined:
    Sep 24, 2019
    Messages:
    101
    Likes Received:
    83
    Really big thank you! I was searching through the whole forum, nothing helped, but your advice worked finally!
    These stutters were driving me insane, now everything is smooth again! Thank you so much! :)
     
    Highlandwalker likes this.
  11. Highlandwalker

    Highlandwalker Registered

    Joined:
    Nov 11, 2016
    Messages:
    528
    Likes Received:
    1,617
    Glad you found that it was of helped. I still have set to memory and working fine.
     
    HomieFFM likes this.

Share This Page