Jump to content

Is there any performance fixing mod?


Recommended Posts

I have been playing KSP for a few months on a pretty bad computer, and the performance starts to become very bad with a 30 parts vessel.

I searched for performance-fixing mods extensively until I found the "KSP Community Fixes" and "Joint Reinforcement" mods. Do you have any other suggestions?

I read, for example, that in Juno new origin, the performance is very good because the game doesn't simulate internal physics. This results in higher performance and no wobbly rockets (I think).

Is there any mod to do that?

Link to comment
Share on other sites

@anis, is this the original KSP? What system are you running on? I find that going into the graphics settings and turning off anti aliasing together with setting a smaller screen resolution makes an enormous difference.

Link to comment
Share on other sites

I know that I won't find a "miracle" mod that fixes the entire game by itself and makes the performance amazing. I'm just searching for small mods that slightly improve performance in specific situations

Link to comment
Share on other sites

On 5/16/2024 at 7:39 AM, anis said:

I know that I won't find a "miracle" mod that fixes the entire game by itself and makes the performance amazing. I'm just searching for small mods that slightly improve performance in specific situations

Reduce the Textures quality to half or even to a quarter. You will find the option on the Settings / Graphics in the Main Menu.

Just it helped a lot on my old potatoes.

Additionally, activate the transparent file compression on the GameData directory. It also helps a bit on loading times.

https://learn.microsoft.com/en-us/windows/win32/fileio/file-compression-and-decompression

 

Link to comment
Share on other sites

Posted (edited)
On 5/16/2024 at 6:39 AM, anis said:

I know that I won't find a "miracle" mod that fixes the entire game by itself and makes the performance amazing. I'm just searching for small mods that slightly improve performance in specific situations

KSP Community Fixes is that miracle mod.  If you have a lot of vessels and/or bodies in your install, make sure to turn on the commnet throttling patch in the settings.cfg.

Also KSPCF will allow you to set the max physics dt to 0.02 which will increase framerate at the expense of having the game slow down behind realtime when it can’t keep up.

if you’re up for it, you can configure your game to attach the unity profiler.  If you share the results somewhere I’ll take a look and see if anything sticks out: https://gist.github.com/gotmachine/d973adcb9ae413386291170fa346d043

Edited by JonnyOThan
Link to comment
Share on other sites

Posted (edited)
8 hours ago, JonnyOThan said:

KSP Community Fixes is that miracle mod. 

KSPCF reduced the FPS on my potatoes. Just a little bit, but it did - at least on MacOS.

Didn't bothered to check why, however - perhaps it just allocated that bit of extra memory that triggered the swapfest again, but since I had already lowered  the texture's quality to the lowest level, there's no other place to run.

 

Edited by Lisias
Entertaining grammars made slightely less entertaining...
Link to comment
Share on other sites

14 hours ago, Lisias said:

KSPCF reduced the FPS on my potatoes. Just a little bit, but it did - at least on MacOS.

Didn't bothered to check why, however - perhaps it just allocated that bit of extra memory that triggered the swapfest again, but since I had already lowered  the texture's quality to the lowest level, there's no other place to run.

 

I’d be curious to see before and after profiles. I’d believe that maybe the dds conversion takes some more memory, but really after a few scene changes it probably would have made up for it by fixing a ton of memory leaks. And you can turn off the texture conversion (as well as any feature you don’t like or causes issues).

Link to comment
Share on other sites

Posted (edited)
2 hours ago, JonnyOThan said:

I’d be curious to see before and after profiles. I’d believe that maybe the dds conversion takes some more memory, but really after a few scene changes it probably would have made up for it by fixing a ton of memory leaks. And you can turn off the texture conversion (as well as any feature you don’t like or causes issues).

I didn't made myself clear. KSPCF, somehow, lowered a bit the FPS on flight scene.

I fired up KSP, loaded a savegame and focused an aircraft in the runway. Took note of the FPS.

Then I uninstalled KSPCF, reloaded the same savegame and focused the same aircraft, and got about half a dozen FPS more - what on an already handicapped rig, it's something.

What, why and how I didn't bored to check, as I was busy diagnosing something else.

I suggest that someone running KSP on a Windows potato try this and check the FPS with some FPS meter with and without KSPCF. It will render some data more comfortable to you.

MacOS has a BSD style Kernel, and it manages memory and processes in a somewhat distinct way. For starters, KSP can overcommit almost 10 times the virtual memory on MacOS than on Windows before crashing.

Edited by Lisias
Entertaining grammars made less entertaining.
Link to comment
Share on other sites

7 hours ago, Lisias said:

didn't made myself clear. KSPCF, somehow, lowered a bit the FPS on flight scene.

