Jump to content

KSP Performance again


fisto roboto

Recommended Posts

Hi all

After a long time of silent reading enjoyment here, now i feel the need make me an account and actualy write something for the first time.

Im in since 0.19 and more or less reading here for almost as long. Spent 500hours with the game, loving it to bits and this did not change with the recent 1.0.x crazyness going on. I dont mind most of the changes, and love the new aero as it is in a very different ball park compared to the old soup stuff... anyway

One thing really starts to get on my nerves. This game runs terribly!

Up untill recently, when i had my old rig which was beaten out of a stone with primitive tools i blamed the stoneage technology for the miserable performance and lived with the 10ish fps i got with most of the stuff i flew. But now i have a new rig, X99, 5820k@4.1ghz, gtx960(temporarily) and 16gigs of DDR4, sm951 for os, all shiny, runs witcher3 at 1080p on high with 55-60fps.

KSP on the other hand, while flying different S3 sstos with 150-190 parts, i still get BELOW 10fps on ascent. what the heck????? the cpu is not even throtteling above 3ghz (yes, it can and does go to 4.1) and lingers arund 10-30% load. not a single core is ever loaded above 30 while i play KSP.

Ive read a lot of people run the game with 250+ parts way above 30fps. I expected similar kinds of results with the new system. And am kinda upset that the game is labeled "done", i have a beasty machine and it still runs poorly. What could be wrong? Windowed mode? ... i dont know

Edited by Red Iron Crown
Link to comment
Share on other sites

So KSP is essentially physics thread throttled, your graphics card and your ram are not doing much (until you run into the 32bit memory wall). So if you are doing something that affects physics on a lot of parts it will bog down. I can launch a 450 part 1336ton vessel but I am getting about 12 FPS on an i5 2500K which is a 3.3Ghz processor.

Link to comment
Share on other sites

I think you will be pleased when 1.1 is released... thus far the versions of Unity that Kerbal has run on have been bottlenecked by not being able to utilize multiple cores for physics calculations... so as odd as it is, my older PC with a faster single core can actually run KSP better than my newer PC which is better in every way except for the fact that individual cores are running at a slightly slower clock speed. So... KSP logic is: 1x3.3ghz > 8x3.0ghz... even though most modern games will make use of multiple cores to provide increased performance.

BUT... The great news is that 1.1 will be moving to Unity 5 which will fully support multiple cores, and will also do away with the memory cap issue that will plague anyone attempting to run the current version of KSP with a plethora of mods simultaneously.

Edited by Justicier
Link to comment
Share on other sites

I think you will be pleased when 1.1 is released... thus far the versions of Unity that Kerbal has run on have been bottlenecked by not being able to utilize multiple cores for physics calculations... so as odd as it is, my older PC with a faster single core can actually run KSP better than my newer PC which is better in every way except for the fact that individual cores are running at a slightly slower clock speed. So... KSP logic is: 1x3.3ghz > 8x3.0ghz... even though most modern games will make use of multiple cores to provide increased performance.

BUT... The great news is that 1.1 will be moving to Unity 5 which will fully support multiple cores, and will also do away with the memory cap issue that will plague anyone attempting to run the current version of KSP with a plethora of mods simultaneously.

Take that with a grain of salt. They will finally be able to run the Unity editor in 64bit, they have said nothing about the game being 64bit for Windows and also the physics engine improvements offer some multi core optimisations but they can't get past having only single FPU and ships being tied to a core. So it should be better but it's not gonna bust the walls down.

Link to comment
Share on other sites

They will finally be able to run the Unity editor in 64bit, they have said nothing about the game being 64bit for Windows and also [...]

what has the topic to do with 64bit? As far as i know the Performance calculation is not faster or slower on 64bit...

its just said that more physic work can be offloaded to other threads.

- - - Updated - - -

Memory cap:

64bit Version on Windows cant get up above 8/9gb as well.

so it seems there is another Problem beside the 32/64bit Topic, which could have been fixed in a later Version of unity as well.

Edited by Speadge
Link to comment
Share on other sites

I can launch a 450 part 1336ton vessel but I am getting about 12 FPS on an i5 2500K which is a 3.3Ghz processor

