Jump to content

Slight freeze every 5 seconds (or so)


Recommended Posts

Hello! I am having really hard stuttering (1 sec on / 0.5 sec off) only when I put a kerbal in EVA. Even when I fly away out of the physics range of the ship. However, when the kerbals are inside the ship the game runs fairly well (with glitches and crashes, but playable). I have quite a few mods installed and actualized. I've been reading many posts about stuttering but I haven't find anyone with this specific and anoying issue. I was wondering if I am the only one experiencing this. It is acceptable if you only go out to grab a surface sample or so, but now I'm going to start building a munar base and I think it is going to be impossible if this stuttering persists...

Link to comment
Share on other sites

34 minutes ago, Perringo said:

Hello! I am having really hard stuttering (1 sec on / 0.5 sec off) only when I put a kerbal in EVA. Even when I fly away out of the physics range of the ship. However, when the kerbals are inside the ship the game runs fairly well (with glitches and crashes, but playable). I have quite a few mods installed and actualized. I've been reading many posts about stuttering but I haven't find anyone with this specific and anoying issue. I was wondering if I am the only one experiencing this. It is acceptable if you only go out to grab a surface sample or so, but now I'm going to start building a munar base and I think it is going to be impossible if this stuttering persists...

Unless you happen to have one mod that's generating an insane amount of garbage (this is possible though I would have thought it unlikely) then this would probably be better off being posted as a new thread in the Technical Support (modded installs) sub-forum.  Please read the "How to get support" sticky thread in that sub-forum for lots of general advice on how to troubleshoot problems and also details of what other information you will need to include if you're unable to solve the issue yourself.

Link to comment
Share on other sites

  • 4 weeks later...

And again, my current 1.1.2 space program has reached a point, where the current GC spikes are close to 500 ms every 10 seconds or so, effectively making the game unplayable. In a fresh game the spikes are below 100 ms and barely noticable.

So sad a great space program was stopped by using an outdated mono version, nothing more than an software glitch. Maybe I'm back for 1.2.

Link to comment
Share on other sites

did u try @Padishar's mod for the memgraph?

u can change heapsize there wich CAN, given u have enough ram, expands the gc-steps up to two minutes..

edit: memgraph

have my ksp running at 15 GB RAM now and its very smooth

Edited by Speadge
Link to comment
Share on other sites

10 minutes ago, hirschhornsalz said:

MemGraph actually works :-)

Running with 22 GB now and getting a stutter every 5 minutes or so inflight, compared to the 2-3 seconds before. Finally those 32 GB RAM get something to do. Thank you very much, my girlfriend will hate you ;-)

u r welcome :)dont blame me for beeing single in a few weeks... or blame padishar :wink:
but first, u should thank him, not me :wink:
 

Edited by Speadge
Link to comment
Share on other sites

  • 1 month later...
On 5/23/2016 at 7:28 PM, Perringo said:

Hello! I am having really hard stuttering (1 sec on / 0.5 sec off) only when I put a kerbal in EVA. Even when I fly away out of the physics range of the ship. However, when the kerbals are inside the ship the game runs fairly well (with glitches and crashes, but playable). I have quite a few mods installed and actualized. I've been reading many posts about stuttering but I haven't find anyone with this specific and anoying issue. I was wondering if I am the only one experiencing this. It is acceptable if you only go out to grab a surface sample or so, but now I'm going to start building a munar base and I think it is going to be impossible if this stuttering persists...

Perringo, I ran into this many months and and someone on here provided the answer, can't recall who.

This is TexureReplacer and you have the visorreflection enabled in it's configuration. Turn it off and your EVAs will be back to their fluid wonderful normality..

Link to comment
Share on other sites

18 hours ago, Starfire70 said:

Perringo, I ran into this many months and and someone on here provided the answer, can't recall who.

Thank you Starfire! thanks to the help of some wise people over here I manage to solve this quite long ago. In my case, if I recall, it was something involving kopernicus, and I believe it has been solved in later releases. I haven't ecounter that issue again.

