Jump to content
fred41

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

Recommended Posts

Fred, our server have 32GB Ram, we use 12GB Ram Disk because the server only have 2HDDxRaid0 and not very fast ones. The loading and reaction times are (feels like) 5-6times faster and it react faster on new loads on the server. Will the ramdisk make trouble on the alloc? If we had SSD, i wont make this but atm its really neccesary. We use perf5 and your dll. Not always the newest but nearly up to date ;) Its a full time job to pimp this arma stuff ;)

... i think, as long, as your system has always enough large pages available (no fallback to SP, ^^ malloc####.log), there should no paging to disc occure too, and it makes still sense to use the left RAM for accelerating your slow IO ...

---------- Post added at 16:04 ---------- Previous post was at 15:06 ----------

Added a probably useful, little tool here:

https://github.com/fred41/tbbmalloc_arma/blob/master/tool/AddLockMemoryPrivilege.exe

This tool should be helpful, to set the SeLockMemoryPrivilege on systems, where secpol.msc is not available.

Usage (cmd.exe 'Run as Administrator'):

AddLockMemoryPrivilege armauseraccountname

(Tested with windows 7 only)

Greets,

Fred41

Share this post


Link to post
Share on other sites
Hello, i tried the newest malloc in dayz standalone, but i have some graphical glitches. is there a way to fix it? it only happens when i look at a specific angle and it affects only the hud and the inventory.

http://cdn.imghack.se/medium/41eabff125f8f7bb25d072c2d4853bd4.jpg

thanks

It's definitely the memory allocator that causes this bug.

I had exactly the same problem when using the allocator on DayZ SA. I'm on an GTX 570 and tested with various drivers (very old ones as well). It always was the same problem.

The bug only appears when you look into a certain direction on the map.

Switching back to the default allocator fixes it.

Share this post


Link to post
Share on other sites

BTW:

Did you know, that mapping a3 image file to large page memory region, significantly accelerate execution performance?

Look for 'GimmeMoreFrames' in my github repository, for a very simple, but powerful registry tweak.

https://github.com/fred41/GimmeMoarFrames

Up now, try it out :)

Edited by Fred41

Share this post


Link to post
Share on other sites

Any affect for ArmA 2 if done the same to arma2oa.exe?

Share this post


Link to post
Share on other sites
Any affect for ArmA 2 if done the same to arma2oa.exe?

... indeed, should have similar effect as in a3 ...

https://github.com/fred41/GimmeMoarFrames

(just repeated this link for the blind guys :) )

Edited by Fred41

Share this post


Link to post
Share on other sites

so i tried it and now i cannot launch my arma3server.exe

im clicking on it and its just sits their.. it was just working.

I downloaded, inpacked, went threw the "ok" for my pc to accept the reg tweek, restarted my pc. and now i have no working arma3server.exe

to expand upon that:

I am not using any mods or command line params. I am just simply trying to start it the ole fashion way of clicking on the .exe and running as admin. then that didnt work so I then just double clicked on the .exe and it again did Nothing.

My client seems to start up fine. Honestly i havent tested the rest of the performance ... because i just lost my testing server.

Edited by Lordprimate

Share this post


Link to post
Share on other sites

Oh dear ... was going to try it but now I'm scared :( although if I have already run secpol fix then I've done it already I would assume ?

Share this post


Link to post
Share on other sites

lordprimate just change the 1 to 0 in the reg then and rereg :)

Share this post


Link to post
Share on other sites

... sorry, guys for the confusion, i will try to make things clear.

This registry tweak works additional to the usage of tbbmalloc with large pages.

So, if you already set the required privilege correctly, you only need the registry tweak to map arma3.exe in large page region too.

If you don't set this privilege already, you have to do it now. The easiest way to do this, is with my new 'all in one' tool 'GimmeMoarFrames.exe' (see readme.md in repo for details)

Greets,

Fred41

EDIT:

I just now see, that my arma3server.exe makes problems too, will investigate this tomorow.

If someone runs in trouble with server too, just set the UseLargePages value back to 0, for arma3server.exe registry key (registry editor).

I have disabled the tweak for arma3server.exe temporarily, seems to work fine with arma client.

Edited by Fred41

Share this post


Link to post
Share on other sites

Ok so i opened the file in notebook++ and i changed the servers last char to 0 and saved it and my server works. Thanks for the heads up i didnt think i could edit so i didnt even try!! Well Hats off to you. I can go and test Grouplink and taskforceradio

Share this post


Link to post
Share on other sites
Ok so i opened the file in notebook++ and i changed the servers last char to 0 and saved it and my server works. Thanks for the heads up i didnt think i could edit so i didnt even try!! Well Hats off to you. I can go and test Grouplink and taskforceradio

Unfortunately i realized to late, that arma3server.exe doesnt work correctly, if mapped in a large page region.

I am really sorry for the trouble caused, by my (over) excitement about the new discovery :rolleyes:

