High Virtual Memory Use (32bit apps)
Opened this issue · 19 comments
After test various titles virtual memory on pba is more higher than vanilla
2.0gb in vanilla with/without csmt
2.6-2.7gb in vanilla + pba with/without csmt
Remember Me
Vanilla
https://i.imgur.com/aRwgKWr.jpg
Vanilla + CSMT
https://i.imgur.com/5igjxZt.jpg
Vanilla + PBA
https://i.imgur.com/KOCIo7Y.jpg
Vanilla + PBA + CSMT
https://i.imgur.com/KjnLJq6.jpg
This situation can be detonate various games crashing for 4096mb limit case: assasins creed 1, mass effect, farcry 2, farcry 3, test drive unlimited 2 and others
yeah, that will be the 512 + 128 + (( VRam / 4 ))
looks like path of exile is also having this problem with 32 bit dx9. port to the crystal vein then going to kaom's dream results in a crash. non-pba staging loads fine. launching the game with --noasync fixes the crash.
Path of Exile is performing worse with pba. All in all, Path of Exile has been playing less and less nicely with wine in general.
I don't see this issue being resolved any time soon. The problem is present for many years, it seems to come with the way Wine and graphics interact with each other, the higher the graphic detail the faster virtual memory fills up. Probably the reason why PBA triggers this much sooner is because of the improved performance.
The only high graphic game I know that doesn't do it is Crysis, the 32bit version keeps it's cool with 2.1GB even when you're blowing maximum details.
Regarding Path of Exile: Afaik, the game plays fine with the 32bit client and normal Wine with just CSMT on and easily hits 100fps+. The last time I played took me like 3 hours marathon before the virtual memory hit 4GB.
This should be reduced significantly in 87307b1 by properly unmapping the buffer if multiple libs load the PBA.
Tested with wine 3.4 and virtual memory remains similar
Remember me still show 2.6gb and other games with 3.5gb crash case mass effect 1 + mods, test drive unlimited 2 + mods and others
For anno 1404 (which is already bad cause of the memory issue), it makes it outright crash after loading a game.
debug.log
How much video ram do you have @Thaodan ?
PBA failed to create the buffer heaps, but it should fail back to none PBA.
Does anno 1404 work 'ok' with wine-staging or wine ( i.e. none PBA )?
have you tried pba with my envvar patch?
https://github.com/Firerat/wine-pba/
you will only need to apply the patches/0010-wined3d-knobs-and-switches.patch over existing PBA code
It will try to use PBA with low vram ( I created it for my laptop )
well, in that case I have no idea why PBA would fail to create the heaps
maybe the game consumes most of the 32bit address space, and when pba tries to address more it is exhausted.
you could reduce the heap sizes, but it would still crash eventually and probably sooner
I checked game specs, very low
seems a demo is available , so I might look at that
meh, apparently demo is garbage
https://appdb.winehq.org/objectManager.php?sClass=application&iId=9887
but, have you set d3d to 9 explicitly in Engine.ini ?
ok @Thaodan
So with a 32bit prefix
winetricks directx9
WINEARCH=win32 __PBA_GEO_HEAP=128 __PBA_CB_HEAP=32 wine ./Addon.exe
it seems to behave
as well as setting dx9 in Engine.ini also consider changing quality to 0 ( i.e. low )
That should give you more time
I can get it to crash sooner by setting higher HEAPs and setting highest quality, and it does seem to be when the virt mem use goes beyond 4gb ( the 32bit address space barrier )
another option is to disable PBA with PBA_DISABLE=1
but that seems stutter a little
You will need my Knobs_and_switches patch ( just 0010 over existing pba ) for the HEAP knobs
PBA_DISABLE is part of vanilla PBA
btw, geo 256 cb 64 also works, just play around with those numbers
for ref 512/128 is current PBA defaults
As I linked, this is probably a bug with upstream...
(that pba may particularly trigger, but that's outside the point)
edit: uh, and ffs, comparisons with windows are completely IT in wine
IT? I just asked how windows prevents this.
These issues are far more common in wine.
In-topic.
And of course, if somebody knew what's there in windows wine is doing differently that makes heap fly down, the problem would have been fixed.