Link to comment
Share on other sites

  • 2 months later...

It's October 2016, almost two years have passed since this thread... I get the same problem with the latest version: every 5 seconds a hiccup. Very annoying! I have an very powerful gaming computer, GSYNC monitor, etc. KSP isn't even using 20% of the resources. 

CAN THIS BE FIXED PLEASE?!?!? This is clearly a bug in the game and it's pretty major. 

Edited by Kerbital
Link to comment
Share on other sites

9 hours ago, Kerbital said:

It's October 2016, almost two years have passed since this thread... I get the same problem with the latest version: every 5 seconds a hiccup. Very annoying! I have an very powerful gaming computer, GSYNC monitor, etc. KSP isn't even using 20% of the resources. 

You're getting a GC stutter every 5 seconds in 1.2?  Do you have mods installed?  Squad did a lot of work to reduce the garbage creation for 1.2 (and a fair bit in 1.1.3 as well) so the problem should be very much better now than it used to be.  Your description of your machine as a "very powerful gaming computer" isn't helpful, giving details of the actual CPU, GPU and amount of RAM may be a bit more helpful but the specs of your computer don't really make much of a difference in any case.  The GSync monitor is likely to be making the issue worse, the problem is caused by the core game and mods allocating (and discarding) memory on each frame, so the higher your fps, the higher your rate of garbage creation will be.  If you set the framerate limiter in the settings down to 60 then it may well improve things.

9 hours ago, Kerbital said:

CAN THIS BE FIXED PLEASE?!?!? This is clearly a bug in the game and it's pretty major.

As I said above, Squad have been making lots of improvements to this over the last 6+ months but a single, carelessly written, mod can easily overpower all the work they've done and result in significantly bad stutter.  Using caps and multiple exclamation/question marks for emphasis isn't going to have the effect you want.  It's more likely to make people ignore you than to encourage Squad (or any modders) to address the issue.  I understand how you feel, I've been playing the game since version 0.23 in late 2013 and I have seen this stutter in every version so far.  Eventually, it affected my enjoyment of the game to such an extent that I basically stopped playing and spent most of my "KSP time" either modding or investigating ways to fix, or at least to improve, this problem.  I eventually found a way to significantly reduce the frequency of the GC stutters and released it as part of the MemGraph mod linked in my sig below.  If you already run with mods then another small and highly optimised one won't hurt and if you run stock then I would still recommend you giving it a try.  If you do give it a try then please post any questions you may have and/or the results you achieve in the MemGraph thread...

Link to comment
Share on other sites

I feel the caps are justified as it's extremely infuriating to encounter a serious, game spoiling bug that was discussed years ago in a game that you have just purchased. 

Yup. I get this in 1.2, Steam version. I run the 64bit executable on Windows 7x64, I only have MechJeb installed, no other mods, no settings file tweaks. I removed MJ and it still happens. It gets worse with larger ships. Ships over 200 parts are basically unplayable. And I mean single flight. If I have few ships out in space it becomes unbearable. FPS is usually high, around 100fps, the hiccups seem to be RAM/CPU related. Oh, and I also capped FPS at 60, didn't make a noticeable difference.

I tried MemGraph, it does nothing besides showing the graph, the shortcuts key for MemGraph do not work. I reinstalled the game with default keybindings, MemGraph still doesn't make any difference.

I didn't want to brag, here are my specs, note that nothing is overclocked:

Windows 7x64 (went back from Win10 due to broken Skyrim in latest 10 update)
Core i7 6700K
GTX 1080 x2 SLI (disabled SLI, no difference)
32GB RAM
Steam is installed on M2 NVME PCI SSD

I haven't encountered a game yet that has problems running on this machine, except when I was running Windows 10 (SLI bugs). The PC is only used for games, no other software, basically a Steambox of sorts. If you look at the Task Manager, there is probably around 20 tasks running. KSP never uses more than around 20% of CPU and RAM usage is also very low.

