Jump to content

Just built a PC. Having RAM overflow issues.


Recommended Posts

Just a few days ago I finished a PC build, and I'm now getting constant lag spikes in KSP; at even intervals, the game freezes for around half a second. After doing some investigating (and downloading MemGraph), I have figured out that the cause of the problem is RAM. For whatever reason, KSP won't use above 1.2GB of RAM, even though I have 16GB available:

W4gLav3.jpg

(The big drop in RAM usage is from when I was on the menu screen of the game. When I stay on this craft for long enough the entire graph is green, with no drops.)

Basically what ends up happening is the RAM usage slowly builds up until it reaches the limit. Once the RAM reaches the limit it causes a lag spike, and then drops by around 30MB. The cycle then repeats.

What can I do about this? I do have 16GB of RAM available, and I'm in 64bit Windows 10, so I'm not really sure why this is happening. Is there a way to allocate more RAM? (Windows-side or KSP-side) Thanks!

EDITS:

  1. It turns out my game can use more than 1.2GB of RAM. Sometimes it will set the max to 1.3GB, or even 1.5GB. The lag spike cycle still takes place though, it just takes a little longer.
  2. Just tested an unmodded version of 64 bit KSP (with MemGraph) and the lag spikes still exist. It does take a lot longer though.
  3. The longer I stay in the game, the more RAM gets allocated. After around 1-2 hours of playing I have 5GB, even though when I first boot up the game I have 1GB.
  4. After viewing Task Manager, I've noticed that my GPU usage spikes right after a lag spike. It tends to go up by around 20%, although every once in a while it will go down instead.
Edited by The_8_Bit_Zombie
Link to comment
Share on other sites

1 hour ago, linuxgurugamer said:

It's not complete.  Please describe your system (cpu, memory, video card)

I'm not really sure where to find the complete log sorry. I followed the instructions in this thread and that's the only one I could find under the name output_log.

Here's my system specs:

  • CPU: Core i5-8600k
  • GPU: GTX 1050 2GB
  • 16GB of RAM (2400MHz, Corsair Vengeance LPX)

If it helps at all I have discovered a few more things about the lag spikes. I put them at the bottom of the original post.

Edited by The_8_Bit_Zombie
Link to comment
Share on other sites

6 hours ago, The_8_Bit_Zombie said:

I'm not really sure where to find the complete log sorry. I followed the instructions in this thread and that's the only one I could find under the name output_log.

Here's my system specs:

  • CPU: Core i5-8600k
  • GPU: GTX 1050 2GB
  • 16GB of RAM (2400MHz, Corsair Vengeance LPX)

If it helps at all I have discovered a few more things about the lag spikes. I put them at the bottom of the original post.

That's the right file, but you didn't/can't post the whole thing. 

Copy the file to Dropbox (if you have it), or another file sharing site, and then post a link to the file.

I was able to tell from the file that you are running Windows 10, KSP version 1.4.3, but not much else

Link to comment
Share on other sites

  • 2 weeks later...
On 10/23/2018 at 3:43 AM, linuxgurugamer said:

That's the right file, but you didn't/can't post the whole thing. 

Copy the file to Dropbox (if you have it), or another file sharing site, and then post a link to the file.

I was able to tell from the file that you are running Windows 10, KSP version 1.4.3, but not much else

Sorry for the late reply. Here's the output_log.txt file. I loaded a fairly large base to increase the stuttering, and it seemed to work. (Only 2-3 seconds between the lag spikes)

I also changed my version from 1.4.3 to 1.4.5 and updated a few mods. I know I still have some outdated mods, but seeing as the problem also persists in unmodded KSP I don't believe the mods are the crux of the issue. (The mods do make the time between lag spikes much shorter though.)

Link to comment
Share on other sites

Nothing jumps out at me, but I saw some odd messages like these:

AssemblyLoader: Loading assembly at C:\Program Files (x86)\Kerbal Space Program\1.4.5\GameData\WorldStabilizer\Plugins\._MiniAVC.dll
 
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)

