Jump to content
fred41

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

Recommended Posts

... there is a updated version of tbbmalloc.dll ready for testing, see the link in initial post.

Please read the tbbmalloc.txt for usage instructions/restrictions.

Please note the new version preallocates 1000 large pages (2MB each, ~2GB sum) at arma process start.

It is possible that this large memory preallocation at arma start fails because of high fragmentation state of your system memory.

If this is the case, just restart your system, to restore a low fragmentation system memory state, before you start arma.

Let me know your results, especially if you use this allocator for arma server, because i dont have any benchmark results yet.

Greets,

Fred41

Edited by Fred41

Share this post


Link to post
Share on other sites

Hi fred, I've tested this with client and server, with client I noticed an improvement ( me and mate ), with server it seems not more fps but more stability. Less "waves" in ASM. Maybe it's also due to the fact that my arma is all in ramdisk so things are yet faster than on hdd

Share this post


Link to post
Share on other sites

I didn't tried it server side yet but I noticed a big improvement client side while using zoomed optics (suddenly my framerate jump to 60 fps (v-sync on) when my average framerate is ~35 fps).

Also it works on Arma II (client side only, server side give me way too much bugs), might be a placebo effect but makes me feel the game run smoother.

Share this post


Link to post
Share on other sites

... hi, and thanks for report ...

@ramius, under what load (player numbers, mission, duration) did you test server side?

@Neodammerung, what bugs did you observed serverside in A2? What conditions are your server running, when bugs occur (player numbers, mission, duration)?

Greets,

Fred41

Share this post


Link to post
Share on other sites

ArmaII, dedicated server, player slots 8, coop mission without HC, duration irrelevant

With the custom malloc serverside, only 1 friend managed to join (so we were 2 on the server) nobody else managed to join. Everyone else trying saw the loading screen then their game just crashed. Tried several times and on different maps/missions, always the same bug.

Otherwise I can run coop missions with up to 8 players with lots of AI for hours without problem.

Share this post


Link to post
Share on other sites

@ramius, thanks for testing. I think on server a difference will be more shown under heavy load (50+ player, much script processing, event handler), but it is only asssumtion by me.

@Neodammerung, i have checked the A2/OA executables, there is no LAA flag set (like in A3), therefore memory addresses above 2GB are not available for arma process.

This means tbbmalloc.dll will not really work with A2 currently, sorry :/

Thanks for test and reporting.

Greets,

Fred41

Share this post


Link to post
Share on other sites

what you checking fred41?

Arma 2 is LAA aware since Arma 2 build 1.07.71721

so all binaries after that build like got LAA (A2, OA, TKOH, A3, DayZ)

Share this post


Link to post
Share on other sites
what you checking fred41?

Arma 2 is LAA aware since Arma 2 build 1.07.71721

so all binaries after that build like got LAA (A2, OA, TKOH, A3, DayZ)

... oh, checked the wrong executable.

Just now checked the right one (OA latest beta) and the LAA flags are set.

Ok, in this case, tbbmalloc.dll (especially preallocation of nearly 2GB memory, above 2GB address space) could/should basically work on A2/OA too.

Thanks for your hint and sorry for that incorrect information,

Fred41

Edited by Fred41

Share this post


Link to post
Share on other sites

adding malloc=tbbmalloc (your version) often crashes at startup or . causes a memory crash mid game.

this is with the latest posted version

Share this post


Link to post
Share on other sites
adding malloc=tbbmalloc (your version) often crashes at startup or . causes a memory crash mid game.

this is with the latest posted version

ram available?

Share this post


Link to post
Share on other sites
ram available?

16Gb

my system:

6100 AMD clocked at 4.1 (stable)

2 x ATI 7950's in X'Fire

16GB. DDR3 (1800mhz?)

350Gb SSDrive

Windows 7 64bit

Share this post


Link to post
Share on other sites

You need to, read the fred41's readme

The use of large pages require the page lock privilege for the arma user.

Make sure your arma user account has this privilege set in you local security policies settings (restart required) and start arma with administrator rights.

Share this post


Link to post
Share on other sites
You need to, read the fred41's readme

The use of large pages require the page lock privilege for the arma user.

Make sure your arma user account has this privilege set in you local security policies settings (restart required) and start arma with administrator rights.

... yes exactly this, big thanks ramius :)