My solution for now is to avoid large ships and fly fewer ships at a time, but that takes the fun out of the game. 

Edit: Other things I did: I disabled Steam overlay, I launched the game using Steam, KSP launcher or the exe directly, nothing seems to make any difference.

Edited by Kerbital
Added a sentence
Link to comment
Share on other sites

47 minutes ago, Kerbital said:

I tried MemGraph, it does nothing besides showing the graph, the shortcuts key for MemGraph do not work. I reinstalled the game with default keybindings, MemGraph still doesn't make any difference.

Can you post an example vessel that does this for you, a screenshot of the MemGraph window with the scale adjusted so the green doesn't fill the graph (Alt-NumPadPlus and Alt-NumPadMinus should adjust the scale) and the output_log.txt file from the KSP_x64_Data folder (leave it sitting in flight, stuttering every 5 seconds, for a couple of minutes, then take the screenshot, quit and upload the various files)?

I've just run a test with a 400 part rocket on the launchpad.  I was initially seeing a GC stutter every 13 seconds which surprised me a bit, but it appears that the improvements to the garbage creation in 1.2 have been somewhat neutralised by the generally lower Mono heap usage resulting in Unity keeping less free headroom in the heap so it fills up faster.  However, after I hit Alt-End to apply MemGraph's heap padding, the next GC stutter happened after 315 seconds and the next one after another 303 seconds.  A stutter every 5 minutes is no problem at all and that's with the default 1024 MB of padding, increasing the total= value in padheap.cfg should increase it further...

Posting an output_log.txt where you try to apply the padding with Alt-End may allow me to work out what is wrong...

Link to comment
Share on other sites

