Jump to content

Ridiculous RAM usage - Tried All Standard Solutions


Recommended Posts

I haven't really played KSP since 0.25 and a little with 0.90. back then I played RSS with a big bunch of mods. My gameData folder was around 1.6GB big and I could play for several hours without running out of memory. This while running half-res texture setting, converted .dds textures, and the -force-opengl command.

Since upgrading to 1.0.4 recently I installed Kopernicus and a couple of part mods, removed all unwanted parts and my GameData folder is 980mb big. I figured this is low enough and launched the game with the following memory usage:

Menu -2GB

Space Centre - 2.9GB

Couple Launches later - 3.4GB => crash

So I launched KSP with the -force-opengl command.

Menu - 2GB

Space Centre - 2.8GB

Couple launches later - 3.4GB => crash

*NOTE: No real noticeable difference. When I say a "couple launches later" I mean between 4 and 10 launches of early Career game launches. Ships with between 6 and 30 parts. No further than Minmus.

So I set texture resolution down to a quarter and converted any remaining files to .dds.

Menu - 2GB

Space Centre - 2.8GB

Couple launches later - 3.4GB => crash

No difference. tried updating OpenGL and drivers. No difference. Tried DirectX 11:

Menu - 2GB

Space Centre - 3.1GB

Couple launches later - 3.4GB => crash

Pruned a bucnh of extra parts, saved around 200mb on gameData size.

Menu - 1.9GB

Space Centre - 2.6GB

Couple launches later - 3.4GB => crash

The game picks up more than 50mb of garbage for every launch I do. Even if I don't make orbit. I've tried removing plugins, parts and so on. Nothing works or helps. I'm installing and testing Active Texture manager with aggressive now to see if that could still help. Somehow I doubt it will.

My system specs:

OS - Windows 7 ultimate 64-bit (recently formatted and reinstalled)

GPU - GeForce GTX750Ti 2048mb VRAM (358.50 drivers, latest as of yesterday, happened before and after installation)

RAM - 4GB (not hitting the max RAM usage, and as I said, I have played this game with a LOT more mods, LOT less RAM usage with 4GB before).

CPU - Intel i5-760 (4 cores @ 3.56gHz)

EDIT: Tried ATM Aggressive, somehow it actually increased my RAM usage by 100mb.

I remember and have read that forcing OpenGL causes anti-aliasing to stop working. Howegver, I can still turn on AA even after forcing it. Is tehre a chance OpenGL is not being used? How can I check for that?

Edited by ANWRocketMan
Link to comment
Share on other sites

SO, re-reading through your post, it sounds similar to what i've been experiencing in all versions from 0.25 on.

1st, my computer specs are sort of close, but below yours. I'm also on a laptop, tho...

OS: tri-boot: Win 7 64bit; Win 8.1 64bit; Lubuntu 64bit

GPU: GeForce GT630M

RAM: 6GB

CPU: i5-2450M CPU @ 2.50GHz (4)

I usually have KSP set to use OpenGL...

I was always also crashing once I got close to 3.4-3.5GB RAM usage...You have to also remember, that with only 4GB of RAM, total, installed in your system, Win7 itself is gonna use 750MB-1GB...A lot depends on what your anti-virus/firewall, and any other background processes that startup and run automatically suck up...You can use TaskManager to watch RAM usage...

Since I was using Win 8.1 as my main OS, I streamlined my Win7 OS for playing KSP ONLY...IIRC, I was able to get it down to 525MB-700MB RAM usage at idle...That helped ALOT...I also did just about everything you've tried: pruning parts, cutting down the graphics settings, using ATM, converting everything I could to .dds, etc...But, I could STILL not get KSP RAM usage above 3.7-3.8GB before it crashed or would not even load, and my mod bug still wasnt satisfied, so I installed Lubuntu for playing KSP now... Now the OS only sux 230MB-310MB RAM at idle, PLUS I dont have the 4GB Windows limitation now, so far I can run KSP at close to 5GB by itself... :D

You could try using the Exception Detector and GC Monitor mods to maybe see what might be throwing exceptions, and maybe leading to the memory leakage?

Exc. Det.:

http://forum.kerbalspaceprogram.com/threads/109463

GC Mon.:

http://forum.kerbalspaceprogram.com/threads/92907

Anyway, back to your Win7/4GB limits... If you are using ATM (only needed for older mods that havent been updated to .dds), and OpenGL, and have converted everything you can to .dds, IMHO, I think you're pushing KSP about as far as you're gonna get....

