Jump to content

[1.2.x/1.3] MemGraph 1.1.0.3 - with Stutter Reduction


Padishar

Recommended Posts

40 minutes ago, John007qwe said:

But since the other day my stuttering suddenly got way worse.

Do you have Contract Configurator installed, and how many active contracts do you have? ~3.5MB/s is almost exactly what I see with zero active CC contracts in my game, Increasing by 10-12MB/s per.
My recent investigations, YMMV:

 

Edited by steve_v
Link to comment
Share on other sites

40 minutes ago, steve_v said:

Do you have Contract Configurator installed, and how many active contracts do you have? ~3.5MB/s is almost exactly what I see with zero active CC contracts in my game, Increasing by 10-12MB/s per.
My recent investigations, YMMV:

 

Yes I have CC installed with 11 active contracts. You might be right about that since i did accept some Anomaly Surveyor contracts the other day. I tried removing all my active contracts and my stuttering got reduced drastically! I guess I'll be waiting for an update for CC and in the meanwhile just have less active contracts. Thanks for the help!

Edited by John007qwe
Link to comment
Share on other sites

On 9/1/2016 at 7:45 PM, Padishar said:

However, this is still in the future and I've not got a lot of spare time at the moment so it will probably be at least a couple of weeks before I get around to it.

I've just released version 1.0.0.9 that includes several requested changes.

There is a new config file called settings.cfg that allows the keybindings, the initial visibility and whether the padding is applied on startup to be controlled.  The keybindings currently always use the configured modifier key but the keys themselves can be set to any value from the Unity KeyCode enum (they're case-sensitive, so be careful to enter the key name carefully).  The settings.cfg file is read on every scene change so you can change the keybindings without needing to restart KSP, just switch scene and the new settings will then be used.

It also includes the changes I described earlier to the heap padding mechanism.  The values for each size of block are now simple weights and the total padding allocated in megabytes is specified separately (the "total" line at the end of padheap.cfg).  The total and weights are used to calculate how many 4k pages should be allocated for each block size range.  The default configuration splits the total equally between all the sizes up to 432 bytes and now allocates a bit more memory than it did before.

Link to comment
Share on other sites

On 02/09/2016 at 9:42 PM, John007qwe said:

Yes I have CC installed with 11 active contracts. You might be right about that since i did accept some Anomaly Surveyor contracts the other day. I tried removing all my active contracts and my stuttering got reduced drastically! I guess I'll be waiting for an update for CC and in the meanwhile just have less active contracts. Thanks for the help!

I was getting the same thing...really bad stutter every 5 seconds or so if I had more than a few contracts.  And lets face it who can't help taking multiple contracts.  If I delete the contracts then GC runs every minute or so.

Using memgraph I could get the GC running about every 30 seconds, and that's with KSP using up 12Gb of RAM.

I updated CC yesterday to the latest version and GC is now running about every minute without memgraph, and after padding with memgraph it's every few minutes.

Definitely upgrade to the latest version of CC, it's a huge improvement.

Link to comment
Share on other sites

On 12/09/2016 at 9:11 AM, Padishar said:

There is a new config file called settings.cfg that allows the keybindings, the initial visibility and whether the padding is applied on startup to be controlled.

New option to apply padding on startup causes my game to not start up... nothing interesting in the log, just never makes it to the initial loading splash.
Not sure what else I can say, nothing is logged that I can see.

Link to comment
Share on other sites

3 hours ago, steve_v said:

New option to apply padding on startup causes my game to not start up... nothing interesting in the log, just never makes it to the initial loading splash.
Not sure what else I can say, nothing is logged that I can see.

Strange, it definitely worked when I tested it. I'll give it another try in a little while.  Anybody else tried this? 

Are you on linux? This may be one of those strange differences. Hopefully I can just delay the application a bit, it happens very early at the moment 

 

Edited by Padishar
Link to comment
Share on other sites

19 minutes ago, Padishar said:

Strange, it definitely worked when I tested it. I'll give it another try in a little while.  Anybody else tried this? 

Are you on linux? This may be one of those strange differences. Hopefully I can just delay the application a bit, it happens very early at the moment 

 

Is there anything in particular one needs to do in order to apply this correctly? 

Link to comment
Share on other sites

27 minutes ago, Calvin_Maclure said:

Is there anything in particular one needs to do in order to apply this correctly? 

Not sure what you mean.  After installing 1.0.0.9 you should be able to simply change the "applyPadding = false" line in settings.cfg to "applyPadding = true" and it should be applied when KSP starts.

Link to comment
Share on other sites

2 minutes ago, Padishar said:

Not sure what you mean.  After installing 1.0.0.9 you should be able to simply change the "applyPadding = false" line in settings.cfg to "applyPadding = true" and it should be applied when KSP starts.

Sorry my question wasnt too clear. But you answered it! :)

