Framerate not matching profiler

MOOtantMOOtant Join Date: 2010-06-25 Member: 72158Members
I know there are topics about FPS on getsatisfaction but I have something different to show. I checked profiler output and the FPS counter when looking at exactly the same spot. I get 30 FPS there (probably since like 20 builds). Render thread takes 15 ms that frame and game thread takes ~35 ms. Even added together (15+35=50) it doesn't explain 30 FPS.

Is the render queue not flashed instantly after frame (frame, barrier, frame, barrier, frame, flush)? I have maximum pre-rendered frames = 3 in NV control panel.

Hardware: Phenom X4 3.0 GHz, GTX 260, 4GB 1600MHz DDR3 (in final version I expect to be able to look at walls and 2 models and get more than 30 FPS but I digress)

Here are the screenshots:

<img src="http://dl.dropbox.com/u/6615362/ns2/2011-04-16_00001.jpg" border="0" class="linked-image" />
<img src="http://dl.dropbox.com/u/6615362/ns2/2011-04-16_00002.jpg" border="0" class="linked-image" />
<img src="http://dl.dropbox.com/u/6615362/ns2/2011-04-16_00003.jpg" border="0" class="linked-image" />
<img src="http://dl.dropbox.com/u/6615362/ns2/2011-04-16_00004.jpg" border="0" class="linked-image" />

Comments

  • matsomatso Master of Patches Join Date: 2002-11-05 Member: 7000Members, Forum Moderators, NS2 Developer, Constellation, NS2 Playtester, Squad Five Blue, Squad Five Silver, Squad Five Gold, Reinforced - Shadow, NS2 Community Developer
    You are running a listen-server (ie, you created a server rather than joined one).

    That means you are slaved to the server rate, which peaks at 30 ticks.

    You need to join a server to get proper client-only rendering.
  • EnceladusEnceladus Join Date: 2004-01-18 Member: 25442Members
    The calculation of a frame is not the rendering of the scene alone. Instead you need to check the topmost value from the profiler. In your first screenshot, that states "Frame 32630 µs total". That's the time the whole frame needs to calculate for everything (render scene, physics etc..)
    32630µs is 32.630 ms
    1s = 1000ms
    => 1000/32.630 = 30.64 FPS

    So the number stated in your r_stats is pretty much correct given that there is probably some rounding in the code.
  • ThaldarinThaldarin Alonzi&#33; Join Date: 2003-07-15 Member: 18173Members, Constellation
    <!--quoteo(post=1841166:date=Apr 16 2011, 12:08 PM:name=Enceladus)--><div class='quotetop'>QUOTE (Enceladus @ Apr 16 2011, 12:08 PM) <a href="index.php?act=findpost&pid=1841166"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->The calculation of a frame is not the rendering of the scene alone. Instead you need to check the topmost value from the profiler. In your first screenshot, that states "Frame 32630 µs total". That's the time the whole frame needs to calculate for everything (render scene, physics etc..)
    32630µs is 32.630 ms
    1s = 1000ms
    => 1000/32.630 = 30.64 FPS

    So the number stated in your r_stats is pretty much correct given that there is probably some rounding in the code.<!--QuoteEnd--></div><!--QuoteEEnd-->

    ^ winner.
  • MOOtantMOOtant Join Date: 2010-06-25 Member: 72158Members
    edited April 2011
    I noticed myself mistaking 30ms for 60 FPS later. :P Bars at the top still don't add up to game thread.

    Second weird thing was that I get 40-60 FPS with shadows off and exactly 30 with them on. It still showed 15ms render 30ms game with shadows on.
Sign In or Register to comment.