Loading [MathJax]/extensions/Safe.js

Special Aircraft Service

Individual Mods and Packs for IL-2 1946 => Other Mods => WIP => Topic started by: SAS~Storebror on August 14, 2016, 07:59:11 AM

Title: Enhanced FPS Command Mod & Logging Tool v0.01 [WIP]
Post by: SAS~Storebror on August 14, 2016, 07:59:11 AM
Not teasing anymore, here is the "Enhanced FPS Command Mod & Logging Tool" v0.01.

Download Link:
Enhanced FPS Command Mod & Logging Tool v0.01 (https://www.mediafire.com/download/xrh6foskt314lpr/)


READ THE README!
You will want to take special attention of he "Usage" paragraph, in particular the enhanced "SHOW" command and the new "LOGEXT" command.
Use Excel, Plotly (https://plot.ly/plot) or something similar to create line graphs from the logged data.
Code: [Select]
                  Enhanced FPS Command Mod & Logging Tool

                                 v0.01

***************************************************************************

Installation:
Extract this mod into the folder which holds the modded files in your game.
Depending on your game version this might be e.g. MODS, #SAS, #DBW, #UP# or
anything else.

***************************************************************************

Usage:
This mod uses enhanced "fps" command line commands.
You can either enter these commands on the game's console directly
(use shift+tab to toggle the game console) or edit the file "rcu" (without
file extension) in your IL-2 gamefolder (create the file if it doesn't
exist).

Commands are CASE SENSITIVE!
Valid fps commands from stock IL-2 are:
fps START     - Starts calculating the framerates
fps STOP      - Stops calculating the framerates
fps SHOW      - Shows calculated framerates
fsp HIDE      - Stops showing calculated framerates
fps LOG [0/1] - Disableds (0) / Enables (1) logging of calculated
                framerates to the standard game logfile (log.lst)
fps PERF      - Checks audio related performance

The commands can be combined, e.g. in order to start showing the
framerates without logging them to log.lst, you can enter this on the
game's console:
fps START SHOW LOG 0

When you use the "rcu" file, you have to add "@" in front of the command
to avoid log repitition.
The same command in "rcu" file would therefore be:
@fps START SHOW LOG 0

This mod enhances the above mentioned commands like this:
fps SHOW [n]         - Shows calculated framerates, resetting the "recent"
                       framerates after n milliseconds.
                       If n is omitted, a default of 10000 milliseconds
                       (=10 Seconds) applies for resetting "recent" values.
fps LOGEXT [0/1 [n]] - Disableds (0) / Enables (1) logging of FPS values
                       in comma separated value (.csv) format.
                       There'll be one csv file per mission.
                       "n" sets an optional period (in milliseconds) for
                       .csv logging, if omitted it defaults to 250ms.
                       
The commands can be combined, e.g. in order to start showing the
framerates without logging them to log.lst but with logging them to csv
files, you can enter this on the game's console:
fps START SHOW LOG 0 LOGEXT

or add this line to your "rcu" file:
@fps START SHOW LOG 0 LOGEXT

***************************************************************************

Known Issues:
This mod has been made as little intrusive as possible. The only class
modified is the "CmdFPS" base game class.
It's compatible with any base game version from 4.09m through 4.13.2m.
However naturally it is in conflict with other mods touching the "CmdFPS"
class, even though none is known to the author of this mod at the time of
writing this readme. This mod is not meant to replace such mods.
If you want to use this mod together with other conflicting mods
nevertheless, please make sure to rename this mod's folder accordingly,
e.g. to "### CmdFPS Enhanced" in order to ensure it's loaded before any
other mod touching the same classes.

***************************************************************************

Credits:

1C/Maddox for this beautiful game
SAS Team for continuous support and testing
TD for fucking up the game with every new patch
Jim for his tremendous opportunism and indifference
Ton414 for nothing

***************************************************************************

***************************************************************************

Changelog:

0.01: Initial WIP Release

***************************************************************************

Other things worth reading:

If you want to file a bug report, please write

"I've read and understood the readme!"

somewhere in your bug report (literally, use copy & paste).
Otherwise I assume that you didn't read this readme and hence will not give
a damn for your bug report. Thank you very much for your understanding.

Just teasing for the moment.
I'm about to create a simple "pop in" style mod which gives a slighty better report about FPS ingame (e.g. with min/avg/max FPS automatically resetting after a given amount of time) and with the ability to log FPS to a file.
This can then be used to generate FPS plots, e.g. this one has been created using a WIP version of this mod on "The Black Death" track:

(https://s4.postimg.cc/6fhyyp0n1/newplot.png)

One thing I learned already from logging FPS (in the above shown image, FPS have been logged every 250ms while playing "The Black Death" track) is that the famous "The Black Death" track isn't always all that prone to specific graphics settings.
For instance, I've massively changed the Anti Aliasing settings and re-ran the test, just to see that the result was virtually identical:

(https://s3.postimg.cc/l10epscg3/newplot_2.png)

More to come, stay tuned...

Best regards - Mike
Title: Re: FPS Investigation
Post by: PA_Willy on August 14, 2016, 08:50:45 AM
The Black Death track is CPU limited. I use a second screen to check GPU,s and CPU,s use in %. Minimum in that track depends on CPU frequency (single core). If you do overclock to CPU, minimum improves.

Regards.
Title: Re: FPS Investigation
Post by: SAS~Storebror on August 14, 2016, 11:43:04 AM
Yep Willy, that was my conclusion too.
I'm wondering if anyone has a system that can run The Black Death at a solid 60 FPS.
I'm using an i5-2500K OC'ed to 4 GHz for these tests, my system scores a pretty stable 2000 Single Thread Passmark points, compared to 1900 w/o overclocking @3.3 GHz.
The fastest CPU according to Passmark in the single thread regime would be the i7-4790K @4 GHz, which would then score 2527 single thread points.
In my book, if CPU power scales lineary in IL-2, that would give a minimum of 50 FPS to that CPU.
This would mean that no stock CPU on earth could stand this track @60 FPS all over.
Stunning.

Best regards - Mike
Title: Re: FPS Investigation
Post by: Moezilla on August 14, 2016, 04:44:29 PM
...
I'm wondering if anyone has a system that can run The Black Death at a solid 60 FPS.
...

What kind of an install are we talking about? In stock 4.12.2 my i7 4770k @ 4.3GHz shows a minimum of 74 for Black Death.
Title: Re: FPS Investigation
Post by: SAS~Loku on August 14, 2016, 07:21:33 PM
I play this game for more than 10 years and never heard about Black Death used as a some type of performance benchamrk for il2.I have a i7-4790k/4GHz CPU and last year went from MSI R7-240 to R9-290 and difference with FPS on games is huge.Playing il2 i have notcied FPS drop on some maps especially when a lot of static object is put on them (airfields, dense populated cities, etc) so even modern PC has issue with this old game.I will check this Black Death treack and see if i can have stable 60 FPS with Vsync ON.

i7-4790K 4.0GHz
Asus Sabertooth Z97 Mark I
Corsair 16 GB 1866 MHz
Gigabyte R9 290 OC
Win7 64 bit
Title: Re: FPS Investigation
Post by: SAS~Storebror on August 14, 2016, 10:48:46 PM
What kind of an install are we talking about? In stock 4.12.2 my i7 4770k @ 4.3GHz shows a minimum of 74 for Black Death.
That's interesting, didn't think it would perform that well.
Of course we're not talking about "pure stock" as it wouldn't allow to take such traces as depicted above, but it's a plain modact 5 game I took for comparison here, perfect mode at Full HD 1080.

Just for the record, this is a plot from yesterday's FAC session, playing this (http://www.sas1946.rocks/up3test/missiondetails.php?id=1471184813) mission for 1:30 hours:

(https://s4.postimg.cc/r81bzdwvh/newplot_2.png)

Game was Ultrapack 3 RC4 plus latest SAS Patch Pack, perfect mode, 1080p.
I knew that my game didn't run 60 FPS all the time and I knew I had micro stutters, but I didn't think it would look that drastically.
My feeling is that the additional 3D mods (Jero's Cowling & Wheels + 215 modded, much more detailed cockpits and textures) are an overkill here.

Best regards - Mike
Title: Re: FPS Investigation
Post by: PA_Willy on August 15, 2016, 02:57:50 AM
What kind of an install are we talking about? In stock 4.12.2 my i7 4770k @ 4.3GHz shows a minimum of 74 for Black Death.

Not offense, but that is impossible. My CPU is OCed to 5.0GHz with Nvidia GTX1070 and minimums are around 40fps because CPU limit. I have been using this track for testing purposes for years in different installations and hardware settings, with SLI,s and several CPU,s, and I have never got 74 fps (minimum) in that track. Moreover, I dont know any mate with that min in that track.
Title: Re: FPS Investigation
Post by: SAS~Storebror on August 15, 2016, 03:06:35 AM
It might be because of "non-perfect" conf.ini settings.
As much as I can see, explosions cause the most "stuttering" on that track and the smoke piles above the german base cause the prolonged "40 FPS" dent in the graph.
Now if for instant Moezilla uses "effects=1" in his conf.ini, this would at least partly explain the high minimum FPS.
In the end only Moezilla himself can lift the veil of his PC's fantastic performance.

Best regards - Mike
Title: Re: FPS Investigation
Post by: SAS~Gerax on August 15, 2016, 03:55:50 AM
With GTX980 and 4790K on Z97-G45 and GSYNC Monitor (1920x1080)
I get this running blackDeath with stock 4.12.2:
AVG: 59 MAX: 74 MIN: 15 (!). Have a few microstutters, see Mikes post (explosions) above.
Have no idea where the MIN: 15 comes from, I saw ~ 50 when it comes to the explosions.

more results (but with 3840x2160) here (https://www.sas1946.com/main/index.php/topic,49506.msg549264.html#msg549264).
Title: Re: FPS Investigation
Post by: PA_Willy on August 15, 2016, 04:27:55 AM
Have no idea where the MIN: 15 comes from, I saw ~ 50 when it comes to the explosions.

Your results are correct. Usual. Don't worry. CPU bottleneck. The only way to change this would be with multi-core capabilities that IL2 program doesn't have.

Single thread game: instruction by instruction, new particles generated from explosions, CPU new calculations instantly, etc.

Sorry my bad English.
Title: Re: FPS Investigation
Post by: vpmedia on August 15, 2016, 07:02:08 AM
One of the problems is that the live mesh of the destroyed vehicle is being replaced by the dead mesh at the exact same time as the explosion effect is being shown which is actually not one effect but three or more. If you take out an entire vehicle convoy like in the black death track its has a considerable fps impact. I noticed another problem when I changed all tank colums (in a dgen campaign template) into larger company strength columns which came with 4.11 or 4.12, with 30-50 chiefs on the map my fps when down from 75 to 20-30.  Increased smoke view distance, stuff imported from ToW, wrong mat files, large cockpit textures and too many buildings in one area of a map are also big fps killers. You really need to know what youre doing if you want to avoid all the traps.
Title: Re: FPS Investigation
Post by: SAS~Storebror on August 15, 2016, 08:53:01 AM
Found a coffee break today and worked on a little...

This is what the WIP data currently shows (click to enlarge):
(https://www.sas1946.rocks/flickr/storebror/8456/28384563763_811e836894_o.png)

I know it looks a little confusing at first glance but if you enlarge the image, you will get a grief.
The idea is to enhance the FPS logging by these new features:

Best regards - Mike
Title: Re: FPS Investigation
Post by: Moezilla on August 15, 2016, 09:37:33 AM
Not offense, but that is impossible. My CPU is OCed to 5.0GHz with Nvidia GTX1070 and minimums are around 40fps because CPU limit. I have been using this track for testing purposes for years in different installations and hardware settings, with SLI,s and several CPU,s, and I have never got 74 fps (minimum) in that track. Moreover, I dont know any mate with that min in that track.

No offense taken. We have each seen different things and there has to be a reason that will explain it. I use effects=1 which probably makes a significant difference. I also use mipfilter=2 and force AF from the GPU settings. My screenshot later in the post has my settings in it.

One of the problems is that the live mesh of the destroyed vehicle is being replaced by the dead mesh at the exact same time as the explosion effect is being shown which is actually not one effect but three or more. If you take out an entire vehicle convoy like in the black death track its has a considerable fps impact. I noticed another problem when I changed all tank colums (in a dgen campaign template) into larger company strength columns which came with 4.11 or 4.12, with 30-50 chiefs on the map my fps when down from 75 to 20-30.  Increased smoke view distance, stuff imported from ToW, wrong mat files, large cockpit textures and too many buildings in one area of a map are also big fps killers. You really need to know what youre doing if you want to avoid all the traps.

^^ What he said. :D Also consider that being the tail-end charlie in an IL-2 means that all those bomblets that have to be created and destroyed are in your viewport and really hurt your framerate if they are modded to higher poly versions.

Found a coffee break today and worked on a little...

Excellent! The recent min feature and the logging will be super useful for me.

Here (http://files.moelan.net/img/blackdeath.jpg) is a screen I just took of another run through Black Death. Didn't hit 70+ this time but still safely over 60. I activate fps START SHOW on 0:03 seconds to avoid the min:0 issue.

Moe
Title: Re: Enhanced FPS Command Mod & Logging Tool v0.01 [WIP]
Post by: SAS~Storebror on August 16, 2016, 06:41:46 AM
First WIP version 0.01 available in OP.

Best regards - Mike
Title: Re: Enhanced FPS Command Mod & Logging Tool v0.01 [WIP]
Post by: Moezilla on August 16, 2016, 08:46:25 AM
Thanks a lot for sharing Mike,

Here's the first run on a clean ModAct 5.3:

(http://files.moelan.net/img/BD_20160816_141107.jpg)

(http://files.moelan.net/img/plotly_001.jpg)

Settings were the same as my stock 4.12.2 run here (http://files.moelan.net/img/blackdeath.jpg)

Moe

Title: Re: Enhanced FPS Command Mod & Logging Tool v0.01 [WIP]
Post by: SAS~Storebror on August 17, 2016, 04:55:22 AM
It's a bit of a mystery to me.
I've just performed the test on a completely different PC, an old i7-920 @2.66GHz, Geforce 210 (yess!!!), 12GB RAM triple channel.
I tried your conf.ini settings and mine, and in order to rule out the GPU as the bottleneck, I've run the test windowed at 200x150 pixel resolution (yes, indeed!).

This is the result:
(https://www.sas1946.rocks/flickr/storebror/8102/28966746681_d56cfeff4f_o.png)

Remember this was the initial test on my i5-2500K @4GHz + GTX 970:
(https://s3.postimg.cc/l10epscg3/newplot_2.png)

Taking into account that two vastly different systems show the same lower limit of ~40FPS, I'm wondering how your system can have 70FPS at the same scene.

i7-920@2.66GHz = 1100 Passmark Single Thread Points = 40 FPS
i5-2500K@4GHz = 2000 Passmark Single Thread Points = 40 FPS
i7-?@5GHz = 2500+ Passmark Single Thread Points = 40 FPS
i7-4790K = 2500 Passmark Single Thread Points = <50 FPS
i7-4770K@4.3GHz = ~2600 Passmark Single Thread Points = 70 FPS ?????

Interesting.

Best regards - Mike
Title: Re: Enhanced FPS Command Mod & Logging Tool v0.01
Post by: Birdman on August 17, 2016, 08:03:26 AM
I just wish there were some fix for the problem that has pretty much ruined IL-2 for me. I like to collect planes and more planes in air.ini means less FPS. Now with 40" 4K display anything below 60 FPS hurts my eyes so much that I can't fly anymore with all the nice planes available in plane list. I'm wondering what's going on there with 10-20 more planes to air.ini capable of causing major FPS drop even when they aren't used in mission. Could it be something related to caches?
Title: Re: Enhanced FPS Command Mod & Logging Tool v0.01 [WIP]
Post by: SAS~Storebror on August 17, 2016, 08:22:54 AM
That effect has been excessively discussed elsewhere, just search the forums for "Java Wall".
The short conclusion is that at the moment nothing can be done about it.

Best regards - Mike
Title: Re: Enhanced FPS Command Mod & Logging Tool v0.01
Post by: Moezilla on August 17, 2016, 11:10:34 AM
Maybe the differences in performance lie outside of conf.ini?

Some points:
 - Your i5-2500K/GTX970 graph looks like it has either VSync+Triple Buffering or an adaptive VSync enabled. It would be interesting to see the result with VSync disabled.
 - Another setting I change in the IL-2 profile in NVidia Control Panel is setting the Power Management mode to Optimal Performance to prevent the GPU downclocking.
 - My RAM is running at 2133MHz 10-10-11-27-2T
Title: Re: Enhanced FPS Command Mod & Logging Tool v0.01 [WIP]
Post by: SAS~Loku on August 22, 2016, 02:08:56 PM
Maybe this info is answer and may be usefull for us, win7/multicore CPU users, its about win7 "feature" known as "Core Parking".

I found this on the net, tried it and it works, all my cores are loaded equally during gameplay, not like i.e: first 100% and others 10% or idle (CPU bottleneck)

Code: [Select]
This tweak is only for Windows 7 x32 and x64, and has 2 or more cores, "logical" or "physical". It specifically balances core parking through registry values.
 
Windows 7 has a built in power saving feature that dynamically selects a set of processors to run threads based on the current power configurations you have set. These settings will try to honor your settings and choose which processors to run, allowing or forcing the remaining cores to idle in low consumption states. If you are maximizing your game performance and quality, in other words pushing it to the max, Windows 7 is likely still parking some of your cores or at least is not balancing the load sharing between them. Especially for the i7 machines.

How to Tweak
 
First, back up your registry (Ccleaner works well) AND create a restore point. It's easy to make a mistake, either way if the risk is too much for you and you don't know much about computers then DO NOT take the risk. This registry tweak only modifies the "Valuemax" in the registry which are used by Core Parking.
 
Step 1
a. click on "Start" ---> type in [Search programs and files] Regedit
b. In Regedit, Select Edit > Find (Ctrl + F > Find what: > and type "0cc5b647-c1df-4637-891a-dec35c318583" - no quotation marks
c. In the right pane, under Name column, you will see the Description "Specify the minimum number of unparked cores/packages allowed (in percentage)." This shows you what you are modifying.
d. Highlight by clicking on "ValueMax", right click and "Modify", change the Value data: to "0" to equal "ValueMin" and apply/OK.
 
Step 2
a. You must repeat Step 1 (the whole process) for each time it is found, which equals to how many profiles you have on your computer.
b. Go back up to Edit > Find Next (F3)
 
Step 3
a. Shut your computer down, power-off and cold restart. Do not do a warm restart.
 
Test out your computer, open your performance monitor or test it in game. You will find your cores more evenly balanced, FPS issues improved and no spiking.