Jump to content
fred41

Arma3 and the /LARGEADDRESSAWARE flag (memory allocation > 2GB)

Recommended Posts

... looks much better now, but ...

As you can see there are ~2.3GB of your 8GB already used at arma start.

You should find out, what consumes that much RAM and free it if possible.

.

that much memory smells like mcafee :D

Share this post


Link to post
Share on other sites

Hi Fred.

I recently installed your dll after following the instructions for the lock pages in memory privilege.

Now my problem is, everytime I want to launch Arma 3 (with administrators rights), a window pops up with this written (I'm translating it from the french) :

"Arma3.exe - Image incorrect

E:\Program Files\Steam\steamapps\common\Arma 3\dll\tbbmalloc.dll is not conceived to execute under Windows, or it contains an error.

Install the programme again with the help of the original installation support or contact your system administrator or the software furnisher to obtain further support."

Afterwards the gam launch normally, and I can play as before.

Additionnaly, I can't find the malloc log in my files.

The may answer may lies in the previous pages of the thread, and if so, I'm sorry for the bothering.

Share this post


Link to post
Share on other sites

@k0rd, this or something similiar :)

(many systems are running tons of useless processes in the background and wasting a lot of resources this way, not only memory)

@Hunkii, downloading binary files from github is a bit tricky:

Use the 'RAW' button to download the tbbmalloc.dll as binary file.

(i tried to give a related hint in initial post)

Share this post


Link to post
Share on other sites
Fred did you look @ my file?

... yes, i did ...

There is everything well related to allocator setup (100% large pages).

But, in your .rpt file, i see some mission related problems (syntax error in SM_CleanUp.sqf).

Share this post


Link to post
Share on other sites

I know nothing but about this stuff, so just a shot in the Dark.

I discovered the "bcdedit /set increaseuserva" command. Shouldn't it prevent the OS from taking to much RAM. That ArmA can handle more Large Pages?

Im at work and don't have much time to test.

I already read that this is useless for 64bit but i don't know if it's OS, Application or whatever

Share this post


Link to post
Share on other sites
I know nothing but about this stuff, so just a shot in the Dark.

I discovered the "bcdedit /set increaseuserva" command. Shouldn't it prevent the OS from taking to much RAM. That ArmA can handle more Large Pages?

Im at work and don't have much time to test.

I already read that this is useless for 64bit but i don't know if it's OS, Application or whatever

... this "bcdedit /set increaseuserva" is used for 32bit OS to adjust the available virtual address space for applications and OS ...

Unfortunately, the availability of large pages (continous blocks of 2 MB in physical RAM) is nothing we can enforce on windows OS.

All we can do is to maintain our system as clear as possible or to allocate the memory as soon as possible past system start.

But thanks for your hint.

Share this post


Link to post
Share on other sites

http://pastebin.com/AE18tWW7

What do we make of this? To my eye, it seems not ok..

edit changed ok to not ok

my friend used the GMF tool to make the changes he's home edition "windows home" doesn't have the secpol.msc tool

Edited by JoneKone

Share this post


Link to post
Share on other sites

... i am declined to agree, not ok ...

The 'Lock pages in memory' privilege is obviously set correctly, but the physical RAM is heaviest fragmented,

the result is, that windows can't find enough continous blocks to map as large pages for arma/tbbmalloc.

Try to cleanup your system from unnecessary background processes/services, to free some RAM and to delay fragmentation.

Read a bit in this thread, there are already a lot of additional hints.

Greets,

Fred41

Share this post


Link to post
Share on other sites

http://pastebin.com/6BWhW3G1 we got it to work :)

The problem was GimmeMoarFrames registry entry.[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\arma3.exe]

I forgot we had it on, so we took it off and it works now. According to the logs.. I think we agree.

Share this post


Link to post
Share on other sites

... this log looks good, but your system was just 2 minutes up here ...

If you don't cleanup your system as recommended, you have to deal with faster fragmentation and to restart more often.

BTW: Switching off GMF tweak is no solution, because this tweak don't increase memory fragmentation, to the contrary.

Share this post


Link to post
Share on other sites

... According to the log, when the registry entry is there, LP allocation will fail instantly when the game is started. After it's turned off the log's show it doesn't fall back, on the first line.

I have checked this with 2 different computer now, with same result.

Share this post


Link to post
Share on other sites
... According to the log, when the registry entry is there, LP allocation will fail instantly when the game is started. After it's turned off the log's show it doesn't fall back, on the first line.

I have checked this with 2 different computer now, with same result.

... your observation is plausible ...

Now consider the following:

tbbmalloc tries to map large pages in the range of 2GB (1000 large pages), dependend on your mission e.t.c.

GMF tweak is based on mapping arma3.exe file in a large page region (insteed of small pages) and requires only 12 large pages (24MB).

The performance effect of GMF tweak is in comparable range to the usage of tbbmalloc with full LP usage (the effects of both are additive).

So if you switch the GMF tweak off, you save exactly 12 large pages, but you loose nearly the half of the possible overall performance gain.

Share this post


Link to post
Share on other sites
Hi fred, did you read this? http://forums.bistudio.com/showthread.php?149636-Development-Branch-Changelog&p=2697385&viewfull=1#post2697385

Last line

"TBB4 memory allocator updated to version 4.2u4" does this involve something? :)

Hi ramius,

yes i did and i found that the latest stable is still on 4.2u3, maybe this update is for dev branch only.

Anyway, there is still no good reason to move back to stock allocator ;)