For everybody, this tweak currently only works for client and HC.

Greets,

Fred41

Share this post


Link to post
Share on other sites

If i understood Fred , no option tbbmalloc for server

but -malloc=tbbmalloc is ok for client and HC...

Share this post


Link to post
Share on other sites

My server is still working with your latest malloc, all fine :confused:

You are talking about the other tweak for registry right? :D

Edited by ramius86

Share this post


Link to post
Share on other sites

Everything is still well with tbbmalloc.

I only meant the registry tweak, for additional performance.

Meanwhile, i found a solution to use this tweak for arma3server.exe too.

If you guys are interested, see readme.md in github repo (hardliner section) for more details.

The only problem is that this patch is overwritten with each steam update (needs to be fixed by BIS for a permanent solution).

Greets,

Fred41

Edited by Fred41

Share this post


Link to post
Share on other sites

... it works great for me ...

I explicitly wrote it in the hardliner section, because it requires a bit experience to make it running.

It especially requires carefully reading before trying ;)

Edited by Fred41

Share this post


Link to post
Share on other sites

like I said it's bit iffy cause now it works with or without it ...

:) I can't really explain it, it's like the system realized what I want ;)

must be reated to 2012/2012r2

now on older systems like W7 and W2008, 2008r2 it needs to use 8100 instead 8140 just like you wrote

Edited by Dwarden

Share this post


Link to post
Share on other sites

... i really know such situations well ...

However, it could be a bug in pre 2012 windows versions.

The CFF patch relates to VS linker option 'Randomized base address' and

it seems to be incompatible with 'UseLargePages' for image file loading, at least in windows 7.

So MS probably fixed this incompatibility with 2012 windows versions.

Will add this hint to usage instructions for 'GimmeMoarFrames'.

Thanks for sharing.

Edited by Fred41

Share this post


Link to post
Share on other sites

Can someone else please test the 'GimmiMoarFrames' registry/privilege tweak for arma3server.exe on a server 2012/2012R2 system, without the CFF patch?

Thanks in advance,

Fred41

Edited by Fred41

Share this post


Link to post
Share on other sites

like me? right now? running multiple instances of server and it seems to work ;)

tho for details see PM

Share this post


Link to post
Share on other sites

I used the tool to set the required privilege (AddLockMemoryPrivilege root) root is my PC account name which is a Administrator account. It said it was applied and told me to restart. I did then I added the start up parameter in steam (-malloc=tbbmalloc) I then ran Arma 3 as admin played a bit then checked my Arma 3 directory for the log file and it's named malloc_1628.txt http://pastebin.com/68WG8yfS I also ran steam as Admin before I ran the game.

I have 8gb of ram installed. I am obviously doing something wrong and do not know what. Can you help me? :)

thanks.

Share this post


Link to post
Share on other sites
I used the tool to set the required privilege (AddLockMemoryPrivilege root) root is my PC account name which is a Administrator account. It said it was applied and told me to restart. I did then I added the start up parameter in steam (-malloc=tbbmalloc) I then ran Arma 3 as admin played a bit then checked my Arma 3 directory for the log file and it's named malloc_1628.txt http://pastebin.com/68WG8yfS I also ran steam as Admin before I ran the game.

I have 8gb of ram installed. I am obviously doing something wrong and do not know what. Can you help me? :)

thanks.

@Abuser, your logfile shows, the required privileg is not enabled.

If you run your arma with an account that is member of the administrator group, then you have to start arma/steam via 'Run as administrator' too.

Additional you should check, what is using so much of your 8GB physical RAM and free as much memory as possible for arma.

EDIT: sorry, i probably didn't read your post correctly. One more question, did you run 'AddLockMemoryPrivilege root' in a console with admin rights?

If nothing of the above helps, you can use the manual methode, using secpol.msc. Don't forget a restart.

Edited by Fred41

Share this post


Link to post
Share on other sites
@Abuser, your logfile shows, the required privileg is not enabled.

If you run your arma with an account that is member of the administrator group, then you have to start arma/steam via 'Run as administrator' too.

Additional you should check, what is using so much of your 8GB physical RAM and free as much memory as possible for arma.

EDIT: sorry, i probably didn't read your post correctly. One more question, did you run 'AddLockMemoryPrivilege root' in a console with admin rights?

If nothing of the above helps, you can use the manual methode, using secpol.msc. Don't forget a restart.

Hello I finally got it working I believe.

My Log: http://pastebin.com/xUk3Ahq6

Does it look fine? Also can I use -maxMem=2047(since anything higher falls back to 2047) parameter while using -malloc=tbbmalloc or will it interfere with it?

Thanks :)

Share this post


Link to post
Share on other sites

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

Look at 34.991s in your malloc.log file, there is your OS out of large pages. This means your memory is fragmented.

This is most likly caused by this:

system physical RAM total: 8067

system physical RAM available: 5784

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.

You can still use maxmem=2047, without any problems.

Edited by Fred41

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

×