Jump to content
archimedes

Possible Performance Bug found & HowTo fix it

Recommended Posts

German Version

 
Hello people ,

as I have read , many of you have problems with the performance , and that despite good hardware.

I im talking about people with the following or similar hardware :

  • CPU i5 / i7 or comparable
  • Ram 8GB DDR3 or more
  • GPU Nvidia Geforce GTX 460 TI or AMD / ATI HD4850 Crossfire ​​or HD5850 Single

Normally, one would come to expect quite a lot of power in such a hardware configuration.

Unfortunately, you do not get what you expect (good performance from good hardware), no matter how much effort you put into it.
It seems you CAN get an big improvement when changing the resolution to a negative scale.
 
 
 
My observation is that this can not be traced to your hardware, but is due to a bug in Arma 2 graphics options menu
 
 
Before I show you the " Archimedes method," as it was christened today on the server after a successful third-party verification,
I would like to briefly tell you how I fond the Problem .
 
Impatient just scroll up to the " Archimedes method"

Foreword
I had even severe performance problems in Arma II and DAYZ on several computers i configurated and administrate by myself,
including a high-end gaming PC with i5 4670 + AMD R9 290 Tri -x OC (Technically an outstanding graphics card like  all other games proofed ) ,
as well as various "Done PC 's" and gaming laptops .

Certain settings in the graphics options have proven to show a minimal frame change,
sometimes the game will run smoother with certain settings set at a higher level than at a lower level
This is nothing new , Arma 2 is supposedly CPU Limited , poorly optimized and programmed suboptimal. A clear yes and no ! , D

Some i7 users are supposed to be satisfied with Arma2 with just over 30fps, and since, they are already the envy of other ...

It was not until I recently upgraded my own computer,
and the performance was even worse , that i really investigated the error .

There are several ways supposed to help or to influence the performance , some of them are:

  • Shadows = Disabled or High / Very High (on normal they are calculated by the cpu according to Internet research)
  • Arma2OA.Exe start parameters as - CPUCount, maxmem, winxp
  • Arma2OA.Exe startup parameter - malloc = tbb4malloc_bi

There is certainly even more tips on the net but at this point that enough for now.
Some of these performance -guides and alleged Boost 's have made the performance worse for me before i found out how to fix the overall performance.
That's why I have them all removed , except for malloc = tbb4malloc_bi because it really brings a few frames .

- noslpash and the other parameters for time saving can still be used .




Archimedes method


1. Measurement:

Before you perform the Archimedes method , I ask you to start Arma2OA and change visibility to 1000 and then run single player -> Scenarios -> Benchmark08 .

Let this PLEASE go through completely and then write down the result .

You may additionally like to use external tools to display the FPS directly ingame.

Then Shut down Arma 2 .

2.Start parameter :

Now please delete all parameters except those which serve to save time ( no-splash etc. ..)
Then add -malloc=tbb4malloc_bi as startparameter.
 
You can add or tweak them again after you finished with Step 4.


Before we embark upon the settings id like to point out the following :
To make it work , it is important first to follow all the steps EXACTLY. Make NO adjustments.
You can adjust them again afterwards .


3. Settings:

Now the most important part , because here is the root of our Problem.

Starts Arma2OA.exe .

Go to Options->Video Options->"Quality preference" and set it to very low.
After you have done this, your 3D Resolution will be reduced/scaled, change it back to 100%

Now adjust the settings manually to the following values you can see on the image.
 
The "Quality Preference" setting jumps to " Very High " while you do so, dont worry about that.

Do NOT touch the setting " Quality preferences" after you´ve set it to "Very Low" and it changed back to "Very High" by itself.
Please keep in mind that your resolution is not necessarily 1920x1080.
 
n2cort.jpg




For safety, we now click ok and then quit Arma 2

4. measurement:
 
Now we start Arma 2 again and complete the single player -> Scenarios -> Benchmark08 .
Please write down the value again.
I would ask you the direct comparison of results to be published here !
 
If everything went well you should have up to 100% more performance with better visual quality.
if so try adding "Anti Aliasing"-> Low  but "Atoc"->disabled and Run again, it should not affect your performance very much now.
From this point you can add your Startparameters back to the Arma2OA.exe and see what brings you the most performance.
For me it is -nosplash -nopause -malloc=tbb4malloc_bi -cpuCount=3 -maxMem=3012
 
Now you can change the Settings for "Shadows", "HDR", "Anti Aliasing", "Atoc" and "Post Processing" if you like.
Be careful and do a Benchmark08-run each time you change ANY setting.
Stop till your satisfied with the performance and visual quality of the Game

5. Result & variables :
 
 
Depending on what is happening in each run of the Benchmark08 it sometimes runs a bit differently. For example more or less Vehicles/Explosions.

My results:
Before: ~ 25 - 30FPS
After: ~ 57-64 FPS

My Hardware : i5 2500k@3.3ghz stock , 8GB Kingston 1600MHz CL9 HyperXBlue , 2 x AMD HD4850 ​​512MB VRAM each , 24 " LCD, no SSD , Good cooling

If you dont see any huge improvements , and your graphics card has more than 1x512mb (or 2x 512mb for Crossfire ) VRAM,
set "Graphical preferences" to very low again.  Try again from Step 3  but the Setting " Texture Memory" to "Default" this time.

