rbray89

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

Recommended Posts

I completely deleted the KSP folder and reinstalled the game from scratch, and installed the latest ATM on top of that, so it's the only mod and should have no cache.

When I start the game, it acts like everything is already cached, and then throws the "too many heap sessions" error.

Is there another cache elsewhere that it's maybe reading from? If not, I'm very puzzled by this behavior.

UPDATE: Here's output_log.txt.

Edited by LitaAlto

Share this post


Link to post
Share on other sites

The regular expressions weren't the problem. Those work fine, but apparently some of the mods need to have folder-specific overrides.

For instance, to fix all icons for agises' Notepad mod, I added this file as 'notes.cfg':

  ACTIVE_TEXTURE_MANAGER_CONFIG
{
folder = notes
enabled = true
OVERRIDES
{
.*/Textures/.*
{
compress = false
mipmaps = false
scale = 1
max_size = 0
}
}
}

Thanks to Saint-Stanislas for pointing out the mod-specific configs. There are some of them that already have configs, but the compress/mipmap options are set to true. The compression causes blurring, and there's no reason for mipmapping something that's always the same LOD.

In any case, I just wrote down the names of each icon that was bothering me, then looked at the folder structure to see where the icons for that mod are. After that it's just a matter of making the cfg file and checking to make sure the regex matches.

Edited by Khatharr

Share this post


Link to post
Share on other sites

Hello!

I'd like to know if this mod forces my game to run on OpenGL.

I noticed, after installing ATM (and DistantObjects, but I don't believe that one is the cause), that my option to see the the green, bright edge highlight around parts is gone. When I try to reactivate it, it tells me my Hardware is incompatible.

Excerpt from the log:

"[Warning]: HighlightingSystem : Edge Highlighting requires AA to work!"

cdcb8c4af8.png

2897966461.png

Also, by watching this SS, I noticed my AntiAliasing went from x2 to off.

Toolbar 1.7.7

ATM 4-3

AdvancedAnimator 1.1.1

Environmental Visual Enhancements 7-4

CrowdSourced Science 1.2.0

Distant Object 1.5.0

Space Shuttle Engines 2.1.3

MechJeb 2.4.1 devbuild #366

PlanetShine 0.2.2.1

ProceduralFairings 3.11

Protractor 2.4.15

RealChute 1.2.6.1

SCANsat 8.1

StationScience 1.4

Stock Bug Fix Modules 0.1.5c

I've ommited a few unnecessary, really small, part-only mods.

Here's the log.

According to what I understand from it, it seems to be running on DirectX, not OpenGL. Even though, I can't turn that feature back on.

Thank you for the support! :)

-Edit-

D'oh. I didn't know that "AA" meant "Anti-Aliasing". :blush:

One of my Kerbals must've stumbled on that option and turned it off, resulting in no Edge Highlighting!

Turned AA back on, the feature is now available and active! :)

Edited by Kowgan
Self Fix

Share this post


Link to post
Share on other sites
@MGCJerry : Have you tried without openGL ? I found that the new ATM versions are kind of making it less mandatory. My GPU doesn't like openGL (don't, I've cheked everything, it's an enduro build :( ), so I had to deal with that. And anyway, what are you doing with squad's folder !!! You should just leave it as it is from the start. Or at least try a clean install instead of reporting a bug your likely the author...

I don't run OpenGL. OpenGL runs worse than a slideshow. Moving Sqaud's folder around was trying to see what it would do. I had more progress with KSP at least using CPU and doing stuff without the SPP & NASA parts (let it sit nearly an hour while it was eating CPU cycles while KSP was not in window focus). Clean install crashes with the heap sections error as well, it was the 2nd thing I tried after the first crash. I try a lot of standard & weird stuff before posting any "support post" and a lot of my weird things not even mentioned (I have found strange solutions for other applications in the past trying weird things). Stock install exhibits this problem as well (first thing I tried after getting the first heap error and crash). Seems I'm not the only "author" to this problem because other people see this error too.

Maybe my next course of action will be trying to triple boot again, and see if I can get ATM to work under some *nix distro.