If you want to get extreme, you could install a 2nd dual-boot Win7 partition, and streamline the heck out of it (the main effort would be toward ZERO internet connectability: basically running with NO anti-virus/firewall, and turning off most of the OS networking processes. These 3 things can suck up 500MB-800MB or more of RAM, alone)...

OR you could do what a few people have done, and switch to using Linux to play KSP... :D Tho, supposedly KSP 64bit may be working again, come KSP v1.0.6 or 1.1, and you could just wait till then...

Edited by Stone Blue
Link to comment
Share on other sites

My problem isn't crashing at 3.4GB. That's always been the case. But before 1.0.4 I could run the game with 1.6GB GameData folder. The game would max out during gameplay at more or less 3GB. It would take several hours to reach the 3.4GB limit.

Currently my windows 7 runs at 696mb idle. I'm going to try and replace my RAM with 8GB soon and potentially attempting a dual-booted Linux install. Not sure if that's gonna work though since once of my friends recently tried that and failed miserably(it was a brand laptop though and it basically locked him out of dual booting).

Guess until KSP on windows gets a proper 64-bit, i get more RAM or am able to dual-boot Linux I'm stuck with 4 launches per session.

Link to comment
Share on other sites

Hmmm...So am I correct in understanding your issue is why you are now crashing with a smaller sized Gamedata folder, then your peviously sized 1.6GB folder?

I'm no expert, but IIRC, Gamedata folder size is not directly related to RAM usage...Other than, generally, a larger GD folder (more stuff), DOES end up using more RAM...Maybe your current 900+MB GD folder just ends up using more RAM due to which mods you're using?...

As to a linux dual-boot, you can try running linux off a USB drive WITHOUT actually installing it, and messing up your boot loader...I was doing that for awhile, before just going ahead and installing Lubuntu...Had no major issues with running KSP and Linux off the flash drive, nor later, during the tri-boot install, on top of an already dual-boot Win7/Win 8.1 system.

My laptop is a mediocre Acer V3...

If you DO try Linux, your first most likely hurdle will be getting your graphics drivers up & running...but again, I had hardly any issue getting proprietary Nvidia drivers to work...

Edited by Stone Blue
Link to comment
Share on other sites

I think the RAM is your limitation.

Windows programs fragments the memory as it's used and released. That's one reason why I maxed out my memory to 32 GB.

I don't see any speed improvements on anything, but I don't crash any more using dual monitor and a couple dozen windows opened.

Link to comment
Share on other sites

Again, no expert, but i believe Linux (at least Ubuntu-flavors), will default to Nouveau drivers with Nvidia GPUs...Not optimal...Then I just used the Software & Updates to try a couple of the proprietary builds...IIRC, the most recent driver (v346?), didnt work at first, but I tried the version below that (v340?), and everything worked fine...From what I gathered, at least with Ubuntu-flavor, do NOT use the install packages directly from the Nvidia site.

Edited by Stone Blue
Link to comment
Share on other sites

Thanks for the help guys. Will report back if I'm still having issues.

EDIT: Currently typing from Linux. No issues with KSP so far but had a lot of problems with getting Ubuntu to work. Graphics card wasn't supported with the default drivers. Couldn't download and install new ones. had to use the terminal to add a new repository and install a new GRUB menu and then proper Nvidia drivers. Now it's golden. Hopefully I can get more RAM soon. Might try dual-booting Linux sometime over December when I have time.

Edited by ANWRocketMan
Link to comment
Share on other sites

Extensive testing later: I go to bed with a sore heart. I can't load my modded KSP without my system stalling out of memory. Same install as I used on windows and the game is at 3.4GB RAM usage before it even reaches the Main menu. On windows this was closer to 2GB. No idea how to proceed now. obvious solution is buy more RAM but I'm left wondering why/how the game uses an extra 1.4GB of memory on Linux?

On a side note: what distro would you guys suggest? Currently running ubuntu 14.04 but that uses 900mb+ RAM out of the box. Preferably one a Linux noob like me could install.

Link to comment
Share on other sites

Hmmm... Sorry to hear you're having issues... When I spent hours first figuring out my Linux/KSP install, I also ran into hiccups with not knowing Linux itself, as well as the video drivers... Just had enough, left it for a day, came back with a fresh mind, and things worked out after a little more reserch... Hopefully will be the same with you...