@Lordprimate, it is very likely, that you don't grabbed the latest, because this would terminate, if lock pages privileges aren't properly set (the latest version was only one day on git).

You could use the following tool, to verify if large pages are used:

http://technet.microsoft.com/en-us/sysinternals/dd535533.aspx

Start vmmap while arma is running and select the arma process. If you scroll down a bit, there should be a big memory block of 2,048,000K shown, in column "Locked WS" (yellow).

Greets,

Fred41

Share this post


Link to post
Share on other sites

OK so the link i posted up talks about Adding a group or a user to lock pages. so to undo that i just have to remove my profile from the lock pages list? literally the opposite of that the link i posted says to do?

so just to be clear do what the link says but the reverse, i go to that UI and remove my profile? then ill be "Unlocked"?

i am honestly confused..

you say it needs to be unlocked, but then you say it requires page lock privilege. so unlocked or locked??

If i am suppose to add my profile name to the lock privilege list then.. Its already there...

If i need to remove my profile name from the list then i have not done that ...

based on this thread i found, my page lock privileges are already set up for me. that is why i am not understanding what i need to do.

http://www.sevenforums.com/general-discussion/3706-lock-pages-memory.html

Edited by Lordprimate

Share this post


Link to post
Share on other sites

@Lordprimate, i think i fully understand your confusion, so let me try to exlain (still in pure english):

The advantage of large pages, is a significant performance boost for all memory accesses to the related areas.

The disadvantage is, that it could be difficult on systems with less physical RAM, to find free areas for allocation, because of higher allocation granularity.

Ok, now to your question:

To use some large pages for arma (via tbbmalloc), the user account/group which you use to start arma (client or server) must have:

1. the privilege, to lock pages in memory

2. if your arma start user is in the administrator group, then you have to start arma as administrator

To ensure the 1. condition you have to do exactly, what is described in your link:

http://msdn.microsoft.com/en-us/library/ms190730.aspx

(adding your account, not removing him).

I am assuming, you know how to ensure condition 2. And don't forget to restart your system.

To verify your success, you could use the methode, i described in my last post.

I hope it works and let us know your results,

Fred41

Edited by Fred41

Share this post


Link to post
Share on other sites

Giving the client administrator rights is unfortunately a no-go for me; is this just for the time being and will it not be mandatory at a later stage?

EDIT: I mean I'm not comfortable with granting ArmA/Steam administrator rights; neither by giving the current user admin rights, nor by granting the client admin rights...

Edited by NoPOW

Share this post


Link to post
Share on other sites

Try to give rights to your user, maybe you are running arma not as administrator

Share this post


Link to post
Share on other sites
Giving the client administrator rights is unfortunately a no-go for me; is this just for the time being and will it not be mandatory at a later stage?

EDIT: I mean I'm not comfortable with granting ArmA/Steam administrator rights; neither by giving the current user admin rights, nor by granting the client admin rights...

... yes, i share your concern and i found the following:

If your user account, which you use to start arma, is in the Administrator group, then you have to start arma as administrator too.

If your user account, which you use to start arma, is a normal account, then you can start arma normally (not as administrator).

This seems a bit confusing, but it works this way, just now tested.

In any case, the user account, which you use to start arma, must have the privilege to lock pages in memory (see last posts).

Greets,

Fred41

Edited by Fred41

Share this post


Link to post
Share on other sites

Hmmm... It does seem to work, though the 2.048.000K only shows up in Committed and Private bytes, not in 'Locked Working Set'? (This happens in both user and administrator space.)

Share this post


Link to post
Share on other sites

ok well firs off thanks for cleaing that up, this is what i needed to know:

To ensure the 2. condition you have to do exactly, what is described in your link:

http://msdn.microsoft.com/en-us/library/ms190730.aspx

(adding your account, not removing him). And don't forget to restart your system.

that being cleared up, i have to note that my user profile was already Listed.. but it wasnt working.... it was Just my user name... ie "lordprimate" (not my real user name just an example)

so what i did was delete that user. And search for my user name again. this time the profile came up as a sub group of my PC. and was listed with my pc's name. It showed up as "my pc name/lordprimate". I saved that and for good measure i added "administrator" (which ended up looking like "my pc name/Administrator"

And then i found a "everyone" profile .. so i added that as well ...

I added -malloc=tbbmalloc back to my startup param's. and instead of instant crash the game launched.. ill download that program you posted earlier to verify memory usage and check

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

×