exactly my point. i get this performance on a cpu that can run 4.1ghz (but doesnt!!!) with 150 parts. never tried 450 but i expect it to be hopeless. maybe next i will try to force it to 4.1 all the time and see what that does. but i see that as a pretty lame workaround. but i dont get how i5s can run the game with 450 parts the same way my 5820 can with 150.

KSP logic is: 1x3.3ghz > 8x3.0ghz... even though most modern games will make use of multiple cores to provide increased performance.

i am aware of this fact that many games like core clock over core ammount. i did spend a lot of thougt on this while planing my build. still i have the feeling that KSP is not even using one single core of the six to its full potential. it seems my cpu is never even loaded enough to throttle up to its 4.1 limit.... thats what i am wondering, if someone ever observed this and could work around it

Edited by fisto roboto
Link to comment
Share on other sites

A pity.

I think it would be smart to "offsource" all "background ships" to a different CPU (or a few), keeping the currently rendered ship (or group of ships, within 2.2km) unencumbered by orbital mechanics of probes near other planets etc. Keep the "visible game" on the current CPU but run all the rest of the universe off-loaded.

And if you can get 8GB exclusively for the game while keeping the rest of the OS elsewhere, that's not too bad as well.

Link to comment
Share on other sites

If the physx multihreading works in KSP 1.1 we should see some performance improvements. I'm not very optimistic on how well the unity 5 upgrade will happen on their first try.

Link to comment
Share on other sites

Well. I have the same problem. I don't know what version made the changes, but at some point I noticed that even rockets with relatively low part count would give me 10FPS on launch AND ingame time would be slowed down to at least 1/3. Ascent takes ages!

what has the topic to do with 64bit? As far as i know the Performance calculation is not faster or slower on 64bit...

its just said that more physic work can be offloaded to other threads.

I think you answered that yourself.

64bit/32bit matters, because 32bit can only adress 4GB of RAM. With windows running, that makes my game unplayable when KSP has about 3800MB. Also, KSP can only use a single CPU core. IF it could tap into the other cores it could surely run faster.

Why should 64bit win not use more than 8GB of RAM? Source?

Link to comment
Share on other sites

what has the topic to do with 64bit? As far as i know the Performance calculation is not faster or slower on 64bit...

its just said that more physic work can be offloaded to other threads.

- - - Updated - - -

Memory cap:

64bit Version on Windows cant get up above 8/9gb as well.

so it seems there is another Problem beside the 32/64bit Topic, which could have been fixed in a later Version of unity as well.

I was replying to Justicier about 64bit

- - - Updated - - -

exactly my point. i geht this performance on a cpu that can run 4.1ghz (but doesnt!!!) with 150 parts. never tried 450 but i expect it to be hopeless. maybe next i will try to force it to 4.1 all the time and see what that does. but i see that as a pretty lame workaround. but i dont get how i5s can run the game with 450 parts the same way my 5820 can with 150.

i am aware of this fact of that many games like core clock over core ammount. i did spend a lot of thougt on this while planing my build. still i have the feeling that KSP is not even using one single core of the six to its full potential. it seems my cpu is never even loaded enough to throttle up to its 4.1 limit.... thats what i am wondering, if someone ever observed this and could work around it

When I looked up your CPU it said 3.6Ghz topspeed, are you overclocking

- - - Updated - - -

Well. I have the same problem. I don't know what version made the changes, but at some point I noticed that even rockets with relatively low part count would give me 10FPS on launch AND ingame time would be slowed down to at least 1/3. Ascent takes ages!

I think you answered that yourself.

64bit/32bit matters, because 32bit can only adress 4GB of RAM. With windows running, that makes my game unplayable when KSP has about 3800MB. Also, KSP can only use a single CPU core. IF it could tap into the other cores it could surely run faster.

Why should 64bit win not use more than 8GB of RAM? Source?

The new aero and heating in 1.+ makes a huge difference to physics load.

Link to comment
Share on other sites

It sounds like you may be getting lower performance than you should but without some way of further diagnosing things there isn't a lot we can suggest.

How are you measuring the FPS?

