Jump to content

Memory Crashes and trying to prevent them - tips and tricks


Minwaabi

Recommended Posts

I wanted to make a thread to help other people deal with the memory crashes that frequently come up when running "too many mods", and now that I finally have my game running fairly well, I can start posting what I've found. I know some folks are very experienced with this, but I'm sure we have some new players with the release of 1.0 who don't know how to get KSP to run with lots of mods without crashing. Personally, I can still use some help in this. It used to be that I could just use ATM and everything worked fine, so I'm not terribly experienced, but we need to start somewhere.

So, I've got about 1 GB of stuff in my GameData folder and about 60 mods. When I run the game normally I have about 3.1 +/- .1 GB of RAM used and I get crashes just about any time I try to change the scene. This makes the game virtually unplayable. For those of you who are new to the party, that's because KSP is a 32 bit application for windows and it won't use more than about 3.5 GB of RAM. Use more than that, and bam crash to desktop.

When I tried ATM Active Texture Management, basically nothing happened. I still use about 3.1 +/- .1 GB of RAM, but I can at least do stuff because I can switch scenes and launch rockets and well ... do stuff. This is at least an improvement, but I did notice it messed up the textures for some mods (Infernal Robotics model rework and expansion). So I removed ATM.

Next, I tried -force-opengl. Instructions on how to do this is below. After putting in the commands correctly, I am now getting about 2.1 +/- .1 GB of RAM, but no more shadows. The graphics also seem to be decidedly worse, but not by much and all the textures work fine. I launched a rocket and noticed that the memory usage increased about 100 MB but stayed pretty consistent around 2.2 GB. The game seems stable and playable and this option actually improves my FPS too (but others have had the opposite results).

I have also tried - force-d3d11. After putting in the commands correctly, I am getting about 2.2 +/- .1 GB of RAM, with no negative drawbacks I can see. I launched a rocket and noticed that the memory usage increased about 100 MB but stayed pretty consistent around 2.3 GB. The game seems rather stable and quite playable even with a bunch of mods.

Additionally, I have tried using the stock renderer settings (no special instructions), but changed the settings to halve my texture resolution. I *think* I was getting about 2.6 +/- .2 GB or RAM usage. This was also a little bit faster than the opengl setting. I'm not 100% sure if I actually halved my texture resolution or quartered it. When I tried to test out my d3d11 again to check FPS, I was getting about 1.3 GB or RAM. I think I picked up a bug that forced my texture resolution to the minimum and told me it was different than it was. (This has happened to other people). So *maybe* d3d11 + lowest texture settings = 1.3 GB for my install.

Okay, so I figured out what the problem was with opengl and d3d11. If you are using steam, you have to set it up differently than if you are not running steam. I found this over here:

If you use Steam, simply right-click Kerbal Space Program in your Library, click "Set launch options..." and put in "-force-opengl". You have to start the game out of steam (or the start menu) for this to work, if you start the KSP.exe manually it will ignore your Steam launch options!

Otherwise, or if you don't want to start through Steam, open your Kerbal Space Program folder, right-click KSP.exe, select "Create shortcut", and put "-force-opengl" in the "Target" field after the quotation marks, with a blank in between. You can now put that shortcut where you need it, e.g. onto your desktop.

Alternatively, if you want to start KSP through the start menu, right-click on Kerbal Space Program in there, and put the "-force-opengl" at the end of the "target"-field, again with a blank in between. (This does not work if you have the Steam version, as the start menu link then links to Steam)

Using the appropriate instructions (the ones for steam users), I was able to get -force-opengl to work. I now have about 2 +/- .1 GB of RAM usage. I have to go to work soon so I don't have time for further testing, but this looks very promising.

More helpful hints are below and I'll try some of those later and report back on how big an improvement they actually make. If you have some tips. Please post!

Edited by Minwaabi
Link to comment
Share on other sites

"about 60 mods"

It sounds like you've tried some good things to minimize ram load, such as ATM, but, the camel can only carry so many straws before its back is broken. Would you call all 60 of those mods "essential?" You could make a copy of your complete KSP installation in a separate folder, to explore a subset of those mods, and run different scenarios on different copies.

Link to comment
Share on other sites

One thing I've found is that for many mods I'll only use a few of the parts and I can significantly reduce the initial RAM used by deleting unused parts. For others there are a few (sometimes large) parts that I never use and can delete - deleting just a few parts from 10 or 20 mods can make a big difference.

Link to comment
Share on other sites

I'm going to commence more testing shortly, but I thought a good question to ask is: what is a good goal to set for memory usage? Obviously, as low as possible, but I'm talking about the best combinations of features (mods/resolution/etc) and stability. So in other words: How much RAM usage is considered a stable KSP game? 2MB? 2.5GB?

Also, does anyone know of any drawbacks to using -force-opengl or -force-d3d11?

Edited by Minwaabi
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...