No, that was clear.  Obviously I don’t have a Mac to test it on and I think it’s totally possible that *some* of the patches in KSPCF might harm performance on *some* machines.  But then I’d get curious and attach the profiler and find out why.

For most people it’s a massive benefit.

Link to comment
Share on other sites

Posted (edited)
8 hours ago, JonnyOThan said:

No, that was clear.  Obviously I don’t have a Mac to test it on and I think it’s totally possible that *some* of the patches in KSPCF might harm performance on *some* machines.  But then I’d get curious and attach the profiler and find out why.

For most people it’s a massive benefit.

Most people don't use Macs - what's a pitty, because besides decaying over the years (Mission Control is terrible, I miss Expose a lot), is still way better than Windows under the bonnet.

The SCANSat memory leak just started to cause problems when the VM (virtual memory, not machine!) reached 38Gb of memory allocated for the process (my rig has 16, shared with the GPU), and it didn't crashed, just became barely responsive.

It makes the Macs a terrible platform to optimize for. They are too much resilient, you need to aim lower. Do the performance checks on Windows.

Whatever affects a Mac, it does way worse on Windows for sure.

Edited by Lisias
Late clarification.
Link to comment
Share on other sites

1 hour ago, Lisias said:

Most people don't use Macs - what's a pitty, because besides decaying over the years (Mission Control is terrible, I miss Expose a lot), is still way better than Windows under the bonnet.

Most people would rather use Windows Vista than Mac for a variety of reasons so I wouldn't call it a pity. Most who do use Macs do so either because all their files are trapped in Apple's ecosystem, because they fell for flashy advertising, or just because it's a status symbol. Really, it's a pity Mac doesn't shrivel up so Linux can take the lead as a Windows rival.

Link to comment
Share on other sites

9 hours ago, Lisias said:

Whatever affects a Mac, it does way worse on Windows for sure

That seems like a strange statement since you said KSPCF decreased performance on your Mac yet it increases performance for people on windows.

Link to comment
Share on other sites

Posted (edited)

@anis, I did a "quick & dirty" benchmark between an almost pristine 1.12.5 installation (Stock + DLCs + a few mods to allow checking the FPS) and tried it with and without KSPCF.

The host machine is a MacMini 6.2, 2.3GHz upgraded to 16GB RAM 1600 DDR3.

I used the Stratolauncher aircraft as subject (115 parts).

This is the FPS count without KSPCF:

EZBe6R7.png

And this is with KSPCF:

WPPWu0Z.png

When I originally checked this, I was on a pretty dirty KSP installation (I was helping a fellow Kerbonaur to diagnose a nasty memory leak, and the dude had a hell of a modded KSP!! :) ), and I indeed got about ~6 FPS less using KSPCF on that test bed.

On this test above, there was absolutely nothing installed, except my personal forks of MM and ShowFPS (and the KSPe thing in which they run over), and KSPCF with Harmony (or not), obviously.

On a pretty vanilla KSP, I think you will not perceive any FPS droppage on the long run - the yellow line (average FPS) is pretty "dirty" when KSPCF is installed, but the average FPS is less than 1 FPS below without it, what's frankly... Negligible.

From the performance on Flight Scene point of view, I'm not seeing what KSPCF could do for you - but it does some other things that may interest you, so you probably should try it and see for yourself if it will make things better for you in any other area.

For anyone interested, everything needed to reproduce the tests (including the savegame, settings.cfg, logs, et all) are available on my Google Drive.

How to reproduce:

  • Load KSP. :)
  • Load the perf-tests savegame
  • On KSC, activate the ShowFPS icon. That nice image with colored points will be shown.
    • While on KSC, the FSP will be terrible, 22 FPS only on my rig. On both test cases.
  • Then move the camera to look to the runway head and click on the Stratolauncher's marker (already launched) to "move into" the craft.
    • Now the FPS will rise, it's the first ascending curve on the graph
  • Wait a few minutes until the average FPS stabilizes.
    • It's that flat line on the graph WITHOUT KSPCF.
  • Now move the camera until you see the whole KSC complex, exactly how is shown on the screenshots above.
    • Leave the thing at rest, and watch the points being plotted for some minutes as I did.

Keep in mind that this test sessions were made without too much "scientific rigor" - I didn't closed any running programs (Firefox, Thunderbird, etc), didn't rebooted the machine between tests, nothing. What I did was to first do a test run with KSPCF installed and then another one without, and vice versa - and I got similar results on the respective test sessions. What I reported above was the second batch (without KSPCF first).

  

1 hour ago, JonnyOThan said:

<...> you said KSPCF decreased performance on your Mac yet it increases performance for people on windows.

Well, I didn't did such affirmation. I said that Macs are more resilient. You will not find on this thread a phrase of mine saying that.

What I said was to people using Windows do their own performances checks using... Windows. ;)

