Jump to content

CPU not maxed?


Diazo

Recommended Posts

Alright.

With the upper limit of ship size based on the number of parts people's computers can handle, I was looking to investigate what exactly the settings do (graphics/screen resolution/etc.) and see how each affects performance.

However, right off the bat I've run into an oddity and I don't know what to make of it.

I've grabbed the 600 part ship from the CPU Performance thread here: http://forum.kerbalspaceprogram.com/showthread.php/42877-CPU-Performance-Database

Launching it I see the expected low framerates in Kerbal but when I look at the Windows Task Manager none of my CPU cores are higher then about 60-70%.

Now, I have multiple cores that high and as Kerbal is single-threaded it should not be spreading itself across multiple cores like that so I'm now confused as to what my CPUs are doing.

Does anyone have any ideas what's happening? Kerbal is multi-core somehow? Task Manager is not showing the data correctly? Something else?

I'm hoping there's an idea or two out there.

Thanks,

D.

Link to comment
Share on other sites

What asmi said. The same is true for all modern OS.

It's also worth noting that Unity and KSP, are not single threaded - try looking while you have task manager open, you will see 20+.

It's the (apparently) single physics thread in Unity that seems to be the major limit on performance for large part count ships.

Link to comment
Share on other sites

Erm, I suppose I should have clarified that the physics is singled threaded in my opening post.

From other threads on the forum I understand that the physics thread is the vast majority of the load that KSP places on the CPU so I was expecting the CPU core running the physics thread to spike to 100% usage as that is where I expected the bottleneck slowing KSP down to be.

I then look at Task Manager and find no CPU core over 70% load and get confused.

I ran out of time to do more then that last night, but how do I even test this? KSP is giving me 7 FPS on launch, it's not like going from a 600 to a 1000 part ship will load my computer down more (I don't think?)

D.

(Double post I know, my previous post is in the moderation queue and I can't edit it.) --Magic

Alright, so the short answer is that the Windows Task Manager was lying to me.

The long answer is that while the physics thread is single core, Windows can move that thread from core to core as it sees fit so I probably will not see any CPU core hit 100%. The logging tools are not high resolution and a core hitting 90-100% is probably a cause for Windows to almost instantly move some of the load off that core to another core.

I can work with that I guess, I'll have my results up in a day or two.

D.

Link to comment
Share on other sites

Thanks for downloading my rocket. As the others said, the workload is spread across all cores. Even if you really were just running one thread, you wouldn't see one core at max with all of the others at or near zero. I'm sure there are lots of reasons for this, spreading the workload to ensure an even temperature is one, but it doesn't mean that anything is wrong, or that KSP isn't using as much of your CPU as possible (aside from the all of the Unity and PhysX limitations).

Link to comment
Share on other sites

There has been alot of disinformation about unity in these threads. Unity has afaik been multicore for quite some time but the problem is that there is no multicore/threads for the physics part, which is what is the biggest bottleneck for KSP.

And from my quick research many so called engines that have been suggested does not do it for physics either.

Link to comment
Share on other sites

I recently upgraded my system. I went from a 3.4 GHz Core2 Duo, old skool, to a nice shiny newest generation quad core i7, 3.2 GHz (technically a slower clock speed than my old chip). My FSB speed went from 1333Mhz to 1600Mhz. I kept my original graphics card and just moved it into my system, so nothing has changed there.

With the Core two duo, I too never maxed much more than 60-70% when my frame rates would plummet with bigger ships. My new i7 is not much different hovering around 50% (average between 4 cores, with one settling at less than 20%), with even larger ships. My point is, no matter how much lag I had in the past, I never maxed my CPU with either system. Also realize that KSP only uses one of the cores. Yet performance is MUCH better on my new i7. So it is puzzling. Might there be a difference because of L2, L3 cache, buss speed, DDR2 vs. DDR3, or maybe some inherent change in chip architecture?

I dont know, but I am just sayin' and agreein' that lag is not necessarily caused by lack of CPU clock speed.

Link to comment
Share on other sites

You can't really compare clock speed between different generations or families of processors (i7 is a little vague as well, there are are three generations of CPUs that use that name, not to mention mobile and the consumer level Xeon parts). Speeds for high-end CPUs have been around the 3-4 GHz mark for the past 5 or so years, but we have seen huge gains in performance. For Intel at least, each generation has seen somewhere around a 10-20% improvement in performance at the same clock speed, so it's not surprising that you see a big improvement with your new CPU.

You should also note that CPUs don't usually run at the advertised clock speed. Pretty much all CPUs from the past few years use some kind of dynamic boost based on the workload, temperature, power usage, etc... Your clock speed while playing KSP might actually be much higher than 3.2GHz (don't rely on task manager to figure out what it really is, it can be very far off).

