Jump to content

BUST: 1.1.X VAB/SPH High CPU Utilization


Recommended Posts

BUST - Bugs Under Special Testing (Community Project)

Special Note: Please do not post requests for support on this thread. If you need help fixing a problem, please see the Support stickies.

 

1.1.X VAB/SPH High CPU Utilization

The purpose of this particular thread is to gather information related to the high CPU utilization experienced in the editors (VAB/SPH) in 1.1.X. I believe I have narrowed down the source of the high CPU utilization, and built a plugin for folks to try as confirmation. I'm still not sure of the root cause of the CPU thrash, but I believe I've found where it's coming from. It appears that the animations in the editors are causing abnormally high CPU utilization. Additionally, the Tier 3 VAB is using lighting that isn't present in the other editors, which contributes to the high CPU rates.

 

The only thing (that I know of) that can currently be done in stock to reduce the CPU utilization in the editor is to turn OFF the kerbal ground crew (via the Main Menu Settings page). This reportedly reduces the CPU utilization anywhere from 15 to 25%. Unfortunately, that setting only turns off the kerbals but not any of the other animated parts.

 

If you aren't opposed to addons, I've created a small plugin that you can download from here (called EditorCPUFix.dll). If a few folks could check this out and see if it reduces the CPU burden, that would help confirm the issue (and I might include it in StockBugFixes). It basically disables the lighting and animated components of the VAB/SPH. On my personal computer, my CPU utilization in the Tier 3 VAB has gone from 60% to about 15% (as reported by Windows).

Modlet Installation:

  1. Download the EditorCPUFix.dll from here.
  2. Unzip the files.
  3. Copy EditorCPUFix.dll into the KSP/GameData directory. (You can create a subdirectory if desired.)
  4. Launch KSP

NOTE: The modlet can be uninstalled at any time by exiting KSP and deleting the EditorCPUFix.dll file.

**I'm also curious to see if this fixes anyone's "VAB constantly crashes" issues. Given the randomness of that issue and the thrashing involved in this instance, I'd be interested to know if this narrows down on two problems.

 

http://bugs.kerbalspaceprogram.com/issues/7549
http://bugs.kerbalspaceprogram.com/issues/7570

 

Link to comment
Share on other sites

I can give this a try tonight, thanks for all your time and effort.

Should I just use windows task manager to monitor the performance? Or would I be better off installing some program to monitor my performance and maybe even the FPS?

Thank you for working on this, hope it works and hope to see it in the awesome Stock Bugfix mod indeed.

Cheers

Daf

Link to comment
Share on other sites