Can you upload the craft file for this SSTO that gets less than 10 fps so some others can try it as a comparison?

Do you have any mods installed?

Can you upload logs etc as described in the relevant sticky threads in the support sub-forums?

The new aero and heating in 1.+ makes a huge difference to physics load.

Strictly speaking when people talk about "physics load" in KSP it is referring only to the Unity rigid body physics calculations. However, you are correct in saying that the new aero and heating mechanics have added a significant amount of extra cpu load.

Edited by Padishar
Link to comment
Share on other sites

Sounds like something is wrong. KSP is demanding enough that it should make your CPU ramp up the clockspeed to the maximum as soon as a vessel is loaded on the pad/runway (mine certainly does). I take it you have confirmed that automatic clockspeed adjustments are working in other single-threaded programs, like a benchmark?

As for the CPU load monitor showing a low percentage, that is normal and expected. KSP only utilizes one thread for physics, so when fully loaded on a six core processor total CPU load should be around 17% (and Windows will report that much on each core instead of showing 100% on one core).

Link to comment
Share on other sites

Why should 64bit win not use more than 8GB of RAM? Source?

i just havent experienced something like that before on Windows as it continously crashes when reaching this amount.

have seen others reporting that, too.

Edited by Speadge
Link to comment
Share on other sites

How are you measuring the FPS?

Can you upload the craft file for this SSTO that gets less than 10 fps so some others can try it as a comparison?

Do you have any mods installed?

Can you upload logs etc as described in the relevant sticky threads in the support sub-forums?

Steam fps. Confirmed by the feeling of a game runing laggy as hell. Maybe its a few fps more or less than steam is showing, but its quite noticable without the fps counter.

I can and will upload the craft as soon as i am home. What i can tell now, its a "low tech" S3 ssto with ramjets and mainsails, and at least 50% of the parts accounted for lifting and control surfaces. But that is actualy the point of it, building something as early as possible in the techtree with S3 lifting capability, that sacrifices efficiency (both partcount and probabyl hardware requirement) to make up for its low techyness. Anyhow, the last iteration of similar philosopy designs is 150parts (down from 190) without cargo. All have similar fps, no real difference between all of them.

No mods installed except for MJ.

Will upload the logs when i am home.

Edited by fisto roboto
Link to comment
Share on other sites

I notiice a lot of 'stuttering' since 1.0.3/1.0.4. Nowadays when I launch vessels the game thread comes to a complete stop every few seconds and then restarts again with 60 fps. You can also see it on the time indicator that always switches from green to yellow color every time the game stutters and comes to a halt. It was perfectly fine before as should be expected on a Core i7 with 3.7 GHz

Link to comment
Share on other sites

Sounds like something is wrong. KSP is demanding enough that it should make your CPU ramp up the clockspeed to the maximum as soon as a vessel is loaded on the pad/runway (mine certainly does). I take it you have confirmed that automatic clockspeed adjustments are working in other single-threaded programs, like a benchmark?

As for the CPU load monitor showing a low percentage, that is normal and expected. KSP only utilizes one thread for physics, so when fully loaded on a six core processor total CPU load should be around 17% (and Windows will report that much on each core instead of showing 100% on one core).

Never tried something single core/thread specific. But prime95 kicks the cpu up to 4.1 instantly. For single core load survailance i up untill now used the CAM software that came with my cpu all in one cooler. Actualy pretty helpful, but now that you mentioned the thing with the windows native monitor, im am not really sure if it represents single core load accurately. I will follow up on that. But what i am sure of is that cpuZ never shows the cpu at full speed with KSP, and that is a tool i trust.

Edited by fisto roboto
Link to comment
Share on other sites

Steam fps. Confirmed by the feeling of a game runing laggy as hell. Maybe its a few fps more or less than steam is showing, but its quite noticable without the fps counter.

I can and will upload the craft as soon as i am home. What i can tell now, its a "low tech" S3 ssto with ramjets and mainsails, and at least 50% of the parts accounted for lifting and control surfaces. But that is actualy the point of it, building something as early as possible in the techtree with S3 lifting capability, that sacrifices efficiency (both partcount and probabyl hardware requirement) to make up for its low techyness. Anyhow, the last iteration of similar philosopy designs is 150parts (down from 190) without cargo. All have similar fps, no real difference between all of them.

