Jump to content
fred41

using large page memory mapping, for increased performance

Recommended Posts

I was using Windows 7 Enterprise 64-bit and I had to revert the 'UseLargepages' back to the value of '0' so the A3 client would launch (otherwise it wouldn't launch if the value was set to '1')

Share this post


Link to post
Share on other sites

So it seems everyone can still use it except win7 users. Well well what can you do:(

Share this post


Link to post
Share on other sites

there is no lack of support and honestly I do wish Fred41 realize it instead of jumping to fast conclusions ...

---------- Post added at 12:48 ---------- Previous post was at 12:45 ----------

So it seems everyone can still use it except win7 users. Well well what can you do:(

the question is IF it also crash for Windows Vista users ...

Share this post


Link to post
Share on other sites
there is no lack of support and honestly I do wish Fred41 realize it instead of jumping to fast conclusions ...

---------- Post added at 12:48 ---------- Previous post was at 12:45 ----------

the question is IF it also crash for Windows Vista users ...

I just downloaded the update and started Arma 3 with

-malloc=tbbmalloc -nosplash -nologs -mod=@CBA_A3;@bcombat;@DragonFyre;@Blastcore-A3-Phoenix;@agm;@Vcom_Driving

went into the main menu, no crash. It still seems to work:

WindowsVersion: 6.1  ServicePack: 1.0  Typ: Desktop

process virt. address available:  3899
system physical RAM total:        8168
system physical RAM available:    5582
system committed limit:          28588
system committed peak:            4986
system committed current:         3656
system cache current:             5096
system handles:                  27516
system processes:                   90
system threads:                   1199

system uptime minutes:             108

SeLockMemoryPrivilege: granted, huge pages enabled

  0.000s: 0.209ms  2048k at:0xffc00000 Alloc LP (   2M)
  0.000s: 0.002ms   128k at:0x01330000 Alloc SP (   2M)
  0.047s: 0.773ms  8192k at:0x00000000 Alloc LP failed -> fallback
  0.047s: 0.003ms  7232k at:0x0ad30000 Alloc SP (   9M)
  4.134s: 0.003ms  1024k at:0x0d430000 Alloc SP (  10M)
  4.134s: 0.002ms  1024k at:0x0dfa0000 Alloc SP (  11M)
  4.134s: 0.002ms  1024k at:0x0e950000 Alloc SP (  12M)
  4.134s: 0.002ms  1024k at:0x0f4a0000 Alloc SP (  13M)
  5.382s: 0.002ms  1024k at:0x0f5a0000 Alloc SP (  14M)
  5.382s: 0.002ms  1024k at:0x0f6a0000 Alloc SP (  15M)
  5.382s: 0.002ms  1024k at:0x0f7a0000 Alloc SP (  16M)
  5.382s: 0.002ms  1024k at:0x0f8a0000 Alloc SP (  17M)

Win 7 x64 Pro

When is it supposed to crash?

Share this post


Link to post
Share on other sites

When is it supposed to crash?

When the large pages is enabled. You seem to fallback to SP almost instantly. (Alloc LP failed) So no crash.

Edited by Greenfist

Share this post


Link to post
Share on other sites

you mismatching 2 features, Allocator using LP and Image mapping into LP,

the logging You have in the 'public version of allocator covers only the first case'

Fred41 has new version of allocator which logged both variants of utilizing LP and I do hope he will release it

Share this post


Link to post
Share on other sites
you mismatching 2 features, Allocator using LP and Image mapping into LP,

the logging You have in the 'public version of allocator covers only the first case'

Fred41 has new version of allocator which logged both variants of utilizing LP and I do hope he will release it

Thanks, I did not know that.

But the both LPs seem to fail/succeed concurrently:

if I've had my computer on for a longer period, the allocator logs a fallback to SP, and the game doesn't crash, even with the 'UseLargePages' = 1.

But a frest restart, alloc LP works (and apparently the game's LP too). Result -> crash.

Share this post


Link to post
Share on other sites
you mismatching 2 features, Allocator using LP and Image mapping into LP,

the logging You have in the 'public version of allocator covers only the first case'

Fred41 has new version of allocator which logged both variants of utilizing LP and I do hope he will release it

If Fred41 needs a volunteer to see the output of the Image mapping log... i'm up for that

Share this post


Link to post
Share on other sites
I just downloaded the update and started Arma 3 with

went into the main menu, no crash. It still seems to work:

Win 7 x64 Pro

When is it supposed to crash?

You didn't get enough LPs allocated. Fresh restart or recycle with LPManager and you should see crashing. You don't have enough memory available.

Share this post


Link to post
Share on other sites

I really hope there is a workaround for this issue. I already felt the difference playing some missions that I created before and after.

Share this post


Link to post
Share on other sites

i dunno if this related to the tweak but my game crashed quite a lot today..twice while browsing server and couple of times in MP games..gonna try disabling largepage will report later

Share this post


Link to post
Share on other sites

Ok I see no light or solutions here so I have to use the legacy 1.36 so I can play and still enjoy the game :)

Share this post


Link to post
Share on other sites

I want to share my experience.

First of all I went to secpol to see that 'Lock pages in memory' setting and it was already enabled for my user. I don't actually remember changing that setting, but I have a feeling I did that at some point long time ago for something.

Then I launched the reg files and went for a reboot.

Before all that I made a few small benchmarks with different scenarios, empty mission, mission with some friendly ai and and another mission with a few squads fighting each other and recorded the framerate I got to a txt file.

Well after the reboot nothing changed, still exactly the same frames, around 40-50 which satisfy me because I know how this game works.

Then I tried custom tbbmalloc dll and nothing changed too.

But then I decided to try the server. And it launched as usual (I host some small mp games almost every day) though first page of this guide heavily implied that the server will not start. So, did I do something wrong or this can happen?

My specs - Win7 x64 Ultimate, i5 2500k OCed to 4.5 ghz, 16gb ram. I have UAC disabled if that matters.

Arma 3 - latest stable 1.38, same for the server.

New info after a few minutes of tests.

Okay, after another reboot the server is still working but the client crashes right at the start.

Had to put "UseLargePages"=dword:00000000 back for client and server.

Another info.

I installed the explore suite and unchecked flag "DLL can move" for arma3.exe and the game started.

I mean after I put to "UseLargePages"=dword:00000001 back.

After a few tests I didn't notice any performance gain. So maybe that's just differ from system to system.

And yes, we need some kind of official benchmark from bohemia that tests all kinds of situations. Game loading, terrain loading, ai calculations, engine calculations, etc.

Edited by rebelvg

Share this post


Link to post
Share on other sites

... just because people are still experimenting with GMF and not everybody is really realizing what happens ...

Since arma3.exe is linked with /DYNAMICBASE flag now (since 1.38), there is definitely no way to map arma executable in a large page region (at least not without any patching, not recommendet, because of anticheat).

Its funny, but it is actually only one little bit in arma3.exe file, that is on a different state (0->1) now.

Thanks BI, great job :rolleyes:

Edited by Fred41

Share this post


Link to post
Share on other sites

Fred41 it's because of ASLR to work properly,

if you know how make sure that ASLR works while it's "false" then please tell us

otherwise there isn't other way...

also AFAIK the default recommended state for binary under 'modern' Windows state equals "true" ...

Edited by Dwarden

Share this post


Link to post
Share on other sites

i can confirm this still works in win 10..i get slightly better fps with userlargepages=1..idk what are those flag thing u guys talking about but the tweak still works..maybe its time to ditch win 7..:rolleyes:

Share this post


Link to post
Share on other sites
i can confirm this still works in win 10..i get slightly better fps with userlargepages=1..idk what are those flag thing u guys talking about but the tweak still works..maybe its time to ditch win 7..:rolleyes:

OK no problem send me the money or buy me a new win version :D

Share this post


Link to post
Share on other sites
Fred41 it's because of ASLR to work properly,

if you know how make sure that ASLR works while it's "false" then please tell us

otherwise there isn't other way...

also AFAIK the default recommended state for binary under 'modern' Windows state equals "true" ...

... if you really need ASLR for your game (i doubt that), just make your own ASLR ...

Write a little loader, that loads your binary at a random address, aligned to a large page boundary (VirtualAlloc with MEM_LARGE_PAGES),

and integrate this in your already existing launcher. This way it would work with any OS including 8.1, 10 ...

But this is a bit harder then it sounds first, so probably not really an option for BI.

Share this post


Link to post
Share on other sites

So, here's what I gather thus far (please correct me): You guys are using some new Steam security/anti-cheat stuff which requires ASLR to be enabled, and to enable ASLR this certain flag has to be enabled which breaks the ability for large page mapping?

Share this post


Link to post
Share on other sites
OK no problem send me the money or buy me a new win version :D

Win 10 will be free as an upgrade for 7 & 8 owners. ;)

Share this post


Link to post
Share on other sites
So, here's what I gather thus far (please correct me): You guys are using some new Steam security/anti-cheat stuff which requires ASLR to be enabled, and to enable ASLR this certain flag has to be enabled which breaks the ability for large page mapping?

Yep seems like some anti-cheat solution/protection is making this now...

http://en.wikipedia.org/wiki/Address_space_layout_randomization

At least the tbbmalloc and LPs in that are still working.

Share this post


Link to post
Share on other sites

As many others I was relying on this tweak (thanks Fred41!) to get somewhat playable framerate but after playing last night I was back to lower FPS and stuttering (HDD defragged) after switching UseLargePages back to 0.

Now the question...

If I download the CFFexplorer and flip the switch in arma3.exe can I still play online without triggering BE or VAC?

Yep seems like some anti-cheat solution/protection is making this now...

http://en.wikipedia.org/wiki/Address_space_layout_randomization

At least the tbbmalloc and LPs in that are still working.

Now I'm confused again :confused:

Yea, I'm running Windows 7 Ultimate SP1 64-bit and will continue to do so for quite some time since Windows 8.x will not enter my HDD.

/KC

Share this post


Link to post
Share on other sites

Very much regretting I updated.

EDIT

From somebody who is running a low/mid range system I can say that I can't see a massive depreciation in performance, although I've only played with the update and without Fred's memory allocator and LPmanager for a short time.

However the one scenario I have is pretty much my benchmark for performance on my system, it's a CQB module used on Avgani with a very densely population of AI spawn points. I do actually seem to perceive an improvement over earlier versions I played without Fred's allocator, so it's not a complete and total loss.

Furthermore, and this is the big part, it seems as if Dragonfyre, which is script dependent and does not function well when there's any lack of performance for me at least (sonic echoes delayed badly) - seems to actually be running "better".

Again, this is only a preliminary evaluation, but I immediately wanted to assess the damage to my performance budget and fired up the most demanding scenario I created while I had LPmanager and Fred's memory allocator running. Again, the delay of the sonic echoes in Dragonfyre is the canary in the coal mine that indicates sliding performance, and I'm not hearing it, even in the thick of a densely populated mission.

Edited by Pd3

Share this post


Link to post
Share on other sites
Very much regretting I updated.

You mean updating the game? You can revert back to 1.36 if you don't mind the incompatibility with up-to-date servers.

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

×