@Padishar My testing showed that each bit contributed some to the CPU load (I couldn't pin all of it on one thing). Though perhaps I can make a GUI with some toggles on it, for troubleshooting.

 

2 hours ago, Dafni said:

Should I just use windows task manager to monitor the performance?

Well, there's a variety of things you could use, though the task manager is probably the easiest. FPS may or may not be useful, if you have the max cap in place (so there might not be an increase). Anything that measures CPU load, really. I also noticed that my computer is completely silent now when I run in the VAB (i.e. the fans to not run at all).

Link to comment
Share on other sites

2 hours ago, Claw said:

My testing showed that each bit contributed some to the CPU load (I couldn't pin all of it on one thing). Though perhaps I can make a GUI with some toggles on it, for troubleshooting.

Yes, though it does seem a bit strange.  I've run some tests with different combinations with the following results (on my old, CoreDuo, laptop on Win32 so, in no way directly comparable to my earlier results, but still interesting).  I split the disabling into 4 parts: crew, props, trucks/lifts and lights.

KSC: 25-30%
VAB Nothing disabled: 65-75%
VAB Crew disabled: 65-75%
VAB Crew and props: 65-75%
VAB Crew and anims: 65-75%
VAB Crew, props and anims: 25-30%
VAB Lights disabled: 65-75%
VAB All disabled: 25-30% dropping to 12-15% after about ten seconds.

So, basically, turning off individual ones didn't have any obvious effect on the CPU usage but turning off everything except the lights reduced the usage to approx. half a core.  Also turning off the lights basically halved this again though turning off the lights without disabling the other bits had no apparent effect.

So, as far as this potato of a machine is concerned, the most important thing is to kill the crew, props and trucks/lifts.  Killing the lights as well is also helpful but does make the VAB look quite a bit different so I would probably rather leave it on, especially as killing the other bits gets the CPU usage to the same level as KSC.

I'll run the same tests later on my decent machine to see if the pattern is repeated...

What is the model_props GameObject?  I looked for something obviously changing when turning it off but couldn't see anything (I may be being totally unobservant here :wink:).  I can understand that the animated stuff would use CPU (though the amount seems a tad excessive) but not something that seems to be invisible anyway.

Link to comment
Share on other sites

You sir are a saint. I had stopped playing because I was worried about the load on my computer. Without this my load was about 45 to 50% which doesn't sound like much but i'm over clocked to 4.7GHz on a 4970k  and the load drove my temps up to 70-75c on a swifttech H240X cooler(water cooled) while in the editor.

 

Before fix
KSC: 5-8%    35-40c
VAB :45-50%  60-70C 

After fix
KSC: 5-7%    34c  
VAB : 11-12% 35-40C    

19390155964_9c56b3d904_z.jpg

 

 

 

 

 

Edited by astovall321
Link to comment
Share on other sites

hi,

done a bit of testing ere, i was getting some crazy cpu usage but only intermittent crashes, although on 1 of my attempts to test I crashed in vab, youll find log attach

heres some info', hope it helps:

Laptop: Win10 64bit: Intel i5-4300m 2.6Ghz: Ram 8gb:  Nvidia GT750m 2gb, driver Ver 353.62

KSP Ver 1.1.2: 64bit: Stock Vanilla.

2 tests, both run as admin from ksp64.exe (not steam) first without claws Dll and second with Dll.

3 same ITEMS added & removed in same order each time, which were - probe core, modular girder & 1x1 panel

                                        Without Patch                      With Patch

Title page             :             30 - 36%                             28 - 32 %

Ksc scene            :             29 - 32 %                            28 - 32 %

SPH                     :             62 - 66 %                            39 - 44 %

Sph & items         :             65 - 69 %                            38 - 44 %

after delete items :             67 - 72 %                            39 - 48 %

exit sph                :-------------------------------------------------------------------

enter VAB            :            67 - 72 %                             46 - 53 %

Vab & items         :            68 - 76 %                             50 - 57 %

after delete items :            66 - 74 %                             50 - 58 %

My Fan blows constant like a tornado :wink: before I forget heres link to crash log txt - https://www.dropbox.com/s/6w4acy0suetd4g2/output_log1.txt?dl=0

KSP Log - https://www.dropbox.com/s/heocboqa7av18iu/KSPlog1.txt?dl=0

 

cheers

Edited by Tr1gg3r
Attaching other log
Link to comment
Share on other sites

The patch is installed and crew disabled still had two CTD today in the tier three SPH.  Both times happened when disassembling the craft and then selecting a new part from the list.  I am thinking about the animations of the parts in the list.

This is a very elusive bug.  Great job on stalking down the beast so far.

Link to comment
Share on other sites

  • 2 weeks later...

I also had a positive effect with this fix.
My CPU load went down from 50% to about 30% per core, with 4 of 8 CPU threads utilized by KSP. (Intel i7-2600 @ 3.8 GHz)
It definitely helped.

Link to comment
Share on other sites

3 minutes ago, Jansn67 said:

Probably only a fix for Windows (not for Linux)?

The add-on is cross platform, and I suspect it's the same issue in both windows and linux. Actually, if you are running into this issue using linux, please give the add-on a try. That would help confirm that the issue on linux is rooted in the same area as in windows.

Link to comment
Share on other sites

hey claw, a few days back i testet the cpu 001 fix on Windows and at the same time experienced some more stutter outside of the Editor - flightscenes where as slow as in 1.0.5.

Any Chance that this could be a result of the mod? I totally cleaned my Installation since then and never touched the fix again, so i cant say - just curious?!

Link to comment
Share on other sites

7 hours ago, Claw said:

Actually, if you are running into this issue using linux, please give the add-on a try. 

Thanks. I leave work in half an hour and give the fix a try later@home.

some EDITs:
1st without CPUfix in my middle-heavy-modded (110+) career game:
VAB gound crew was already disabled.
Had around 60 to 80 % CPU load in VAB ([email protected] all cores without Hyper-Threading -> it seems that is still not good with KSP/Unity)
No Lags or any other strange behavior in VAB. (Just the usual 20-minutes-1.1.2-CTD after first startup. 2nd start will stay up for some hours.)

Now launching a IKE-science-probe.
(Wow, it looks so amazing jerking good with all that grafic mods :p)

...

VAB/Launch to LKO = same CPU load. But now CPU monitor shows tales each 6 seconds down to 30-40 %.

In free flight (returning from Mün/Minmus) no difference.

(Argh.. i hate it.. you hardly concentraed work down your manöver cue list. and then it chrash back to desktop.
without any entry in log files... argh.)

Need to go to bed now after some hard working days.
(Hope my muslim neighbours dont shoot tonight, dont fight aginst each other, hope the patrichat dont slap and violence
his 5!!! kids and wife till 2 o'clock in the morning... hope that they dont scream and cry till early morning, hope i can SLEEP!)

Conclusion: CPUfix seems to change something that is watchable in a CPU-monitor, "HTOP" or advanced Taskmanager in.. Lubuntu.
But in ongoing "game experience" it dont show any "improvement".

PS: i am just a serious gamer, need the adventure and challange of the game, would say i am a experienced cfg-editor if they are not
to deep into "game mechanics".

After 3 hours: 3rd start of game ends (again) in KSC kraken. Need a 4th start.

Over and out.

 

Edited by Jansn67
Link to comment
Share on other sites

Unscientifically, my laptop runs about 10-15 degrees C cooler in the sandbox (highest-tier?) VAB and SPH with EditorCPUFix.dll than without.  Ground crews were disabled already.  Actually, I'm happy enough that this removes the other background animations, too - I never liked them, too distracting. :P

I haven't had any crashing problems in the editor scenes in 1.1.2 and I still don't with the mod, at least not the one session I've played with it thus far.

Win7 Pro 64-bit SP1, KSP 1.1.2 64-bit windowed mode, i5-3320M, 8GB RAM, NVIDIA NVS 5400M 1GB

This is not an unmodded install: ModuleManager, KER, LightsOut, Take Command, PlanetShine, LandingHeight, KerboKatz FPSLimiter and FPSViewer.

Edited by Clouds
Link to comment
Share on other sites

Despite the 1.1.3 change log stating that turning off ground crews also turn off other animations in the construction scenes (and indeed, they appear to be gone), my computer's temperature is no different than it was in 1.1.2.  Actually, @Claw, your EditorCPUFix.dll seems to still work in 1.1.2 and still makes a big difference.

Edited by Clouds
mention
Link to comment
Share on other sites

Sorry, didn't mean to ignore this thread. The "Disable Ground Crew" turns off all the animations, but doesn't turn off the accent lighting on the walls. The add-on does turn off those lights as well, so it sounds like those lights might be hitting some systems a bit harder than others. The good news is that those lights are receiving attention. In the mean time, let me know if the add-on isn't working well for folks in 1.1.3 and I can recompile.

Cheers,
-Claw

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