No mods installed except for MJ.

Will upload the logs when i am home.

I just looked at my Jool Grand Tour SSTO and with the two SSTO's inside it's like 145 parts, the 450 part vessel was a .90 Eve Mission with return lander you expect those sort of part counts, but an SSTO with ~200 parts, crazy.

Link to comment
Share on other sites

I just looked at my Jool Grand Tour SSTO and with the two SSTO's inside it's like 145 parts, the 450 part vessel was a .90 Eve Mission with return lander you expect those sort of part counts, but an SSTO with ~200 parts, crazy.

...yep, large wings made of lot of small S2 segments. Its my 4th play through the tech tree and with the new aero in i wanted to make something with S3 cargo bays as early as humanly possible. no access to large wings of any kind, all my buildings are still T2 except for the runway. thats the whole challange.

point is, that i do not see why an X99 cpu even with only one of its cores should not be able to run a 150part plane in least in the 20-30ies fps range

Link to comment
Share on other sites

...yep, large wings made of lot of small S2 segments. Its my 4th play through the tech tree and with the new aero in i wanted to make something with S3 cargo bays as early as humanly possible. no access to large wings of any kind, all my buildings are still T2 except for the runway. thats the whole challange.

point is, that i do not see why an X99 cpu even with only one of its cores should not be able to run a 150part plane in least in the 20-30ies fps range

x99 is your motherboard chipset for a Haswell Type E processor, of which you have a Core i7 5820k (k for unlocked), just letting you know, the Core i7 5820k is the important bit, your motherboard chipset is fairly irrelevant as long as it's correct for your CPU.

- - - Updated - - -

I'm guessing a lot of wings is probably the worst type of load you can have, it has to model the physics for each wing.

Link to comment
Share on other sites

x99 is your motherboard chipset for a Haswell Type E processor, of which you have a Core i7 5820k (k for unlocked), just letting you know, the Core i7 5820k is the important bit, your motherboard chipset is fairly irrelevant as long as it's correct for your CPU.

what i am sayin is that no matter what sits on the x99 board, it is not going to be slow by any standard, single or multi thead performance. and that i expect the game to run significantly better than on a phenom II x4. even with obscene amount of wing segments. which it does not.

Link to comment
Share on other sites

There is no question in my mind that performance has taken a major hit in the 1.0.x era. I've been playing since 0.15 and on (almost) the same machine (it's had new RAM and graphics since then, but same 3.0GHz i7 core) and I used to be able to build much larger craft than I can now. I'm fairly sure that the addition of the heat simulation is the culprit, not just during atmo ascent, but in space too (if every part has to calculate heat exchanges on each game cycle, that's a big overhead, even if there is little or no heat to be exchanged). In the past a 500-600 part craft was quite playable, now I find that 300 parts is around the limit (although some parts cause it to be worse than others).

There is some hope that unity 5 will help, but as selfish_meme points out multithreading isn't going to just boost everything. Processes can only be separated to different threads if they don't share common resources (ie: two threads can't update the same variable). So a single craft, perhaps all craft in the 2.2km range, will still have to be run on a single thread. At least calculations for other craft (out of range) should be able to run as a separate thread and therefore free up some time for the core running the focus craft.

Multithreading and (64bit further down the line) will help, but they really shouldn't be seen as the things that will make KSP run better. The game is badly in need of code optimization and some re-assessment of architectural choices and that needs to happen if KSP is going to perform well.

I notiice a lot of 'stuttering' since 1.0.3/1.0.4. Nowadays when I launch vessels the game thread comes to a complete stop every few seconds and then restarts again with 60 fps. You can also see it on the time indicator that always switches from green to yellow color every time the game stutters and comes to a halt. It was perfectly fine before as should be expected on a Core i7 with 3.7 GHz

This stutter problem is to do with the Garbage collector and I've been noticing it since 0.90.0. There are known limitations with unity's GC, unity5 might improve that a little bit, but fundamentally it needs to be solved by optimizations to KSP's code.

The stutter issue is almost non-existent in simple saves, 10-15 craft seem fine, but once you start having more craft in flight (and more debris) the problem gets steadily worse.

Here's a thread about the GC issue, but there isn't a solution there, just our attempts to understand it.

The stutter problem and the FPS problem are different issues, but both are serious issues and they badly need addressing. I don't think they will just go away with the unity5 upgrade (that may help a bit), I think that some serious code optimization needs to happen (and that is now the only improvement to KSP that I'm interested in).