Link to comment
Share on other sites

2 minutes ago, Calvin_Maclure said:

Sorry my question wasnt too clear. But you answered it! :)

Incidentally, it looks like I've messed something up.  My version is hanging on startup when I set applyPadding to true as @steve_v describes...  Looks like a tweak is needed...

Link to comment
Share on other sites

2 minutes ago, Padishar said:

Incidentally, it looks like I've messed something up.  My version is hanging on startup when I set applyPadding to true as @steve_v describes...  Looks like a tweak is needed...

Yeah, this is good to know. Ive yet to get around to using this mod but I really honestly have to. Im getting so sick and tired of the stutter... Im just not 100% atm on how you use this mod to reduce that stutter. 

 

Link to comment
Share on other sites

23 minutes ago, Padishar said:

Incidentally, it looks like I've messed something up.  My version is hanging on startup when I set applyPadding to true as @steve_v describes...  Looks like a tweak is needed...

Just released version 1.0.0.10 with a fix for the applyPadding = true hang.  Sorry about that folks, I really should have tested the version I actually packaged for release...

17 minutes ago, Calvin_Maclure said:

Yeah, this is good to know. Ive yet to get around to using this mod but I really honestly have to. Im getting so sick and tired of the stutter... Im just not 100% atm on how you use this mod to reduce that stutter. 

 

Basically, you copy the MemGraph folder from the download zip into the GameData folder of your KSP install.  Then run KSP and hit Mod-End to reduce the stutter.  You can edit the settings.cfg as described above to make the window hidden (visible = false) and to apply the padding automatically on startup (and to change the various key bindings if desired).  If you have a lot of free memory then you can change the total = 1024 line at the end of padheap.cfg to a larger value which should increase the time between stutters...

Link to comment
Share on other sites

3 hours ago, Padishar said:

Just released version 1.0.0.10 with a fix for the applyPadding = true hang.  Sorry about that folks, I really should have tested the version I actually packaged for release...

Basically, you copy the MemGraph folder from the download zip into the GameData folder of your KSP install.  Then run KSP and hit Mod-End to reduce the stutter.  You can edit the settings.cfg as described above to make the window hidden (visible = false) and to apply the padding automatically on startup (and to change the various key bindings if desired).  If you have a lot of free memory then you can change the total = 1024 line at the end of padheap.cfg to a larger value which should increase the time between stutters...

Great. So how exactly does this mod do its thing? What is it doing to reduce stutter?

Link to comment
Share on other sites

1 minute ago, Calvin_Maclure said:

Great. So how exactly does this mod do its thing? What is it doing to reduce stutter?

It's explained (as well as I intend doing for the moment) in several posts in this thread, e.g. this one and the one it links to:

 

Link to comment
Share on other sites

9 minutes ago, Padishar said:

I have now released version 1.1.0.1 for KSP 1.2.

Going for first 1.2 compatible mod? :P
Actually a pretty usefull tool to have for testing the prerelease. Ta.

Link to comment
Share on other sites

Seems to work fairly well for me. Had an interval of 33 - 35 seconds pre-use, went up to around 45 after first alt+end and then around 48 - 52 after the second alt+end, and no significant change after a third alt+end: http://imgur.com/a/dZ0xI. The two sets of two red bands close together on the left of the image were when I hit alt+end. I can upload my output_log file if you want, but it's 19mb and lags my computer to hell just to open it (running a 4790K @ 4GHz wut?), and trying to post to pastebin just crashed Chrome haha.

Quick question, do I have to change any values in padheap.cfg apart from total to allocate more ram? I've got 16GB, KSP uses 9GB with mods (10 when 1GB is allocated with MemGraph) and I'd love to squeeze every drop of performance out of my PC if possible.

Also, do my padding settings get saved? Or do I have to run through the alt+end cycles a couple of times with every boot?

Cheers for the mod, nice little utility you've made!

Link to comment
Share on other sites

7 hours ago, LemonSkin said:

Quick question, do I have to change any values in padheap.cfg apart from total to allocate more ram? I've got 16GB, KSP uses 9GB with mods (10 when 1GB is allocated with MemGraph) and I'd love to squeeze every drop of performance out of my PC if possible.

Also, do my padding settings get saved? Or do I have to run through the alt+end cycles a couple of times with every boot?

You can experiment with modifying the other values but the "best" values will be highly dependent on the exact pattern of garbage creation by your install of KSP.  The default values should be reasonably good so just changing the total line should make a significant difference to your stutter.

You can make the mod apply the padding on game startup by changing the applyPadding value in settings.cfg to true.

Link to comment
Share on other sites

  • 3 weeks later...
Guest
This topic is now closed to further replies.
×
×
  • Create New...