Thanks a lot or trying to help out. You just made me realize why I could not get MemGraph to work! Alt key! Duh. I was just pressing star, slash, etc without the Alt :( My bad. 

I'll try MemGraph again tonight and will post more information. 

The largest ship I had so far was around 380 parts and it would be a solid stop, for like a full second, every 5 seconds or so. Most have around 200. 

Even if there was a stutter every minute I would not mind. But every few seconds is very annoying, especially if you're trying to move the camera around.

Edited by Kerbital
Link to comment
Share on other sites

So yup, MemGraph works, it wasn't because I didn't use the Alt key :(

Today I was getting the stutter every 5 seconds and every 8 seconds after I hit Alt-Home. I didn't take a screenshot because the game quit to the desktop :( It doesn't do this normally, I don't have a problem with this game quitting.

After re-launching the game I was actually getting the stutter every 3 seconds now! After Alt-Home it was every 8 seconds again. Here is the link to a zip file containing two craft files, a screenshot and the output_log.txt.

https://dl.dropboxusercontent.com/u/14471718/forumstuff/ksp/ksp-stutter-stuff.zip

Thanks!

Link to comment
Share on other sites

10 hours ago, Kerbital said:

After re-launching the game I was actually getting the stutter every 3 seconds now! After Alt-Home it was every 8 seconds again. Here is the link to a zip file containing two craft files, a screenshot and the output_log.txt.

MemGraph is showing that something is allocating between 20 and ~50 MB/s which is very high.  By contrast, in the test I described above, I was seeing an allocation rate of around 1.4 MB/s.  I'm not sure what is causing this yet, I don't see anything obvious in the log.  I've not tried to load your vessels yet but, since this is an in-orbit situation, it would be more helpful if you could upload a save file instead (either zip up the whole of the relevant folder in the saves folder or just copy the persistent.sfs file from the save).  It may be that some particular combination of parts you have is showing up a bit of stock KSP code that hasn't been optimised very well (or at all) so I'd like to test as similar a situations as yours as is possible...

Link to comment
Share on other sites

Padishar, I don't think this has anything to do with a vessel size actually. I later tried this with a much smaller craft, put it in orbit and make it spin and watched it. What is strange that the stutter is sometimes every 3 seconds, sometimes every 5 seconds. After Alt-Home it goes up to 8 seconds and sometimes 16 seconds but I've seen periods of time without stutter for much longer, but they were rare and then it would go back to more frequent. Also, I noticed very long loading times when I switch from ship to space center and the game crashed few times during that.

I wonder if MechJeb is the cause of this. It's the only mod that I have installed. I will reinstall the game tonight and try without MechJeb. That's would be bad though because I can't play this game without MechJeb, too hard for me. 

Here is my save:

https://dl.dropboxusercontent.com/u/14471718/forumstuff/ksp/saves/Sandbox2.zip

Thanks!

Link to comment
Share on other sites

4 hours ago, Kerbital said:

I wonder if MechJeb is the cause of this. It's the only mod that I have installed. I will reinstall the game tonight and try without MechJeb. That's would be bad though because I can't play this game without MechJeb, too hard for me. 

MechJeb is certainly generating some garbage though it isn't a constant very large amount for me.  I tested your save (without applying the MemGraph padding) and a new default one with just a pod on the pad and both show a similar allocation profile in MemGraph.  With your save I see the Last value (the rate) doing its usual thing of starting low just after a collection and rapidly climbing to about 2.5 MB/s but there is also a large spike of approx. 5 MB every 5 seconds and this results in an interval of about 35 seconds.  I see the same pattern with a fresh save and just a Mk1 pod with an MJ unit but the baseline usage was lower, only rising to about 750 KB/s which extends the interval to about 75 seconds.

CuGaMlW.jpg

The bits at the start and end are the pod on the launch pad and the section in middle is with your save.  I'll try and have a chat with Sarbian about this as I didn't expect this usage profile.  I'll also mention your usage profile too though I don't understand why there is a significant difference...

The best thing you can probably do for now is to change the total= line at the end of GameData\MemGraph\PluginData\MemGraph\padheap.cfg to a larger number (with 32 GB I'd try adding a zero to the end first).  That should increase the interval between the stutters considerably more...

1 hour ago, Daveroski said:

This strange pause in practically every situation where a craft is operated is spoiling the game for me.

Assuming you have a decent amount of free memory when running KSP, I suggest you try out the heap padding feature in my MemGraph mod (linked in sig below).

Link to comment
Share on other sites

@Padishar

I used a clean 1.2, added memgraph and mechjeb, loaded kerbitals save and switched to the only aviable vessel ... and got 20-30MB/s with a really small heap...
What do you think about that?

axT78AL.png

I am used to 20-30MB/s with my 1.1.3 install with 130 mods... But a ~200 parts ship with MJ only?

I am wondering that you call 5MB/s "large" :D What are normal values for stock / "normal modded games" here? I must admit, at my 130 mods 1.1.3 install the 20-30MB/s resulted in a unpadded stock GC cycle of around 5-10s which was very annoying. With padded the delay was not that frequent, but the GC lags were higher... not really less annoying. I noticed that cleaning up ships from the save game made it better an also removing contracts made it better. So I assumed I have had "just to much mods"... Or some mods that were iterating over all the ships / all the parts  in the save game...

PS: I have no experience in 1.2, cause my favorite mod selection is completely unplayable cause the part count dependent flicking-bug in 1.2 and I am waiting for a fix. :( 

Edited by Jebs_SY
Link to comment
Share on other sites

2 minutes ago, Jebs_SY said:

I used a clean 1.2, added memgraph and mechjeb, loaded kerbitals save and switched to the only aviable vessel ... and got 20-30MB/s with a really small heap...
What do you think about that?

I am used to 20-30MB/s with my 1.1.3 install with 130 mods... But a ~200 parts ship with MJ only?

What are the specs of your machine?  The install I used did have a few other mods so the larger heap size does make sense and one of the mods could also explain the different pattern I'm seeing so I'll set up another install with only the two mods and see if I see a similar effect.  What effect does the MemGraph heap padding have for you?

I had a bit of a chat with Sarbian about it and he is going to try to take a look at it this weekend.

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