Edited by katateochi
Link to comment
Share on other sites

There is no question in my mind that performance has taken a major hit in the 1.0.x era. I've been playing since 0.15 and on (almost) the same machine (it's had new RAM and graphics since then, but same 3.0GHz i7 core) and I used to be able to build much larger craft than I can now. I'm fairly sure that the addition of the heat simulation is the culprit, not just during atmo ascent, but in space too (if every part has to calculate heat exchanges on each game cycle, that's a big overhead, even if there is little or no heat to be exchanged). In the past a 500-600 part craft was quite playable, now I find that 300 parts is around the limit (although some parts cause it to be worse than others).

There is some hope that unity 5 will help, but as selfish_meme points out multithreading isn't going to just boost everything. Processes can only be separated to different threads if they don't share common resources (ie: two threads can't update the same variable). So a single craft, perhaps all craft in the 2.2km range, will still have to be run on a single thread. At least calculations for other craft (out of range) should be able to run as a separate thread and therefore free up some time for the core running the focus craft.

Multithreading and (64bit further down the line) will help, but they really shouldn't be seen as the things that will make KSP run better. The game is badly in need of code optimization and some re-assessment of architectural choices and that needs to happen if KSP is going to perform well.

This stutter problem is to do with the Garbage collector and I've been noticing it since 0.90.0. There are known limitations with unity's GC, unity5 might improve that a little bit, but fundamentally it needs to be solved by optimizations to KSP's code.

The stutter issue is almost non-existent in simple saves, 10-15 craft seem fine, but once you start having more craft in flight (and more debris) the problem gets steadily worse.

Here's a thread about the GC issue, but there isn't a solution there, just our attempts to understand it.

The stutter problem and the FPS problem are different issues, but both are serious issues and they badly need addressing. I don't think they will just go away with the unity5 upgrade (that may help a bit), I think that some serious code optimization needs to happen (and that is now the only improvement to KSP that I'm interested in).

I totally agree here. KSP performance has drastically worsened and Squad remain tight lipped on the issue. This is a major problem that needs fixing. As currently I can only see the game running slower and slower.

On the issue of GC stutter, two years ago when this issue raised it head I did a 30 second google search and discovered many other Unity devs with the same issue. they fixed it by using a third party UI program.

The stutter in Unity is caused by the UI GC. If Squad changed the UI the issue would most likely be resolved as others have done so successfully.

Link to comment
Share on other sites

Sounds like something is wrong.
Quoted for truth. There has been a lot of general discussion of KSP game performance but the fact is something is wrong with fisto roboto's system, as evidence by the processor not even reaching its top speed.

To fisto roboto, I can only really suggest the obvious. Redownload a clean copy of the game and test it with no mods at all, ensure that v-sync is turned off and the framerate limiter set to something appropriate. Beyond that the usual things like checking the system drivers, and making sure there isn't background software running interfering with the game. As Red Iron Crown suggested, you could test Prime95 running a single thread and see what happens. And be assured that the performance you are getting is far below what's normal and expected for that sort of hardware and therefore you can hopefully fix it.

Link to comment
Share on other sites

I totally agree here. KSP performance has drastically worsened and Squad remain tight lipped on the issue. This is a major problem that needs fixing. As currently I can only see the game running slower and slower.

On the issue of GC stutter, two years ago when this issue raised it head I did a 30 second google search and discovered many other Unity devs with the same issue. they fixed it by using a third party UI program.

The stutter in Unity is caused by the UI GC. If Squad changed the UI the issue would most likely be resolved as others have done so successfully.

They are reworking the whole UI for Unity 5 so we can hope it gets better.

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