Share this post


Link to post
Share on other sites

I recently started using Linux 64bit KSP, which by the way is very stable, and has been great.

I use loads of mods, and I now have a save with a huge amount of active parts. I started to notice a slow down at scene changes, so I checked System Monitor to find out what memory the game was using, and was very surprised to see it reporting that KSP_x64.exe was using slightly over 9.5GB (this was after about 3-4 hours of playing, it runs at about 6GB on the startup screen straight after loading).

My understanding was that 64bit could handle twice the memory of the 32bit builds, so a limit of somewhere around 7GB. I'm interested if anyone can suggest how it is possible for KSP to use so much more than this. Also, I'm new to Linux and to Kubuntu, so not sure how much I trust the data on System Monitor.

When I switched to Linux I initially thought I would not need to return to ATM, since I suddenly had so much more available memory than I had with 32bit. But I guess RAM is like your cupboards at home; you eventually fill them no matter how much space you have to start with.

To be clear, I have not experienced any crashes. The only loss in performance has been the slow down at scene change, which I'm not convinced is related to RAM anyway (wouldn't this be a CPU thing? Although I do have a fast processor). But I still have mods I want to add, including Astronomer's Visual Pack, which looks RAM heavy. So should I just keep adding them, and see how high I can go until I experience a crash? Or should I run the non-aggressive ATM now, slashing my memory usage and freeing up plenty more space?

Any advice would be welcome.

Share this post


Link to post
Share on other sites

64bit bit is not twice the memory limit of 32bit.

32bit limit is 4 GB.

64bit limit for linux on intel x64 is 128 TB

You will meet the limit of your motherboard memory limit way before you hit the Linux one.

ATM is still a good idea however since it will speed up your loading time (after the first one that will take forever with such large mod usage)

Edited by sarbian

Share this post


Link to post
Share on other sites

Thanks Sarbian.

128TB?! That's a lot of mods...

I will take the plunge and install the non-aggressive ATM. I know it will take ages the first time, but it's worth it.

One question though; should I add all the extra mods I want first (including AVP etc) and then install ATM so it can work its magic on them? or should I add ATM first, then add the remaining mods I want afterwards?

Share this post


Link to post
Share on other sites

@Oafman: It's entirely up to you if you want to add mods few by bew and load the game several times, or add all your mods previously, and then add ATM, and launch one single long loading screen. I personally added all the mods first, then added ATM for one single fix.

Share this post


Link to post
Share on other sites

To those with the HEAP error:

A couple questions:

I noticed a pattern that those with the error have 32 bit machines running windows... is that correct? There may be something we can do, but it will probably mean disabling the multithreaded option.

Please add your windows version, processor core count, and ram size.

Edited by rbray89

Share this post


Link to post
Share on other sites
To those with the HEAP error:

A couple questions:

I noticed a pattern that those with the error have 32 bit machines running windows... is that correct? There may be something we can do, but it will probably mean disabling the multithreaded option.

yes 32bit windows with multi core, and have not found out how I start ksp with one core, I know how to get it to run on 1 core once it runs but thats not helping with crashes on start

Share this post


Link to post
Share on other sites
To those with the HEAP error:

A couple questions:

I noticed a pattern that those with the error have 32 bit machines running windows... is that correct? There may be something we can do, but it will probably mean disabling the multithreaded option.

Please add your windows version, processor core count, and ram size.

Windows XP 32 SP3

AMD FX-3210 - 8 cores

4GB RAM

During my fiddling around, I had set the CPU affinity to one core (core 7), and it still throws heap errors. I just tried it again using stock and it still gives the error.

There was an old tool I found online to get applications to run on one core, but it modifies the exe file (imagecfg.exe). Back in the day, Maya5 PLE didn't run on multi-core systems so you had to lock it one to core.

Share this post


Link to post
Share on other sites

@MGCJerry - Before you start KSP, how much memory does windows say it is consuming, and how much does it show as free? Also, what size is your page file set for?

Share this post


Link to post
Share on other sites

