State of Multi-Threading

Discussion in 'Technical & Support' started by Max Dralle, Mar 16, 2017.

  1. Max Dralle

    Max Dralle Registered

    Joined:
    Mar 16, 2017
    Messages:
    242
    Likes Received:
    157
    Finally some insight ... :)

    Thanks a lot, stonec !

    It looks like I'll have to wait until the DX11 version gets released and see, if that'll make any difference.

    Cheers !
    Max
     
  2. stonec

    stonec Registered

    Joined:
    Jun 19, 2012
    Messages:
    3,399
    Likes Received:
    1,489
    No problem :). Also forgot to mention regarding the PCIe 2.0 vs 3.0, I reckon you need something like a GTX 970/980 for the PCIe 2.0 bus to bottleneck in rF2. But even that is bound to change I think, I'm 90% sure the reason it bottlenecks in rF2 but not other games is because rF2 uses DX9, which probably consumes the bus more as it's more inefficient.
     
  3. Max Dralle

    Max Dralle Registered

    Joined:
    Mar 16, 2017
    Messages:
    242
    Likes Received:
    157
    Could be. Maybe someone with a PCIe 3.0 mainboard and a modern powerful gfx card could test that ?

    I was even thinking about the so called API overhead that got remedied in Mantle, DX12 and Vulkan, but I have no clue, how much DX9 would be affected in that context.

    Anyways, it's about time, the April roadmap update get released and hopefully DX11 support is not too far down the road.

    :D
     
  4. Emery

    Emery Registered

    Joined:
    Oct 24, 2010
    Messages:
    3,035
    Likes Received:
    1,654
    Max Dralle likes this.
  5. Max Dralle

    Max Dralle Registered

    Joined:
    Mar 16, 2017
    Messages:
    242
    Likes Received:
    157
    wow ... awesome !

    That was really unexpected and I haven't heard/read about it before.

    I run happily in PCIe 3.0 16x mode now, so this one's on you:

    [​IMG]

    So far, I see the biggest gain in AIDA64's gpgpu benchmark's memory read/write test, where the results nearly double.

    2nd runner up is 3D Mark's API overhead test, where especially Vulkan benefits, DX12 coming in 3rd.
    http://www.3dmark.com/compare/aot/209026/aot/208850
    (left side PCIe 3.0, right side PCIe 2.0)

    :)

    Unfortunately, these artificial benchmarks are the only tests, that show a substantial improvement.
    All other tests I've run until now, show marginal performance gains ( < 2% ) only, but I'll continue to run more tests.

    In rFactor2 is hard to tell any difference, because it's still running in the 45fps range at that MidOhio spot.

    However, I never got PCIe 3.0 working on this system before. :D Many thanks again !:D
     
  6. patchedupdemon

    patchedupdemon Registered

    Joined:
    Jan 3, 2017
    Messages:
    1,602
    Likes Received:
    1,151
    Synchronisation is the biggest problem for racing sims to over come,regarding multi threading,just imagine if each tyre was given its own thread,if one is out of time with the other 3 then it would feel terrible to drive,also latency is an issue if one thread has to wait for another.
     
    Emery likes this.
  7. Max Dralle

    Max Dralle Registered

    Joined:
    Mar 16, 2017
    Messages:
    242
    Likes Received:
    157
    Valid point, patchedupdemon, but I was rather thinking about eg. each car getting a seperate thread, maybe each AI getting one thread as well and something like a "master / supervising thread" that keeps it all in order/sync .

    Afterall, nowadays especially physics are used to demonstrate and show off parallelized computing capabilities of CPUs and GPUs.
    Therefore, I thought it should be rather simple / trivial / unspectactular to add mutli-threading into rF2.

    However, unless anybody from Studio397 is willing to provide some feedback on this matter, all we can do is sit & wait and hope that some day all these available cores will get some good use.

    Cheers,
    Max
     
    Guimengo likes this.
  8. patchedupdemon

    patchedupdemon Registered

    Joined:
    Jan 3, 2017
    Messages:
    1,602
    Likes Received:
    1,151
    The thing is,cpus have not progressed much really,for what like 8 or ten years,or even longer.
    I'm not really sure how many threads each core can handle,but if we are cpu bottlnecked now,I can't see giving each ai car a thread would help improve performance

    But I don't really know much so I'm probably wrong
     
  9. Max Dralle

    Max Dralle Registered

    Joined:
    Mar 16, 2017
    Messages:
    242
    Likes Received:
    157
    The single core IPC (instructions per clockcycle) trippled, when comparing a Pentium 4 from 2008 with a last generation Core i5 or i7.
    http://www.cpubenchmark.net/compare.php?cmp[]=2919&cmp[]=1081

    So in theory, a modern CPU could deliver three times the performance of a P4.

    However, I'll try and monitor, how much CPU usage rF2 generates on my OCed i7-3930k, because I still do not understand, why my system is way below 100% GPU usage, while delivering mediocre frame rates.

    I really suspect single threading being the cause.
     
  10. Max Dralle

    Max Dralle Registered

    Joined:
    Mar 16, 2017
    Messages:
    242
    Likes Received:
    157
    Hi all.

    I made some more tests before the DX11 beta was released and I found out, that I'm definately CPU bound on various tracks in some particular locations.

    I used perfmon to find out that rF2 is utilizing a maximum of two CPU cores and those two always seem to be fully maxed out.

    Best and easiest example to reproduce this behaviour is VLM's Mid-Ohio, when leaving the garage and standing idle in the box.

    On that spot, in 1920x1080 with all bells and whistles on, I get pretty steady 110fps (+/- 2-3fps).
    Dropping the resolution down to 800x600 with AA completely disabled, I get about the same performance, maybe 1 or 2 fps more.

    ...

    A quick check with the DX11 beta indicated a slight drop in the high fps areas, but the minimum fps seemed to be a lot higher than in DX9, at least the GPU usage is now reaching 99-100% way more often than it was in DX9.

    I'll have to investigate that further before drawing any final conclusions in regards to DX11 though.

    Cheers !
    Max
     
  11. Max Dralle

    Max Dralle Registered

    Joined:
    Mar 16, 2017
    Messages:
    242
    Likes Received:
    157
    Update in regards to DX11.

    Yesterday evening, I made some intensive performance tests using ISI content only for avoiding possible DX9 compatibility issues with 3rd party MODs.

    I chose Portugal 2009 and a mix of ISI's GT1/2/3 class cars like the Nissan GTR, GT500 & 370Z, various Corvettes, Camaros and the Honda NSX.
    Running in single player mode with 10 AI drivers on track, I chose 1920x1080p60 resolution and started comparing various Anti Aliasing (AA) and Post Effects (PE) settings.

    Doing so, I saw my GPU usage most of the time at 99-100% and the framerates scaled according to the quality settings.
    So essentially, the new rendering engine is able to max out my GTX1070.

    When comparing screenshots with different quality settings, I noticed no visual difference between AA Levels 3, 4 & 5, but the framerates where all different, AA level 3 being the fastest, level 5 the 2nd fastest (!) and level 4 being slowest.
    Enabling FXAA made no visual difference in any screenshot, but the framerates dropped consistently by 2-3%.

    However, there are still some spots on the track, where my GPU usage drops down to ~70%, indicating a CPU bottleneck and the frames rates on those spots were much more similar, despite using different AA and PE settings.

    Then I started a dedicated LAN server for offloading the AI work to another CPU and connected in multi player mode.
    The result was not overwhelming, but there seemed to have been a slight improvement and sometimes I saw a total CPU usage of +22% (equals to about three cores on my i7-3930K), which was in the 14-17% ballpark (= two cores) when not using a dedicated server.

    However, it was getting late yesterday, so I'll have another close look, if using a dedicated server really improves the framerates on those CPU bottlenecked spots and report back.

    Cheers!
    Max
     
    CamiloNino likes this.

Share This Page