How many AI before fps drop?

Discussion in 'General Discussion' started by Fleskebacon, Jun 11, 2019.

  1. Fleskebacon

    Fleskebacon Well-Known Member

    Joined:
    Feb 16, 2015
    Ratings:
    +258 / 0 / -0
    My game runs smoothly at around 100 fps, but when racing with AI enemies it will occasionally drop to like 50 fps, which causes stutter. Happens mostly on the long straights of any track. This happens even if I disable all antialiasing and set graphics to low. The GPU isn't maxing out, and neither is the CPU.

    But if I reduce the number of enemies, the problem pretty much disappears, so it's obvious what's causing the issue. I normally race with 27 enemies, is that too much for an i5 4690k? If so, why isn't the CPU maxing out?
     
  2. MattStone

    MattStone Well-Known Member

    Joined:
    Mar 6, 2016
    Ratings:
    +169 / 0 / -0
    The ai uses only one core, maybe spread over two so it means the ai won’t use 100%.
    If you monitor your cores you will see that only a couple of them max out

    I run a 3x1080p i7 8700k set up and if I want to keep above 60 FPS I can only have 26 ai
    Any more then that I start to drop below 60 on some tracks

    In saying that I can run more ai but have to set it so that only 25 are viewable
     
  3. Fleskebacon

    Fleskebacon Well-Known Member

    Joined:
    Feb 16, 2015
    Ratings:
    +258 / 0 / -0
    Ah, of course, I didn't think of looking at the utilisation of the separate cores. Thanks.

    Will reducing the number of visible AI cars solve the problem when racing against more enemies?
     
  4. MattStone

    MattStone Well-Known Member

    Joined:
    Mar 6, 2016
    Ratings:
    +169 / 0 / -0
    It does for me

    But to be honest I hate seeing cars suddenly appear down the road so I choose to just each with 25 cars.
     
    • Like Like x 1
  5. OtterNas3

    OtterNas3 Well-Known Member

    Joined:
    Jan 9, 2018
    Ratings:
    +315 / 0 / -0
    GTX-1080TI Ryzen 7 2700 (Both on standard clocks)
    1440p RTSS framelimiter to 62.1 to unhook the vsync

    Running 99 AI (9 diff Classes) on Nordschleife 24h Layout, max visible Cars (52) with solid 62 fps, never drops below!

    I'm happy :)
     
  6. Bull Shark

    Bull Shark Well-Known Member

    Joined:
    Mar 14, 2019
    Ratings:
    +162 / 0 / -0
    I run 3x1440 all settings on high with an i7 8700K and a 1080ti, 29AI and easily above the 90FPS.
     
  7. MattStone

    MattStone Well-Known Member

    Joined:
    Mar 6, 2016
    Ratings:
    +169 / 0 / -0
    mmmm. On all tracks? Spa for example?
    What AA?
     
  8. ravey1981

    ravey1981 Well-Known Member Beta tester

    Joined:
    Apr 15, 2018
    Ratings:
    +873 / 0 / -0
    Talk to me about this frame limiter. I currently have to use v-sync as I experience micro stutters without it. I know v-sync is said to cause input lag even though I've never felt it... Would frame limiting be beneficial to me? Also...why 62.1?
     
  9. Fleskebacon

    Fleskebacon Well-Known Member

    Joined:
    Feb 16, 2015
    Ratings:
    +258 / 0 / -0
    This is slightly OT, but I'm using the framerate limiter within the nVidia driver. Have been using vsync for ages, but setting the limiter to 60 fps and disabling vsync reduces display lag noticably, while presenting minimal tearing and a silky smooth framerate.

    The limiter and fps that needs to be set varies from setup to setup. I need to use exactly 60 fps.
     
  10. OtterNas3

    OtterNas3 Well-Known Member

    Joined:
    Jan 9, 2018
    Ratings:
    +315 / 0 / -0
    If you limit to 60 it drop sometimes to 59.9.
    In fullscreen with v-sync off, nvidia kicks in and activates it to not get tearing, microfreezes.
    With 62.1 it sometimes drops to 61.9-62 in the background, and vsync stays off cause it is over 60.
    Depends on your monitors refreshrate ofcourse.

    For me V-Sync On was terrible, input lag is noticeable, specially if you need to make fast direction changes.
    And V-Sync off is not a option if you want to record/stream.
    If you do NVenc encoding you get microlags on a higher bitrate recording with vsync off and no framelimit
    If you do Software encoding (better quality) on a higher bitrate with vsync off and no frame limit, erm yeah...

    For me the way i set it up i have no problems at all, even doing a record with software encoding up to 25mbit
    And NVenc works flawless on 50mbit+ bitrate recordings.

    If you desire, dont install Afterburner package, just the Riva Tuner Statistics Server, it has one of the best Framelimiters atm.
     
    • Informative Informative x 1
  11. Nico Kunze

    Nico Kunze Well-Known Member

    Joined:
    Sep 1, 2018
    Ratings:
    +395 / 0 / -0
    Where exactly can one find that fps limiter?
     
  12. Bull Shark

    Bull Shark Well-Known Member

    Joined:
    Mar 14, 2019
    Ratings:
    +162 / 0 / -0
    I have to check this out.. will try test it later this week. During the week I do not have much time to test but in the weekend I give it a go..
     
  13. OtterNas3

    OtterNas3 Well-Known Member

    Joined:
    Jan 9, 2018
    Ratings:
    +315 / 0 / -0
    You can download the RTSS here:
    https://www.guru3d.com/files-details/rtss-rivatuner-statistics-server-download.html

    After installation run it and it will be in your Taskbar Symbols
    Open it up and you will see the main window, go to "Setup" first (Blue button on the bottom)
    Make sure you have the follwing options ticked:
    "Display integer framerate"
    "Enable 64-bit applications support service"
    "Enable framerate limiter"

    Hit OK

    Next click on "Add" (Green button on the bottom)
    Browse to your RRRE.exe or RRRE64.exe which ever you normally run

    On the main window, set:
    Start with Windows: ON (or start manually each time)
    Show On-Screen Display OFF
    Application detection level: LOW
    Stealth mode: OFF
    Custom Direct3D support: OFF
    On-Screen Display support: OFF

    Framerate limit: Your desired Framerate, decimals sepration with a dot not a comma, like 60.0

    And that's it
    You can play around with the Scanline sync if you get a sync line (not moving up or down) on a specific framerate you need.
    But normally 0 works just fine.

    EDIT
    Make sure you have no other framerate limiter running, or the Game your playing has one enabled in the settings.
    Turn V-Sync Off in the Game
    If you running a NVidia card, i got the best results with setting the V-Sync mode in the Driver to "fast", and setting the Framerate a small amount above your Monitors refreshrate.
    This way it does not need to toggle the "adaptive vsync" on/off/on/off... whenever there is a small spike or drop of 0.5fps
    /EDIT


    Moo,
    Otter
     
  14. Nico Kunze

    Nico Kunze Well-Known Member

    Joined:
    Sep 1, 2018
    Ratings:
    +395 / 0 / -0
    Was hoping for @Fleskebacon s way of doing it cuz it seems simpler but now that youve gone through all that work ill probably have to give it a go as well :D
    Edit: my screen is 59hz afaik so which fps limit would you recommend (regarding your choosing 62.1)
     
  15. Bull Shark

    Bull Shark Well-Known Member

    Joined:
    Mar 14, 2019
    Ratings:
    +162 / 0 / -0
    Did a test today. But I was to positive on the fps. On spa with 30AI most settings on high. De first couple of settings on medium 8xAA I get on the part where you have the buildings and pit only 68fps. Turn 1 an 2. As soon as soon as I pass turn 3 the FPS goes up to 103/105. On turn 10 and 11 it drops back to 70/75 on turn 12 it goes up again to 90/105 until turn 19/20. I then see a drop down to 68/70.
     
  16. Fleskebacon

    Fleskebacon Well-Known Member

    Joined:
    Feb 16, 2015
    Ratings:
    +258 / 0 / -0
    That sounds just about right, as I usually get a drop to around 50-55 fps with 27 enemies when I pass the pit area on Spa, if I remember correctly. Other tracks are more forgiving, but generally it's passing the pit area that drops the fps.

    And you're running a severely overclocked i7-8700K, against my stock i5-4690K.

    So I'm happy with the findings here. There's obviously nothing wrong with my setup - fps drops with too many enemies is quite normal. It also seems like it's normal that 20-25 enemies is the limit for my cpu, if I want a steady 60 fps guaranteed.
     
  17. fufsgfen

    fufsgfen Active Member

    Joined:
    Jan 9, 2019
    Ratings:
    +29 / 0 / -0
    Is it AI or is it drawcalls? I would think it is latter, especially because position on track has effect on it, but it can be of course combination of both.

    Many games, especially DX9 games have very high CPU usage on one thread from drawcalls, I have seen all kind of guesses with many games, but really often it is those drawcalls taking major chunk of processing power, if lowest graphics drops CPU usage like 50% comprared to high when using vsync, then it can be known that graphics and likely drawcalls are doing considerable part of the situation.

    If AI is doing bigger part, then using lowest graphics with vsync on is not going to cause as big change.

    Thing is to test vsync on as how many fps game runs at is not necessarily helping to know which causes issue.

    Well, just thought bring that up if someone wishes to examine which one is causing more CPU usage on one thread, I'm on vacation so I just focus driving now :)
     
  18. pixeljetstream

    pixeljetstream Well-Known Member Beta tester

    Joined:
    Jan 29, 2015
    Ratings:
    +412 / 0 / -0
    It is indeed a combination of drawcalls and fx setup (shader parameters).
     
    • Informative Informative x 1
  19. Fleskebacon

    Fleskebacon Well-Known Member

    Joined:
    Feb 16, 2015
    Ratings:
    +258 / 0 / -0
    Sounds logical. But the result is the same, whether it's drawcalls or AI calculations (or both) causing it:

    Too many AI on track = CPU bottlenecking and fps drop.

    I have tried setting shadows and reflections to low, as well as disabling antialiasing (I'm usually running 2x2 SSAA + 2x MSAA) as these are the most GPU intensive things, and that didn't really do anything. So it's definately not GPU bottlenecking. But I don't think I've tried shader quality on low or touched any of the other settings, as I didn't really think any of these would reduce CPU usage.

    I'll test with high vs low shader settings, and see if there's any difference, just for the curiousity of it.

    But, if it boils down to choosing between lower graphics settings, or limiting the number of visible cars on track, I'm definately going to limit the number of cars, so it doesn't really matter. But it's still interesting, from a technical point of view. :)
     
    • Agree Agree x 1
  20. pixeljetstream

    pixeljetstream Well-Known Member Beta tester

    Joined:
    Jan 29, 2015
    Ratings:
    +412 / 0 / -0
    The result imo is not exactly the same, if it was AI, lowering visible car count wouldn't help as you write yourself.
     
    • Agree Agree x 1