Failed to load assembly C:\Program Files (x86)\Kerbal Space Program\1.4.5\GameData\WorldStabilizer\Plugins\._MiniAVC.dll:
System.BadImageFormatException: Format of the executable (.exe) or library (.dll) is invalid.
  at Mono.Cecil.PE.ImageReader.ReadImage () [0x00000] in <filename unknown>:0 
  at Mono.Cecil.PE.ImageReader.ReadImageFrom (System.IO.Stream stream) [0x00000] in <filename unknown>:0 
  at Mono.Cecil.ModuleDefinition.ReadModule (System.IO.Stream stream, Mono.Cecil.ReaderParameters parameters) [0x00000] in <filename unknown>:0 
  at Mono.Cecil.ModuleDefinition.ReadModule (System.String fileName, Mono.Cecil.ReaderParameters parameters) [0x00000] in <filename unknown>:0 
  at Mono.Cecil.ModuleDefinition.ReadModule (System.String fileName) [0x00000] in <filename unknown>:0 
  at AssemblyLoader.ScanForBadTypeRefs (System.String file) [0x00000] in <filename unknown>:0 
  at AssemblyLoader.LoadExternalAssembly (System.String file) [0x00000] in <filename unknown>:0 

There were a LOT of messages referring to files beginning with a dot, and apparently a zero lenght, I don't know where they come from, but it's odd.  You might want to look at that.

Also, you have multiple versions of ModuleManager installed:

ModuleManager.2.8.0 v2.8.0.0
ModuleManager v3.0.6.0
ModuleManager v3.0.7.

Unnecessary, and may cause problems, delete the older ones.

Also, delete these files:

ModuleManager.ConfigCache
ModuleManager.ConfigSHA
ModuleManager.Physics
ModuleManager.TechTree

sometimes this helps.

More lines like this:

Config in file 'C:\Program Files (x86)\Kerbal Space Program\1.4.5\GameData\KAX\Patches\._KAX_ModuleManager.cfg' contains no data
Config in file 'C:\Program Files (x86)\Kerbal Space Program\1.4.5\GameData\KerbalEngineer\Parts\Engineer7500\._part.cfg' contains no data
Config in file 'C:\Program Files (x86)\Kerbal Space Program\1.4.5\GameData\KerbalEngineer\Parts\EngineerChip\._EngineerChip.cfg' contains no data

Frankly, there are so many errors, I'm not sure how the game is even loading.

I didn't see anything obvious in the actual running of the game, to me it sounds like more memory issues than anything else.

 

Link to comment
Share on other sites

Thank you for all the tips! I followed all of your instructions, and I also tried to fix the "zero length" file problem. (Not sure if I did though) Here's my latest output_log.

20 hours ago, linuxgurugamer said:

I didn't see anything obvious in the actual running of the game, to me it sounds like more memory issues than anything else.

Very good to know thanks. Do you think the memory issues stem from the hardware, the OS, or KSP?

Link to comment
Share on other sites

Not at my computer right now, but wanted to say this:

TheTaskManager does not report all memory, just the memory being used.  To see the total memory used by KSP, use the resource manager (the link is on the bottom of the Taskmanager, 2nd tab)

Have you tried using MemGraph yet?

Link to comment
Share on other sites

6 hours ago, linuxgurugamer said:

TheTaskManager does not report all memory, just the memory being used.  To see the total memory used by KSP, use the resource manager (the link is on the bottom of the Taskmanager, 2nd tab)

Very good to know, thank you!

6 hours ago, linuxgurugamer said:

Have you tried using MemGraph yet?

Yes, I have messed around with it a bit. I recorded some video of the lag spikes in action with MemGraph showing if it helps at all.

I noticed in the video that the current RAM usage (according to MemGraph) steadily increases. I also noticed that every time the current value is about to go over the maximum value, a lag spikes occurs. The current value then drops by around 20MB, and the cycle repeats.

Edited by The_8_Bit_Zombie
Link to comment
Share on other sites

2 hours ago, The_8_Bit_Zombie said:

I noticed in the video that the current RAM usage (according to MemGraph) steadily increases. I also noticed that every time the current value is about to go over the maximum value, a lag spikes occurs. The current value then drops by around 20MB, and the cycle repeats.

That's the garbage collection happening.  I don't remember it right now, but you can use Memgraph to add more memory, look at the forum page for more info

Link to comment
Share on other sites

17 hours ago, linuxgurugamer said:

That's the garbage collection happening.  I don't remember it right now, but you can use Memgraph to add more memory, look at the forum page for more info

Ah, that did the trick! I followed the page instructions and set padheap.cfg to 6144. The spikes are now around 4 minutes apart! Thank you so much for the help!

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