For some, as of 0.90 I get extraordinarily long loading times with this mod. It has never been a problem before though. I am only use EVE and Astromoners Visuals atm.

Share this post


Link to post
Share on other sites
For some, as of 0.90 I get extraordinarily long loading times with this mod. It has never been a problem before though. I am only use EVE and Astromoners Visuals atm.

The long loading times should only occur once (or after you add a big mod).

Share this post


Link to post
Share on other sites
The long loading times should only occur once (or after you add a big mod).

Alright, so I'm getting a white and red background and white and red Kerbin. It must be added, that the only mods in there so far, is EVE, Astronomers, TextureReplacer, and ATM.

Share this post


Link to post
Share on other sites
Windows XP 32 SP3

AMD FX-3210 - 8 cores

4GB RAM

During my fiddling around, I had set the CPU affinity to one core (core 7), and it still throws heap errors. I just tried it again using stock and it still gives the error.

There was an old tool I found online to get applications to run on one core, but it modifies the exe file (imagecfg.exe). Back in the day, Maya5 PLE didn't run on multi-core systems so you had to lock it one to core.

Right now, my assumption for the errors is that KSP (mono) doesn't like me allocating thread objects that are processed, and we will likely have to scale back on them, either eliminating them entirely or only creating them as jobs are freed.

- - - Updated - - -

Alright, so I'm getting a white and red background and white and red Kerbin. It must be added, that the only mods in there so far, is EVE, Astronomers, TextureReplacer, and ATM.

Did you restart KSP after the long initial load?

Share this post


Link to post
Share on other sites
I seem to have a really bad crash whenever I try to load any kind of Active Texture Managment to 0.90. Error folder download is below. Can you please check it out? I can barely run KSP on the worst graphics without ATM. The Error Folder:

https://mega.co.nz/#!ScsXxLzB!pIsuEXs3hlKp1I_a-cWsu5cq0i6ywJStNeFwldnczu0

*AHEM*

So please collect the log, gather the info I mentioned (windows/mac/linux version and architecture (32 or 64 bit), ammount of Ram, CPU count, etc.) and create a post in the ATM thread :)

I still need this information. The log indicates you may not have enough RAM to use the caching mechanism. You may have to kill all other things when running KSP (browsers, power point, word, etc.)

Share this post


Link to post
Share on other sites

Did you restart KSP after the long initial load?

Yes, I get the same. Is there somewhere where I can delete the cache data?

Share this post


Link to post
Share on other sites
Yes, I get the same. Is there somewhere where I can delete the cache data?

That won't likely help. This (as I recall) is one of the symptoms when you are at the memory cap. Are you using Aggressive or Basic?

Share this post


Link to post
Share on other sites
That won't likely help. This (as I recall) is one of the symptoms when you are at the memory cap. Are you using Aggressive or Basic?

I'm using Basic, but i only use about 2.3 GB ram, so it shouldn't be a problem. But I thinking deleting the cache could help, as I have since tried to make exceptions to TextureReplacer and EVE. Could you also please tell me exactly how to this, so I'm sure I'm doing it right.

Share this post


Link to post
Share on other sites

For heap errors in Windows, especially early editions of NT, there is a way to increase the size, which was reduced for performance reasons during the transition from NT 3.1 to 3.5

To correct this problem, increase the size of the desktop heap:

Run Registry Editor (Regedt32.exe).

From the

HKEY_LOCAL_MACHINE

subtree, go to the following key:

\System\CurrentControlSet\Control\Session Manager\SubSystems

Select the Windows value.

From the Edit menu, choose String.

Increase the SharedSection parameter.

For Windows 2000, Windows XP, and Windows Server 2003:

SharedSection uses the following format to specify the system and desktop heaps:

SharedSection=xxxx,yyyy,zzzz

For 32-bit operating systems, increase the yyyy value to "12288";

Increase the zzzz value to "1024".

For 64-bit operating systems, increase the yyyy value to "20480";

Increase the zzzz value to "1024".

Needless to say, backup your registry before you make this change.

Edited by Rebelgamer

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.