It's way more productive to detect the problems on Windows (as the majority of the users use it), and counter check on MacOS than otherwise - for starters, SCANSat's memory leaks would not be detected on my Mac on a quick test session, due the reasons I explained about (resilience). Had me not being informed about it, I would dismiss the problem after a reload or two, as the machine just didn't crashed as it was reported to me (and the dude's machine had twice the RAM!!!!).

=== == = POST EDIT = == ===

I DID NOT used that MONO_THREADS_PER_CPU=1 trick! It would be interesting repeating both tests with it! I will try do find time to do it tomorrow (hopefully at lunch, but no promises).

 

Edited by Lisias
Entertaining grammars made slightely less entertaining...
Link to comment
Share on other sites

Posted (edited)
1 hour ago, JonnyOThan said:

Why not use the unity profiler?  It could actually identify a cause.  Or even https://github.com/kspmoddinglibs/kspprofiler

Because users don't understand profilings,  but they do understand FPS.

Remember,  it's an user asking for information, not a developer.

=== == = POST EDIT = == ===

I checked this tool. Sorry, it will not do.  I'm not worrying about optimizing code, l'm looking into how performatic is the whole stack.

How this profiling tool would show me how much the FPS drops when the KSC is being drawn in flight scene? How this tool would show me the "jerkyness" of the FPS curve when using KSPCF? How it would help to explain the FPS curves being "smoother" without it?

And, most important of all, how this profiling will explain why it didn't improved my potato's performance as you had claimed? (I'm not saying it didn't improved something, I'm just saying that performance wasn't  between them).

Did you profiled KSP with and without KSPCF as I'm doing using a controlled Test Bed with a deterministic Test Session? Did you compared the results? Can you publish them, as I did now?

Edited by Lisias
tyops. as usulla.
Link to comment
Share on other sites

5 hours ago, Lisias said:

@anis, I did a "quick & dirty" benchmark between an almost pristine 1.12.5 installation (Stock + DLCs + a few mods to allow checking the FPS) and tried it with and without KSPCF.

The host machine is a MacMini 6.2, 2.3GHz upgraded to 16GB RAM 1600 DDR3.

I used the Stratolauncher aircraft as subject (115 parts).

This is the FPS count without KSPCF:

EZBe6R7.png

And this is with KSPCF:

WPPWu0Z.png

When I originally checked this, I was on a pretty dirty KSP installation (I was helping a fellow Kerbonaur to diagnose a nasty memory leak, and the dude had a hell of a modded KSP!! :) ), and I indeed got about ~6 FPS less using KSPCF on that test bed.

On this test above, there was absolutely nothing installed, except my personal forks of MM and ShowFPS (and the KSPe thing in which they run over), and KSPCF with Harmony (or not), obviously.

On a pretty vanilla KSP, I think you will not perceive any FPS droppage on the long run - the yellow line (average FPS) is pretty "dirty" when KSPCF is installed, but the average FPS is less than 1 FPS below without it, what's frankly... Negligible.

From the performance on Flight Scene point of view, I'm not seeing what KSPCF could do for you - but it does some other things that may interest you, so you probably should try it and see for yourself if it will make things better for you in any other area.

For anyone interested, everything needed to reproduce the tests (including the savegame, settings.cfg, logs, et all) are available on my Google Drive.

How to reproduce:

  • Load KSP. :)
  • Load the perf-tests savegame
  • On KSC, activate the ShowFPS icon. That nice image with colored points will be shown.
    • While on KSC, the FSP will be terrible, 22 FPS only on my rig. On both test cases.
  • Then move the camera to look to the runway head and click on the Stratolauncher's marker (already launched) to "move into" the craft.
    • Now the FPS will rise, it's the first ascending curve on the graph
  • Wait a few minutes until the average FPS stabilizes.
    • It's that flat line on the graph WITHOUT KSPCF.
  • Now move the camera until you see the whole KSC complex, exactly how is shown on the screenshots above.
    • Leave the thing at rest, and watch the points being plotted for some minutes as I did.

Keep in mind that this test sessions were made without too much "scientific rigor" - I didn't closed any running programs (Firefox, Thunderbird, etc), didn't rebooted the machine between tests, nothing. What I did was to first do a test run with KSPCF installed and then another one without, and vice versa - and I got similar results on the respective test sessions. What I reported above was the second batch (without KSPCF first).

  

Well, I didn't did such affirmation. I said that Macs are more resilient. You will not find on this thread a phrase of mine saying that.

What I said was to people using Windows do their own performances checks using... Windows. ;)

It's way more productive to detect the problems on Windows (as the majority of the users use it), and counter check on MacOS than otherwise - for starters, SCANSat's memory leaks would not be detected on my Mac on a quick test session, due the reasons I explained about (resilience). Had me not being informed about it, I would dismiss the problem after a reload or two, as the machine just didn't crashed as it was reported to me (and the dude's machine had twice the RAM!!!!).

