Jump to content

[1.0][Release-5-0][April 28, 2015] Active Texture Management - Save RAM!


rbray89

Recommended Posts

(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

DynamicHeapAllocator out of memory - Could not get memory for large allocationCould not allocate memory: System out of memory!

Trying to allocate: 4194304B with 4 alignment. MemoryLabel: STL

Allocation happend at: Line:74 in

Memory overview

[ ALLOC_DEFAULT ] used: 613037036B | peak: 0B | reserved: 684178749B

[ ALLOC_GFX ] used: 576749155B | peak: 0B | reserved: 642857384B

[ ALLOC_CACHEOBJECTS ] used: 68248B | peak: 0B | reserved: 12582912B

[ ALLOC_TYPETREE ] used: 13172B | peak: 0B | reserved: 4194304B

[ ALLOC_PROFILER ] used: 483156B | peak: 0B | reserved: 8388608B

Could not allocate memory: System out of memory!

Trying to allocate: 4194304B with 4 alignment. MemoryLabel: STL

Allocation happend at: Line:74 in

Memory overview

[ ALLOC_DEFAULT ] used: 613037036B | peak: 0B | reserved: 684178749B

[ ALLOC_GFX ] used: 576749155B | peak: 0B | reserved: 642857384B

[ ALLOC_CACHEOBJECTS ] used: 68248B | peak: 0B | reserved: 12582912B

[ ALLOC_TYPETREE ] used: 13172B | peak: 0B | reserved: 4194304B

[ ALLOC_PROFILER ] used: 483156B | peak: 0B | reserved: 8388608B

(Filename: Line: 909)

Crash!!!

Any idea? Happen when I have some mods. I suspect the high texture pack

Link to comment
Share on other sites

Can someone answer this question I have? I am on the download page and ready to download this plugin, but then I see "x64" and "x86" files. What's the difference between these two differently named files and which is the better one to use?

Link to comment
Share on other sites

EDIT - And nope. Huh. The latest version of RealChute has a toolbar icon that's 1kb and 38x38. That shouldn't be a problem. There is a FilterIcon_selected.png which is 52kb (!) which is 32x32. If that's stretched to fill a 38x38 allocation, then it could end up blurry but is that the toolbar icon? Don't know, I don't use RealChute. Regardless, I think you're right that it isn't ATM at fault here and that an exclusion file in that folder does actually work.

Nah, 32x32 is for the VAB category icon, which is slightly smaller. RealChute adds a new tab for Parachutes. The 38x38 is indeed the toolbar button.

Link to comment
Share on other sites

Hello!

Why does it possibly happen for some users that the mod seems to work good but the memory consumption just will not go down or will reduce very slightly while the texture resolutions are visibly reduced?

The same with the popup forced OpenGL.

Everywhere I see this piece of advice people say that it actually will cut the memory usage significantly but for some weird reason it does not help me much.

Does anybody else here have memory crashes with vanilla game?

I can post the logs but what should I do in game while recording these logs?

Thank you!

Link to comment
Share on other sites

Hello!

Why does it possibly happen for some users that the mod seems to work good but the memory consumption just will not go down or will reduce very slightly while the texture resolutions are visibly reduced?

I can think of two ways how this can happen (it can also be a combination of both):

1. (Probably most common) Most of the textures are already offloaded into VRAM (graphics card memory), so when using ATM, what happens is saving VRAM, but not much RAM/VMEM since most textures don't reside in RAM/VMEM to begin with.

2. (Rare and you probably would already know) You manually went and downscaled textures of stock and mods, so there's not much left to do for ATM. In theory, texture memory could be further reduced, by downsizing the textures in the asset files (those are not in the squad folder). Those contain stuff like textures for buildings, planets, sky, kerbals, menus and so on. ATM currently does not downscale those, even though some of them are excessive (i.e. those for kerbals - and there are dozens of them). This might actually be a good thing, as ATM after all the time it has been in development, does not have a simple filter like for example .*/icons/.* out of the box - if it can't even by default handle what obviously are icons, then what do you think might it do to the UI of the game, if it were to downscale assets.

Link to comment
Share on other sites

Hey-low Dev!

So after a small hiatus from KSP, I came back to play around a bit in game and, without any new additions to mods, found that ATM is causing some very weird behavior on my PC; For some reason ATM is causing a ridiculous amount of load on my CPU, causing loading of a single texture, regardless of size, to take up to a few minutes to load, as well as crippling any other processes. If I take ATM out, KSP loads as normal, within a few minutes altogether. Oddly enough I'm almost certain that ATM had already ran before trying to play recently, so it doesn't seem to be caching anything correctly; even after restarting the process over, the behavior continues from the very start.

Any ideas as to what might be occurring? Is there something I can do to limit ATM's load on my CPU? ATM alone is causing a temperature increase of about 30 degrees centigrade, which seems a bit much for the mod's processes imo.

Link to comment
Share on other sites

That's intended behavior - what ATM is doing is processing the textures and creating a cache of them. For heavily modded installs, this may take an hour or so. Then, next time, KSP loads the cache ATM created instead of each texture individually again and you get loads times of under like 5 minutes. If you quit during loading, ATM has to start creating the cache again. Also, this is a fairly recent addition to ATM - it's possible the last time you played was before this was included.

As for making it a bit more manageable, people have reported success splitting up Gamedata so ATM only has to cache a small number of textures each time (say, just KWRocketry, then just Stock parts etc).

If you do the above, let KSP load completely and ATM is still lagging or taking ages to load, and you're certain you're using version 4-3, post your log and computer specs.

Link to comment
Share on other sites

ATM is converting and caching all your textures on it's first run. It does take quite a while (hour+) and has been written to be multi-threaded, hence the huge CPU load (it should max it out). Subsequent loading times are noticeably faster than stock and use less memory since the texture format is more efficient.

If you open the ATM directory you should see some *.atmcache files (or similar, I forget what the extension is)

Link to comment
Share on other sites

Help!

I upgraded from standard to aggressive today. Standard was fine with no problems. On aggressive there are five models that are ending up with no textures - just silver/grey models. Those five are all in the Karbonite mod, and are three 1.25 tanks, a turboprop and a radial jet engine, if it matters.

This happened, and I thought, huh, that's weird. Since it was just five parts, I set up some overrides in the ATM.cfg file to not compress that parts, booted up KSP, and it was fixed... at first. The next time I loaded KSP the models were back to plain-grey.

If I go into the texture cache, I find files there for those parts. If I delete the cache files, then boot KSP, the models look right. Then the next session, they're back to greyish looking.

Theory - if I have conflicting .CFG files, would that do it? The main ATM folder has a CFG that applies to the UmbraSpaceIndustries/ folder, but my override file just covers UmbraSpaceIndustries/Karbonite.

The log has this:

GameDatabase: Texture 'UmbraSpaceIndustries/Karbonite/Parts/KA_Tank_125_02/blank_NRM' requested as normal map but texture is not a normal map and is not readable

I tried replacing the overrides with texture = statements like in the examples in my own custom ATM.cfg. I've searched and read back in the thread and no dice. I hoping someone else has seen something similar or can point me at another post as to how to fix this.

Link to comment
Share on other sites

Hello!

Why does it possibly happen for some users that the mod seems to work good but the memory consumption just will not go down or will reduce very slightly while the texture resolutions are visibly reduced?

The same with the popup forced OpenGL.

Everywhere I see this piece of advice people say that it actually will cut the memory usage significantly but for some weird reason it does not help me much.

Does anybody else here have memory crashes with vanilla game?

I can post the logs but what should I do in game while recording these logs?

Thank you!

rynak has given you an excellent answer above but it's worth stressing that this is an excellent question for those that aren't computer graphics or memory experts.

KSP, and its Unity engine, work a particular way.

ATM, OpenGL and directX11 (the usual attempts to save memory) try to change the way KSP/Unity work by getting 'underneath' the program and controlling the computer itself (sort of).

There are so many different computer types, their Operating Systems (Windows, Linux, various mac, etc.), CPUs (Central Processing Units, Intel, AMD, etc.) and GPUs (Graphics Processing Units, or just 'graphics cards') that no one solution can be guaranteed to work on any particular setup.

That means the best you can do is 'suck it and see'. Make sure you have a backup, then just try every option available in order to find out which gives you the best results.

(For me ATM does well and directX11 works a treat, apart from the common graphics glitches. OpenGL actually takes more memory and gives more problems, so I avoid that. Other people and their machines have completely different results. It's hard, trying to beat the system, otherwise we'd all know exactly what to do.)

Link to comment
Share on other sites

In my logs I have


ActiveTextureManagement: Memory Saved : 0B
ActiveTextureManagement: Memory Saved : 0kB
ActiveTextureManagement: Memory Saved : 0MB

I have several mods installed.

I'm running the x86 aggressive on OSX

Link to comment
Share on other sites

Windows 7, 4GB of RAM, 1 TB of harddrive. So whenever i launch KSP with ANY of your packs, it says... 'Failed to gc to many heap sections'

You're on a 32bit Windows? If so, you need to do a tiny bit more legwork:

1, Download the x86 version of this (aggressive saves more RAM at the expense of texture quality). I'm assuming you're running the x86 version of KSP as it makes no sense to be running the x64 version as, while it does allow more RAM usage, your OS doesn't. If you are using the x64 version of KSP though, you'll need the x64 version of ATM. Match the ATM version with the game version, in short.

2, In the ActiveTextureManagerConfig.cfg, add a line - WAIT = TRUE - like so:

ACTIVE_TEXTURE_MANAGER

{

WAIT = TRUE

DBG = TRUE

###Section for global settings

....

3, Open a command prompt as administrator* and enter `bcdedit /set IncreaseUserVa 3072`. Then restart your computer. This basically tells Windows to increase the virtual address space available to applications to 3GB.

4, Use `-force-d3d11-no-singlethreaded -popupwindow` or `-force-opengl -popupwindow`as a launch option for KSP.exe (if your graphics card can support it)

Because you have 32bit OS (and hence roughly 4Gb RAM), Windows is taking up about half of that, leaving only 2Gb for KSP which is very slightly over what the stock game needs. But, if you add in any mods, you'll likely bump up the usage to over 2Gb and cause a crash. I hope this helps :)

*If you don't know how to do this, go to your start menu --> All Programs --> Accessories, right click on 'Command Prompt' and choose 'Run as administrator'.

If you don't have a 32bit OS then... I'll leave it to the experts.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...