Link to comment
Share on other sites

What I don't understand is the times that my game runs like a slideshow, but the game time hasn't gone in the red, and my CPU is only being 80% utilized.

If this truly is the case as you claim, it sounds like you're hitting the ceiling of your GPU's capabilities.

Another possibility would be that one or more system components is becoming overheated. Heat can cause lag for sure.

Are you playing this on a laptop by chance?

Link to comment
Share on other sites

My computer is an i5-2450, and had Intel TurboBoost installed....I noticed with it enabled, I have was having even MORE issues with lag and overheating with KSP. Its not meant for long term usage, its just a glorified overclocker, to give your computer a "quick" boost to make those times when your CPUs are working hard, to keep what programs you're doing running smooth.....Yeah, well, what if the application you're running is constantly pushing your CPU?...SO, IMHO, its pretty worthless, and with my laptop already having overheating issues to a bad case design, it highly likely it could be dangerous to the long-term health of my computer, so I uninstalled it...I would recommend anyone running it while playing KSP either disable it or uninstall it.

I also generally dont see my CPU going more than maybe 80% consistently...What is killing mine, is that for some reason my RAM doesnt seem to be utilized as much as it should be. I have 6GB (5.84G usable), but KSP will crash before my TOTAL usage even gets CLOSE to 4GB.....The error files always show 70-75% RAM usage when it crashes.And I KNOW, "KSP can only use up to 4GB before it crashes..."....Well, this is TOTAL, meaning the 1.3GB that Windows uses, which means KSP is crashing when it hits 2.5-2.7GB...SO why so short of the 4GB "limit"..??

Edited by Stone Blue
Link to comment
Share on other sites

I also generally dont see my CPU going more than maybe 80% consistently...What is killing mine, is that for some reason my RAM doesnt seem to be utilized as much as it should be. I have 6GB (5.84G usable), but KSP will crash before my TOTAL usage even gets CLOSE to 4GB.....The error files always show 70-75% RAM usage when it crashes.And I KNOW, "KSP can only use up to 4GB before it crashes..."....Well, this is TOTAL, meaning the 1.3GB that Windows uses, which means KSP is crashing when it hits 2.5-2.7GB...SO why so short of the 4GB "limit"..??

As another data point, I have a MacBook Pro with an i7-2635QM. KSP typically runs about 27 threads on my Mac, with the main process using up to around 52% of my CPU (which is about an 8th of my total processing power). When the main process hangs, its total memory is never more than 3.05 GB (my system has 8 GB installed).

Link to comment
Share on other sites

If this truly is the case as you claim, it sounds like you're hitting the ceiling of your GPU's capabilities.

Another possibility would be that one or more system components is becoming overheated. Heat can cause lag for sure.

Are you playing this on a laptop by chance?

It's not my GPU. It's also not heat, because my case has adequate airflow. It's a full-size tower that I built myself. I practice cable management, and blow it out with air regularly.

I suspect it may be that the Linux client (what I'm using) isn't utilizing resources efficiently (the game is in alpha, I completely understand). I haven't played the game using Windows client.

Link to comment
Share on other sites

Well, it looks the the CPU is being maxed out for a second before Windows swaps the core it's on as part of it's core management routine.

In task manager I forced KSP to use a single core only and then when I launched a ship that core was instantly maxed at 100% (and stayed there).

On the GPU use thing, I've found some interesting things in my investigations, but I feel those warrant a new thread so look for that shortly.

D.

Link to comment
Share on other sites

What I don't understand is the times that my game runs like a slideshow, but the game time hasn't gone in the red, and my CPU is only being 80% utilized.

Utilization of your CPU can be deceiving because of a couple of things. It is mentioned here in these forums a lot that Unity is using only one core at a time, so we can say that the game uses only 1 of your cores. This doesn't have to mean that you should see %100 utilization on 1 core and %10 on other cores. Load can be equally balanced by the scheduler, a single threaded application means that all applications whether they are independant or not, executed sequentially. So your CPU has to compute everything in the SEQUENTIAL order on any of your CORES.

Multithreaded applications are different and workload will be distributed among all other cores and INDEPENDANT computations will be running on any of your cores in ANY ORDER, because independancy guarantees that the order of computations will not cause a different result every time aka a race condition. So it doesn't matter if you see %80 or %60 or %10 on your core, your core has a certain frequency and computations have to be done sequentially. This can happen in any of your cores.

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