If that does not have the desired effect or may not apply to you because you dont have more than 1x 512 or 2x 512MB VRAM,
start lowering each setting on its own starting with post processing then Object and Terrain detail and then Texture Quality.
 
I've also set the LLC (Load Line Calibration)in my Bios to a level that does not have a high Vdrop,
because that also gave extreme performance dips on hardware level in various Applications.
The CPU seemed to get automaticly undervolted in load spikes resulting in terrible framedrops and realy bad/low GPU usage in Arma2.
This stabilized the Framerate a lot, also adding 20% performance to the CPU-heavy Benchmark02.

 
Your feedback is needed at this point.




Conclusion
This apparently is a bug in the Arma 2 graphics options menu .
The setting "Quality preference" is the culprit !
Either it is a bug in the internal configuration file for Arma 2 or the setting " Quality Preference" changes things you can not see or change in the Options menu.
I am furthermore not sure if this method results in the same performance increase every time but it has been confirmed
by the only other person(at the time of writing) who has tested this
The utilization of both the CPU and the GPU has now risen markedly.
 
I am not sure if this works for Standalone and/or Arma 3. Feel free to try it out, the Setting is called "Overall Quality" in DayZ Standalone.



Good Luck!

Archimedes
 
 
 
 
Edit: Some pictures to proof the method (specs@step 5):
 Menu
t6b0io.jpg
 
Benchmark08:
  xnafc6.jpg
2j4dj5d.jpg
2gspug3.jpg
19xy01.jpg
2gy5z5t.jpg
10z0dio.jpg

Edited by Archimedes23
  • Like 2

Share this post


Link to post
Share on other sites

I am working on a solution for the Standalone as this method doesnt work for it 1:1, but as i dont actualy own the standalone version im only able to talk to people and let them make the changes...

Someone that is helping me in the dayz irc channel has been able to create a 40% performance increase on his computer disabling/lowering Ambient occlusion so you may give it a try.

 

Edit: Made a tiny little step forward,

Edited by Archimedes23

Share this post


Link to post
Share on other sites

This tip boils down to using the tbb4malloc_bi memory allocator. A quick Google search shows this:

https://community.bistudio.com/wiki/ArmA_2:_Custom_Memory_Allocator

 

Default allocator used by engine after build 1.60.87645 is based on Intel TBB 4 (see details about tbb4malloc_bi below)

 

This suggests that the -malloc=tbb4malloc_bi switch doesn't actually make any difference unless you're using an old version of the game.

 

That same page also says this:

 

note: Windows 7 allocator seems to be quite good, and it may therefore make sense for some users to delete all custom allocators on Windows 7 or newer.

Edited by Junos

Share this post


Link to post
Share on other sites

i am sorry to tell you that it is not that "easy".

using the tb4malloc_bi switch will NOT give you a fps increase up to 100%.

 

It WILL increase your fps, even if it is supposed to be used anyway by the game by itself, but only about 10-15%(wich is very nice allready).

 

Ive tested this, disabled the tbb4malloc_bi switch and the frames dropped to a result of 56 in benchmark08.

so this is clearly one of the factors, but not the crucial one.

Edited by Archimedes23

Share this post


Link to post
Share on other sites

Some more Pictures i made on relative performant servers(same specs&settings as shown on the picture in my first post):

Random Player Massacre 54fps

ofxzx2.jpg

 

Elekto Firestation: 40/41 fps

 

akhojl.jpg

 

 

Elektro Trainstation: 33/36 fps

 

2jflnpt.jpg

 

 

 

 

Share this post


Link to post
Share on other sites

Did a lot more Benchmarks and Tests in Arma2OA and Dayz to find out what causes the bad performance in towns and was able to trace it down. It is a Software Bottleneck!

Did some OC on my CPU (3.3ghz to 4.0ghz) and there was absolutely NO performance gain. Then i went on to the -cpuCount thing and messed with the Core affinity.

 

You get exactly the same performance from -cpuCount=3 and then manually setting it to use 3 cores in the Taskmanager and -cpuCount=4 and then setting it to use 4 cores.

It has something to do with HOW the Engine is able to handle CPU power. It doesn´t seem able to shuffle the usage between the Cores in a correct way.

 

This is what i have found:

 

exThreads

-exThreads= is option to define extra threads.

All file operations go through a dedicated thread. This offloads some processing from the main thread, however it adds some overhead at the same time.

The reason why threaded file ops were implemented was to serve as a basement for other threads ops. When multiple threads are running at the same time,

OS is scheduling them on different cores.

Geometry and Texture loading (both done by the same thread) are scheduled on different cores outside the main rendering loop at the same time with the main rendering loop.

 

Source: Bohemia Community Wiki

 

Geoemtry and Texture loading are both done by the same thread. This is happening in Elektro/Cherno. Too Much Geometry and too many Textures on the same Thread.

 

BUT

 

We have 1 Core that gets not used very well, so maybe we are able to seperate the Geometry and the Texture loading and put one of it it on that Core.

Costum Memory Allocatory, why not a costum Thread allocator !?

 

Anyone got ANY idea how to achive this or where to start?

 

Another thing we could do:

Reducing the Geometry or the Texture loading = Recreate the Structures(houses/factorys...) with less "Polygons" or smaller Textures so the Thread is not getting overloaded anymore.

This would also reduce visual quality so i would rather like to try it with the cores/threads first even if it seems more complicated.

 

 

We need some expert knowledge in here...
 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×