As to distro, I tried Kubuntu first, but the install didnt go well, so I went to my 2nd choice: Lubuntu 15.04... Supposedly the interface isnt very pretty for some people, but pretty damn similar enough to Windows for me... :)

Lubuntu takes about 30 secs to boot, where as my Win 8.1 takes about 2, 2 1/2 mins, before its usable... My Lubuntu install sits at about 237MB RAM usage at idle... :)

Right now, I have KSP running in the background, and am on Firefox... RAM usage: 5090MB of 5805MB usable: Firefox: 327MB, KSP: 4.4GB, OS: approx 370-400MB...System running smoothly: Priceless... :)

PS- My 3rd distro choice was Mint... Turns out it seems lots of people go with Mint for KSP... I preffered the Lubuntu LXDE over the look of Mint Cinnamon...

Link to comment
Share on other sites

Will check those out. Does KSP use more RAM on Linux by default? Or the x64 version, for that matter. Even with a small install.

What install for Lubuntu are you using? The standard or mini version?

Edited by ANWRocketMan
Link to comment
Share on other sites

Bumping this with my own problems - RAM usage just gets to the point where my game crashes after changing screen a few times (KSC to Tracking station, or VAB to Launch, etc); it eats a little bit more RAM each time. It's gotten to the point where I can't load the game, open the tracking center, and switch crafts a couple of times before it crashes.

KSP takes only 2.6 GB of RAM when loaded, but after I load my career save it jumps to 3.35 GB. Loading a craft and launching jumps to over 3.6GB; the next screen change will lead to 3.7GB and a crash.

Interestingly, if I run a new sandbox game or something of the sort I it takes considerably less RAM and I can play for much longer before it crashes.

