Jump to content

Allocate more RAM (64 bit)


Recommended Posts

So I have noticed that KSP, even running 64 bit, still refuse to use more RAM then 4 GB. Considering that this celling seems to determine how often "garbage collection" happens, I'd love to fully utilize my 32 GB's of RAM, hopefully making garbage collection stutter happen vastly less often.

Link to comment
Share on other sites

Hey, open your game in opengl or dx11 mode. 

Manuals how to do that can be find here:

 

And here:

 

For the garbage collection stutter, thats a well known bug from unity.. There's also a mod for it that reduces it a bit. At least the stutter.

 

Hope this helped you a bit. :)

~DrLicor

Link to comment
Share on other sites

dx11 causes very bad texture problems, and opengl has been unstable on my machine in the passed. In any event it doesn't really answer question :)

Also the garbage mod, actually makes things WORSE for me. It makes the stutter happen a lot more often, and more lengthy.

Edited by Sokar408
Link to comment
Share on other sites

2 hours ago, Sokar408 said:

dx11 causes very bad texture problems, and opengl has been unstable on my machine in the passed. In any event it doesn't really answer question :)

Also the garbage mod, actually makes things WORSE for me. It makes the stutter happen a lot more often, and more lengthy.

Then you have problems unrelated. Most people running the dx11 mode have minimal issues. If neither of the optional modes are acceptable then you are limited, pare down the mods you use and play with ~4G limit.  I play with 8-9G tied up by KSP with good results on a 4 year old computer. Try OpenGL if dx11 is to bad.  Otherwise pare back mods. Delete the things you don't use.

If you are using eye candy mods and or alternate world sizes they can be the problem. If they are incorrectly configured weird visuals can happen.

You may want to describe what "very bad texture problems' actually looks like.  Is it pink blotchy sections, weird vertices, missing terrain panels?

Memgraph increases the heap allocation so it is obviously not going to help if dx11/openGL are not options.  If you get past that point make sure you learn how to use MemGraph and figure out how much Heap you actually need.

Edited by Bornholio
Link to comment
Share on other sites

4 minutes ago, Bornholio said:

Then you have problems unrelated. Most people running the dx11 mode have minimal issues. If neither of the optional modes are acceptable then you are limited, pare down the mods you use and play with ~4G limit.  I play with 8-9G tied up by KSP with good results on a 4 year old computer. Try OpenGL if dx11 is to bad.  Otherwise pare back mods. Delete the things you don't use.

If you are using eye candy mods and or alternate world sizes they can be the problem. If they are incorrectly configured weird visuals can happen.

You may want to describe what "very bad texture problems' actually looks like.  Is it pink blotchy sections, weird vertices, missing terrain panels?

Memgraph increases the heap allocation so it is obviously not going to help if dx11/openGL are not options.  If you get past that point make sure you learn how to use MemGraph and figure out how much Heap you actually need.

I was kind of under the impression that dx11 was the default mode. Given the potential benefit, should I just update my shortcut and start using dx11 mode? Is there a catch? It sounds too good to be true :)

Link to comment
Share on other sites

Just now, canisin said:

I was kind of under the impression that dx11 was the default mode. Given the potential benefit, should I just update my shortcut and start using dx11 mode? Is there a catch? It sounds too good to be true :)

It is not default.  I would definitely try it. Alternate to OpenGL if you have significant problems.  Most of the older issues are resolved.  Your memory usage will drop about a 1G.

Command line argument in CKAN would look like  [ KSP_x64.exe -single-instance -force-d3d11 ]

A shortcut target would look like [ "G:\SteamLibrary\steamapps\common\KSP\KSP_x64.exe" -single-instance -force-d3d11]

Link to comment
Share on other sites

1 hour ago, Bornholio said:

Then you have problems unrelated. Most people running the dx11 mode have minimal issues. If neither of the optional modes are acceptable then you are limited, pare down the mods you use and play with ~4G limit.  I play with 8-9G tied up by KSP with good results on a 4 year old computer. Try OpenGL if dx11 is to bad.  Otherwise pare back mods. Delete the things you don't use.

If you are using eye candy mods and or alternate world sizes they can be the problem. If they are incorrectly configured weird visuals can happen.

You may want to describe what "very bad texture problems' actually looks like.  Is it pink blotchy sections, weird vertices, missing terrain panels?

Memgraph increases the heap allocation so it is obviously not going to help if dx11/openGL are not options.  If you get past that point make sure you learn how to use MemGraph and figure out how much Heap you actually need.

Ground textures turn flickery. But honestly I didn't understand what your answer had to do with my question. Are you saying that an AddOn can force cap the RAM usage? Also MemGraph doesn't help it hurts like I said, so what are you on about? :o