=== == = POST EDIT = == ===

I DID NOT used that MONO_THREADS_PER_CPU=1 trick! It would be interesting repeating both tests with it! I will try do find time to do it tomorrow (hopefully at lunch, but no promises).

 

Yeah, the difference is pretty clear !

Link to comment
Share on other sites

Posted (edited)

I won't enter a whole debate about your claims, they are made from measurements done in vague and unreliable ways, especially the part about comparing the FPS curves while manually doing a scene switch and moving the camera.
What you're doing is very far from a "controlled Test Bed with a deterministic Test Session".

There are a million things that could affect the shape of those curves, and I very much doubt you're able to reproduce any of it consistently.
The simple fact that your FPS is changing when you're moving the camera (ie, it is dropping when the KSC buildings enter into the viewport) means that you're GPU-bound, which is something the KSPCF has zero influence on.
And a 1 FPS moving average difference is just noise, especially in a GPU bound scenario.
That's why more advanced tools than a FPS counter are needed, because right now you have no idea what you're measuring.

Concerning KSPCF, a few remarks :
- In the specific test case you're using, there is nothing in KSPCF that can improve or degrade performance.
- Most performance related tweaks in KSPCF are a targeted fix for a specific stock inefficiency. They can make a significant difference for the specific cases they apply to, but there is no silver bullet "game changer" performance tweak.
- An important fix is getting ride of the stock (and mods) memory leaks, which is a very problematic cause of performance degradation (not to say outright crashes) over long play sessions. If you want to measure the difference KSPCF makes here, an easy way is to just repeatedly quickload the same (preferably large, 100+ parts) vessel a good 30-40 times and to check memory usage.

Anyway, having some time to loose this morning, I grabbed the show FPS mod and did a few tests on my desktop (5800X3D / 6800XT).
On a side note, that mod is crap, because in itself it adds a lot of overhead (3% to 5% frame time overhead), and that overhead grow significantly with how many points are shown on its graph, heavily skewing the results.

Example of a case where the KSPCF optimizations are significant. The main optimization here are the PQS related ones.
8rosMNb.png

Not much difference however with the same vessel on the launchpad (a few KSPCF optimizations still kick in there, and they would be more visible on a lower spec machine, but in my case that doesn't change much) :

5ghTWXl.png

And another more dynamic but not very scientific nor deterministic test just for fun. I rescaled and aligned the graphs to be able to compare the points.
Not very conclusive, but KSPCF is consistently 5-10 FPS above stock, and there are fewer outliers. Likely a combination of the PQS and buoyancy optimizations.

PwjiDDV.png

Also took the time to repeat your stratolauncher test on my pretty crappy laptop (that test is pointless on my desktop as it runs at 300+ FPS).
The laptop has 8GB of low speed single channel DDR4, and a Pentium silver N5030, vastly slower than the I7-3720GM in your Mac, but with a better iGPU. Overall, I'd say this is a somewhat equivalent config.
I did the tests with every graphic settings set to the minimum, and at a 720p resolution to avoid being GPU bound as much as possible, but that didn't help much, I'm still GPU bound in almost every situation.
Anyway, here are the results, I'd say this is pretty much just as inconclusive as yours (you can ignore the instant / moving average FPS values in both screenshots, that was dipping because of the screenshot tool).

1MLDr8C.png

aMmbLTv.png

The dip after the camera movement is simply the iGPU struggling with having the KSC buildings to render.
I'm not sure why stock is below KSPCF before the camera movement, seems to be a GPU related limit too, but maybe there is some memory usage at play here as KSPCF is slightly reducing memory pressure.
I'm not even sure this would reproduce consistently, there are just way too many factors at play here.
I'd say that in general, without 100% automated and deterministic testing, and without specialized CPU, GPU and memory profiling tools, trying to identify the constraints on such low end machines is an exercise in futility.
Especially on such laptop-style machines (the mac mini is in the same boat here) where control over frequencies is extremely limited, where the iGPU and CPU are sharing the same memory and thermal envelope and where background processes are fighting with the game over limited resources.
 

Edited by Gotmachine
Link to comment
Share on other sites

43 minutes ago, Gotmachine said:

I'd say that in general, without 100% automated and deterministic testing, and without specialized CPU, GPU and memory profiling tools, trying to identify the constraints on such low end machines is an exercise in futility.

I agree.  I say that as a guy who used to use the FPS-mod in a stripped down fashion (no graphs for less overhead) to get metrics, and still do sometimes, but honestly, just use the profiler.  It's one of the main benefits of Unity, and not using it is ignoring a major boon we have.

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