ATM didn't help, and OpenGL causes that bug where the camera is zoomed in close right next to the VAB and you can't click any of the buildings (and also doesn't help).

I'm considering going to Linux Mint but would really like to make that a last resort - I don't want to have to run another OS just to play my game, and getting Linux to work is an exercise in frustration.

Any help is appreciated.

CPU Core i7 3770, 3.4 GHz

RAM 16 GB

Video GTX 950

OS Windows 7 Professional 64-bit

Link to comment
Share on other sites

Will check those out. Does KSP use more RAM on Linux by default? Or the x64 version, for that matter. Even with a small install.

What install for Lubuntu are you using? The standard or mini version?

Hmm...not sure if a Linux KSP install uses more or less RAM than the same Windows KSP install... All I know, is I'm a mod addict, and I was pushing Windows for all it was worth...Topping out, like I said, around 3.5GB...Got running on Linux, and right away just kept adding more mods, till I'm currently running around 4.4GB for KSP alone...(Since I had a lot of work into my Windows KSP Gamedata folder with lots of mods, and custom parts & .cfgs & stuff I had edited, once I installed KSP, I just literally copied my Windows Gamedata folder, and pasted it into the Linux KSP install...So i never started with a fresh KSP on Linux)...I'm sure I can add more mods and push it higher, i just havent decided on which large part pack i want to install next... :)

Being a Linux noob, I just went with the full install... It sounds like the mini takes a bit more know how, and is more terminal-oriented...I figure once I learn more about Linux, i can remove any extra stuff in the full install that I dont need, or maybe just do a clean install using the mini...

- - - Updated - - -

Bumping this with my own problems -

Again, I'm no expert, but how many active flights do you have in your save?...How big are your craft, parts-count-wise?... i'm sure there could be a ton of other things to consider and someone else will chime in on...

Also, like I suggested ANWRocketMan, you could always put Linux on a flash drive, and just run from that...It's much less hassle than installing into a dual-boot on your computer...You just install it to the flash drive, then the only thing is to set-up/customize the OS to your liking... Again, no expert, but it seems the 1st, single largest hurdle with Linux is just getting the video drivers going...seems for some, its easy-peasy, and a hassle for others, so your mileage may vary...

On a side-note, for those of us who are Linux noobs, (and maybe sal_vager or a linux guru will chime in on the validity/truth of this), I came across this article a couple days ago:

http://www.howtogeek.com/125157/8-deadly-commands-you-should-never-run-on-linux/?PageSpeed=noscript

Edited by Stone Blue
Link to comment
Share on other sites

how many active flights do you have in your save?...How big are your craft, parts-count-wise?

Almost 50 flights, but most are Remotetech satellites so they don't have many parts, maybe 20 or so.

Maybe debris is taking up a lot of memory? Is there a way I can clear out that?

I'm downloading Linux Mint right now and will try the flash drive thing if I can't get Windows going.

Link to comment
Share on other sites

^^

Not sure if too much debris will cause your issue, but if you can, get to the Tracking Center, de-selct all the vessel-type icons, except for the debris one, then go thru the list and terminate each piece...You can also go into the Settings on the Main Menu, and there is a slider setting, under Game Play, for setting the amount of persistent debris...i have a mediocre computer, so i set mine to max 25...IIRC, you can even set it to zero, so once a stage becomes debris, it COMPLETELY disappears from the game, I believe, as soon as it is out of range and unloads...

Link to comment
Share on other sites

On my new linux build, I'm pushing 6 GB of RAM usage (according to the memory usage mod display). I've got 24 GB of RAM installed, and managed to crash KSP only once in 36 hours on Linux.

Using fewer mods in Windows, I couldn't go 36 minutes without a crash. I was lucky to get 4 scene changes in.

Link to comment
Share on other sites

I ran ubuntu from a flash drive but it used more than 1GB of RAM. Couldn't get Lubuntu to run from flash yet. Some more experimentation is needed.

I did notice, strangely, that when I stay in space long enough(upwards of an hour or so) either the game or Windows removes pretty much all the garbage and the game returns to using 2GB. I was building a small space station today and the game ran for 4hours while I was in space only. Even went to low orbit around the Mun and it stayed low. So Scene changes are the real killer here. majorly. Going from VAB to launchpad makes RAm usage jump by 500mb sometimes.

Hoping to get more RAM soon so i can take full advantage of 64-bit. Would love to return to playing RSS and Realism Overhaul.

Link to comment
Share on other sites

^^

Hmmm...Sounds like it must take the garbage collector quite awhile to go thru and do its job of reclaiming RAM leakage...??? Good to know, Thanx!

On a side-note, i dont know how accurate the in-game, Alt+F12 memory monitor is.... It always shows RAM usage about 2-2.5GB lower than what shows in Task Manager...???

Link to comment
Share on other sites

What do you use to measure the ram usage? Windows Task Manager and the Linux Equivalent to it, or mods like Graphic Memory Monitor that display ram usage ingame?

Currently, with 100 installed mods on a windows machine with 24GB Ram and only a 878MB (yes, MB, not GB) 275GTX Graphic Memory Monitor s2481MB, while Task Manager just shows 1921MB on KSP after a new load (forced openGL, full texture res, manually converted dds whereever possible. So there is a great discrepancy between measurements. Probably both are real, with 2481MB beeing all the ram allocated, but opengl "taking" the praphic data into a separate thread, leaving the 1900Mb of Non-Data Memory. Thats probably the reason for the whole "use openg" "saving". There is a great increase of allocated mem in the "NT Kernel and System"-Thread that is not there on a directx-ksp. I mean - nobody really should have thought that OpenGL "magically" saves Ram ^^.

Link to comment
Share on other sites

Or it forgets about the textures after that's sent to the GPU.

Ahhh!!...Maybe thats it, and why it always seems to be almost exactly 2GB short...I have 2GB VRAM... ??

InsaneDruid, good points....Yeah, i usually just go by what Task Manager says (either Windows or Linux vers.)...It usually seems to show the HIGHEST amount... And we wont even mention VM usage... Right now, (in Linux), I'm showing 4.0GB RSS, and 6.1GB VM...

Edited by Stone Blue
Link to comment
Share on other sites

Got Lubuntu running finally. KSP works perfectly except for the right mouse-click not working in the VAB. It just turns the cursor grey and resets it to the center of the window. Haven't been able to find a fix for it yet. My modded game is unplayable without being able to resize procedural tanks and the like. It might just be the WASD editor camera though.

On a side note, the game uses a LOT more RAM running x64 on Linux with the exact same install as on Windows. In the menu it sits at 2.8GB and Space Centre sits at 3.1GB(compared to 2GB and 2.5GB respectively on Windows). However, it seems a lot more stable and the standard scene change memory leak appears to be mostly gone. It still jumps up when launching or changing scenes but it quickly goes down again. And a much smaller jump every time. That said I'm dangerously close to my system memory limit(91% during sustained gameplay). Upgrading RAM seems to be the only further option to improve my situation. Can do that sometime soon, I hope. On top of the greater stability with Linux it fixed, for the most part, my GC stutter problem. :D

Edited by ANWRocketMan
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...