Link to comment
Share on other sites

Of course it hurts in your case. It increases memory usage, specifically the heap allocation space used by unity, in order to reduce garbage collection stutter frequency.

Once again, you ask how to force KSP allocate more memory. Answer, use either DX11 or OpenGL modes. 

If neither of those are options then Unity does not have a simple way for you to do so.  https://docs.unity3d.com/Manual/CommandLineArguments.html

The unity community has a large amount of DX11 troubleshooting information.  Reasons can vary widely, usually a secondary process that causes flicker or pink masking.  Solutions can vary widely also. Update video drivers is a common one. Seen a common cause among strangely sound control programs causing flickering ( things like Asus Sound Studio or MSI Sound drivers).

Is the ground texture in flight mode flickering, or when in Space Center?

Edited by Bornholio
Link to comment
Share on other sites

1 hour ago, Bornholio said:

It is not default.  I would definitely try it. Alternate to OpenGL if you have significant problems.  Most of the older issues are resolved.  Your memory usage will drop about a 1G.

Command line argument in CKAN would look like  [ KSP_x64.exe -single-instance -force-d3d11 ]

A shortcut target would look like [ "G:\SteamLibrary\steamapps\common\KSP\KSP_x64.exe" -single-instance -force-d3d11]

If you are saying that using dx11 will both decrease RAM usage and increase its limit then it really sounds great. I can't wait to go home and try it! :D

Do you know why it isn't default? Am I expected to experience issues with it? Is dx9 somehow more stable or something?

Link to comment
Share on other sites

Some people using unity 4&5 in DX11 mode have graphical glitches.  Worse in 4.  Think that 1.2+ is using Unity 5.  If DX11 does cause problems some people swear by OpenGL. 

Ive had enough mods to run out of memory with 12G using DX11. It was over 150 mods so totally my fault.  More things in space with higher part counts also increases memory usage, specifically heap.

If you have stutters every few seconds (stops responding for a fraction of second or more) look up the memgraph mod link above.

Link to comment
Share on other sites

11 hours ago, Sokar408 said:

So I have noticed that KSP, even running 64 bit, still refuse to use more RAM then 4 GB. Considering that this celling seems to determine how often "garbage collection" happens, I'd love to fully utilize my 32 GB's of RAM, hopefully making garbage collection stutter happen vastly less often.

~Or you could ignore my block of text and just post the log. I'm face palming right now, because it will tell you whether or not it's running in 64-bit in the very first line...

What does it do when it hits the 4gb ceiling? I hate to ask, but it's a standard question and something to make absolutely certain of - Are you absolutely certain steam/whatever you use is launching KSP in 64-bit? And I mean ABSOLUTELY, 100% no doubt what so ever, bet your first born on it? Because, as an example, I just spent 6 hours trying to troubleshoot why my supposed usb 3.0 flash drive was telling the computer it was 2.0... I was absolutely certain it was 3.0. It wasn't. I grabbed the one beside the 3.0 at the store by mistake... Stupid simple screw ups like that can waste a whoooole lot of time. Just double check by opening task manager when its running and seeing if it says KSP_x64. I just have a shortcut directly to ksp_64.exe on my taskbar, no need to start steam, absolute certainty of 64-bit. If that isn't the problem, post the logs, maybe it'll shed some light.

I do hate to ask people to do simple stuff like this, because chances are they have double checked and are sure, and I'm sure you are running 64-bit, it would just suck to do a lot of troubleshooting just to find out the game really was running in 32-bit. Really don't mean to sound insulting when I ask you to do that, it's just something that must be asked.

Edited by TheUnamusedFox
Link to comment
Share on other sites

6 hours ago, TheUnamusedFox said:

~Or you could ignore my block of text and just post the log. I'm face palming right now, because it will tell you whether or not it's running in 64-bit in the very first line...

What does it do when it hits the 4gb ceiling? I hate to ask, but it's a standard question and something to make absolutely certain of - Are you absolutely certain steam/whatever you use is launching KSP in 64-bit? And I mean ABSOLUTELY, 100% no doubt what so ever, bet your first born on it? Because, as an example, I just spent 6 hours trying to troubleshoot why my supposed usb 3.0 flash drive was telling the computer it was 2.0... I was absolutely certain it was 3.0. It wasn't. I grabbed the one beside the 3.0 at the store by mistake... Stupid simple screw ups like that can waste a whoooole lot of time. Just double check by opening task manager when its running and seeing if it says KSP_x64. I just have a shortcut directly to ksp_64.exe on my taskbar, no need to start steam, absolute certainty of 64-bit. If that isn't the problem, post the logs, maybe it'll shed some light.