Share this post


Link to post
Share on other sites

Hi guys. I know nothing about programming. But if this memory allocator does anything to improve ARMA 3 game performance (especially in multiplayer), I would like to do it. But I need an idiot-proof install guide. Something like:

Step 1: Download this file: tbb42_20140416oss_win.zip ----- from -------> https://www.threadingbuildingblocks.org/download

Step 2: Unzip this file: tbb42_20140416oss_win.zip

Step 3: Move X, Y, and Z file to the ABC folder.

Step 4: Right-click on the ARMA3 icon, choose the "properties" option, and . . . . . .

You know, a simple step-by-step INSTALL guide, so I can test it out.

Are there any particular step-by-step INSTALL instructions, for idiots like me? Thanks!

-V

Share this post


Link to post
Share on other sites

Dowload the file https://github.com/fred41/tbbmalloc_arma/blob/master/binary/tbbmalloc.dll

Move the file to your Arma3 Dll folder eg C:\G\Steam\SteamApps\common\Arma 3\Dll

Create a steam shortcut to Arma3 with malloc option. In steam Arma3 > Properties > create desktop shortcut. Edit shortcut:

C:\g\steam\steam.exe -applaunch 107410 -mod=@CBA_A3;@mods -nosplash -world=empty -noPause -skipIntro -noLogs -noFilePatching -maxMem=2048 -maxVRAM=2048 -cpuCount=4 -malloc=tbbmalloc

"-malloc=tbbmalloc" being the important part.

Share this post


Link to post
Share on other sites

@b0s, thanks for helping out :)

I just have to add, that setting the 'Lock Pages in Memory' privilege is ESSENTIAL, for the user account used to start arma (via secpol.msc).

If everything is set correctly, there should be a logfile (mallocxxxx.log) in arma root folder, that can be posted here for verification.

Share this post


Link to post
Share on other sites

Interestingly I'm also getting a fallback at around 200M every time I run it .... going to investigate more.

Share this post


Link to post
Share on other sites

Could someone help me out ?

I'm trying to get large pages file's working via GMF.exe but for some reason or another GMF doesn't understand my username :S

My username on the desktop is Mac D ,(at the same time i'm the administrator)

So when GMF askes for the username ,I type in Mac D ,but GMF comes back with User doesn't exit

Tried different version's (MacD ,Mac_D ,macd ,Administrator which GMF did react on) but I still get "SeLockMemoryPrivilege: denied, huge pages disabled" in the malloc log.

What am I doing wrong ?

PS :

The malloctbb.dll is in Arma's dll directory

[edit]

Never mind ,got it working

Edited by Mac D

Share this post


Link to post
Share on other sites
Hi Fred,

Please take a look at my log. I don't understand why it always falls back to SP at only 100+ M.

http://pastebin.com/MMQqzLaT

Hi jerminhu,

such early fallbacks are indicating fragmentation in physical address space.

(fragmentation means, simple spoken, small page allocations are contaminating/destroying continous blocks of memory, large pages, over time)

Large pages are a valueable resource on windows, especially because windows does not much to prevent fragmentation.

But there is something you can do to prevent/delay such fragmentation.

I will list here some hints, that i use successfully on my windows 7 system:

1. disable the launch of useless services like microsoft search (services.msc) or applications like background virus scanners e.t.c. (use autoruns from sysinternals do locate and disable such apps)

2. 'control panel'->'system'->'Advanced system settings'->'Advanced'->'Performance'->'Settings'->'Adjust for best performance'

3. use a pagefile of fixed size (~1.5 times installed physical RAM)

4. if you still observe fallbacks, restart your system more often

Hope it helps you too :)

---------- Post added at 14:54 ---------- Previous post was at 14:51 ----------

Interestingly I'm also getting a fallback at around 200M every time I run it .... going to investigate more.

@Kremator, please see what i wrote to jerminhu, it should help you too. If not, post your malloc.log file here, please.

---------- Post added at 14:56 ---------- Previous post was at 14:54 ----------

Could someone help me out ?

I'm trying to get large pages file's working via GMF.exe but for some reason or another GMF doesn't understand my username :S

My username on the desktop is Mac D ,(at the same time i'm the administrator)

So when GMF askes for the username ,I type in Mac D ,but GMF comes back with User doesn't exit

Tried different version's (MacD ,Mac_D ,macd ,Administrator which GMF did react on) but I still get "SeLockMemoryPrivilege: denied, huge pages disabled" in the malloc log.

What am I doing wrong ?

PS :

The malloctbb.dll is in Arma's dll directory

[edit]

Never mind ,got it working

... i think you already found, that GMF has a problem with the space in your username ('Mac D') ?

Share this post


Link to post
Share on other sites

I tried this dll and i keep getting a "arma3.exe - Bad Image" ERROR. It says the DLL is not designed to run on windows or it contains an error. I checked to see if arma was able to use the SeLockMemoryPrivilege and my username is in the granted field o im not sure whats causing this. any ideas?

also i get no error in my arma root directory.

Update-

Nvm i figured iot out. aparently you cant just right click the file in github and expect it to download the full file. only downloaded like 25kb. so i selected raw instead and now it starts up with no issues... now time to test and bench. :)

Edited by Sarge888

Share this post


Link to post
Share on other sites
Hi jerminhu,

... i think you already found, that GMF has a problem with the space in your username ('Mac D') ?

Yep ,got it working in secpol.msc after some screwing around:)

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

×