I do hate to ask people to do simple stuff like this, because chances are they have double checked and are sure, and I'm sure you are running 64-bit, it would just suck to do a lot of troubleshooting just to find out the game really was running in 32-bit. Really don't mean to sound insulting when I ask you to do that, it's just something that must be asked.

Yes it is running in 64 bit. Line from Output.log: [KSP Version]: 1.2.2.1622 (WindowsPlayer x64) (x64)

Link to comment
Share on other sites

12 hours ago, Bornholio said:

Some people using unity 4&5 in DX11 mode have graphical glitches.  Worse in 4.  Think that 1.2+ is using Unity 5.  If DX11 does cause problems some people swear by OpenGL. 

Ive had enough mods to run out of memory with 12G using DX11. It was over 150 mods so totally my fault.  More things in space with higher part counts also increases memory usage, specifically heap.

If you have stutters every few seconds (stops responding for a fraction of second or more) look up the memgraph mod link above.

When I turned on dx11, and loaded into the KSC scene, there was a very pronounced texture glitch where all the green grass around KSC had parallel stripes. After seeing this I assumed that there would be more in various other scenes, so I restarted the game and went back to the default settings. It didn't work out for me, but thanks a lot for the information. :)

Link to comment
Share on other sites

22 hours ago, Sokar408 said:

So I have noticed that KSP, even running 64 bit, still refuse to use more RAM then 4 GB. Considering that this celling seems to determine how often "garbage collection" happens, I'd love to fully utilize my 32 GB's of RAM, hopefully making garbage collection stutter happen vastly less often.

So you want the game to fill up all of your RAM with garbage and then spontaneously stopping for a minute to collect 28GB of garbage at once?

Link to comment
Share on other sites

3 hours ago, canisin said:

When I turned on dx11, and loaded into the KSC scene, there was a very pronounced texture glitch where all the green grass around KSC had parallel stripes. After seeing this I assumed that there would be more in various other scenes, so I restarted the game and went back to the default settings. It didn't work out for me, but thanks a lot for the information. :)

That is exactly what my problem as well.

1 hour ago, Harry Rhodan said:

So you want the game to fill up all of your RAM with garbage and then spontaneously stopping for a minute to collect 28GB of garbage at once?

Basically yea.

Link to comment
Share on other sites

7 hours ago, canisin said:

When I turned on dx11, and loaded into the KSC scene, there was a very pronounced texture glitch where all the green grass around KSC had parallel stripes. After seeing this I assumed that there would be more in various other scenes, so I restarted the game and went back to the default settings. It didn't work out for me, but thanks a lot for the information. :)

I've seen that before but only with GPP. What worlds/scale are you running?

Edited by Bornholio
Link to comment
Share on other sites

4 hours ago, Sokar408 said:

Basically yea.

I have 32gb of RAM as well and running close to 100 mods. If I don't use Memgraph to pad the heap, I get stutters every 6 or 7 seconds...pretty much unplayable for me. What I've found helps the most is changing the config file of Memgraph to automatically pad the heap for me at launch. I've experimented with different amounts. I find I get the best results with a pad heap of 8,192. Total memory usage is between 14 and 16 GB. The in-game effect is about 2-3 second stutter for garbage collection every 4-5 minutes. It's the best I can hope for with my heavily modded install and I've gotten used to it.

Edited by leatherneck6017
Link to comment
Share on other sites

11 minutes ago, leatherneck6017 said:

I have 32gb of RAM as well and running close to 100 mods. If I don't use Memgraph to pad the heap, I get stutters every 6 or 7 seconds...pretty much unplayable for me. What I've found helps the most is changing the config file of Memgraph to automatically pad the heap for me at launch. I've experimented with different amounts. I find I get the best results with a pad heap of 8,192. Total memory usage is between 14 and 16 GB. The in-game effect is about 2-3 second stutter for garbage collection every 4-5 minutes. It's the best I can hope for with my heavily modded install and I've gotten used to it.

Yes that is pretty much the intended use of Memgraph's functions outside just analysis.  You start using it, test by gradually increasing heap with Alt-End, then at an acceptable level check the total. Turn the interface on/off with Alt-num* record the heap total. Then edit the Padheap.cfg file last line to that value.  I found 4G was a good place for me. Stutter was still pronounced but several minutes separated. 

Now i don't depend on it but remove unneeded craft from flight. Each craft and each part adds weight to the pad heap even when not loaded.  Heap usage also increases over time. If you restart more often you can use less.

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...