How to find out what uses most CPU Resources?

This forum is the ideal place for all discussion relating to X4. You will also find additional information from developers here.

Moderator: Moderators for English X Forum

IlikeThisgame
Posts: 26
Joined: Fri, 18. Apr 25, 19:32

How to find out what uses most CPU Resources?

Post by IlikeThisgame »

Hi there,
im pretty sure Egosoft has some way of finding out what uses most CPU time. (if not it would explain the game :lol: )

We users would also like that. So we could check where performance is lost.

Could you please provide a way for users like other games do it (Debug screen or something?)

Maybe its possible currently and no one knows?

PS: something like this:
https://forums.factorio.com/download/fi ... 2dd43b253f
Alan Phipps
Moderator (English)
Moderator (English)
Posts: 31737
Joined: Fri, 16. Apr 04, 19:21
x4

Re: How to find out what uses most CPU Resources?

Post by Alan Phipps »

Well there is linkage between fps and cpu availability to process the main game thread so situations where your fps drops markedly is probably where the main game cpu core is working hardest. Also the in-game fps counter now shows you information on the gpu VRAM usage too should that be useful to you.

I don't know if this system scores thread might be useful to you.
A dog has a master; a cat has domestic staff.
Raptor34
Posts: 3454
Joined: Sat, 12. Jun 10, 04:43
x4

Re: How to find out what uses most CPU Resources?

Post by Raptor34 »

Alan Phipps wrote: Wed, 23. Jul 25, 14:40 Well there is linkage between fps and cpu availability to process the main game thread so situations where your fps drops markedly is probably where the main game cpu core is working hardest. Also the in-game fps counter now shows you information on the gpu VRAM usage too should that be useful to you.

I don't know if this system scores thread might be useful to you.
I'm assuming they are looking for something like the old tests where someone tested adding ToA to a fresh game and they lost 10 fps, but you know, without needing to actually test it and there is some screen that shows you whats eating up your system resources.
jlehtone
Posts: 22506
Joined: Sat, 23. Apr 05, 21:42
x4

Re: How to find out what uses most CPU Resources?

Post by jlehtone »

There is "profiling" in program development. Dev builds special version of the binary and runs "normal load". The binary writes statistics out and profiling tools present them linked to the parts of code. Thing is that collecting/writing statistics is additional instructions, overhead that you don't want in the production version. Furthermore, the data requires source code to be informative. That is indeed a job for the devs (only).
Goner Pancake Protector X
Insanity included at no extra charge.
There is no Box. I am the sand.
User avatar
TruePikachu
Posts: 70
Joined: Tue, 3. Mar 15, 01:51
x4

Re: How to find out what uses most CPU Resources?

Post by TruePikachu »

If the actual main loop is currently broken up into distinct stages, it should be possible to add instrumentation for those distinct stages with only a negligible performance impact, but it would only give a rough idea of where the bottleneck is. See, for example, Factorio's advanced timing overlay and Dyson Sphere Program's profiler.

EDIT: Didn't notice that OP linked a screenshot of the advanced timing overlay.
Unless otherwise stated, statements I make about the core game are surmised from observation of behavior.
IlikeThisgame
Posts: 26
Joined: Fri, 18. Apr 25, 19:32

Re: How to find out what uses most CPU Resources?

Post by IlikeThisgame »

the question is not if its doable. Because many game have that. Its not new or crazy to ask for.

Its very usefull to find out how to make the performance better, like if you want to change the game via mods.

.....I dont need to think about to reduce ships when the actual culprit is something complete different. Just look at that screenshot. Even a complete noob can find out which mod causes lag or not.
CBJ
EGOSOFT
EGOSOFT
Posts: 54187
Joined: Tue, 29. Apr 03, 00:56
x4

Re: How to find out what uses most CPU Resources?

Post by CBJ »

Mods can change all kinds of different things in X4, and there is no way to isolate the performance impact of those changes. So no, not possible.
Raptor34
Posts: 3454
Joined: Sat, 12. Jun 10, 04:43
x4

Re: How to find out what uses most CPU Resources?

Post by Raptor34 »

CBJ wrote: Thu, 24. Jul 25, 16:14 Mods can change all kinds of different things in X4, and there is no way to isolate the performance impact of those changes. So no, not possible.
Mods are irrelevant though.
Like for example say I have 2 identical stations. But one uses L ships and the other uses M ships. If both performs good enough for my purposes, then being able to see whether they have substantially different performance impacts on my system would help inform my future plans.
Or like say mega stations vs. smaller stations. It's known that mega stations have substantial IS performance impacts. But is that also true if they remain in the background? Does a megastation have a higher performance impact in the background compared to distributed stations and the legions of traders they need?
CBJ
EGOSOFT
EGOSOFT
Posts: 54187
Joined: Tue, 29. Apr 03, 00:56
x4

Re: How to find out what uses most CPU Resources?

Post by CBJ »

Again, we cannot single out the performance impact of a station. A huge range of different parts of the game may be affected by its presence, and we cannot isolate it and give you a simple number to represent that object.
vvvvvvvv
Posts: 1245
Joined: Tue, 28. Nov 23, 15:38
x4

Re: How to find out what uses most CPU Resources?

Post by vvvvvvvv »

CBJ wrote: Thu, 24. Jul 25, 16:31 Again, we cannot single out the performance impact of a station. A huge range of different parts of the game may be affected by its presence, and we cannot isolate it and give you a simple number to represent that object.
You can single out high level subroutines. Like physics pass, universe sim, rendering, etc. Dyson Sphere and Factorio had fairly detailed stats, though I don't have a screenshot ready at hand.
CBJ
EGOSOFT
EGOSOFT
Posts: 54187
Joined: Tue, 29. Apr 03, 00:56
x4

Re: How to find out what uses most CPU Resources?

Post by CBJ »

We can and do do those things. But they are not useful to players, because they don't break things down in a way that can meaningfully be acted upon without access to source code.
Raptor34
Posts: 3454
Joined: Sat, 12. Jun 10, 04:43
x4

Re: How to find out what uses most CPU Resources?

Post by Raptor34 »

CBJ wrote: Thu, 24. Jul 25, 16:31 Again, we cannot single out the performance impact of a station. A huge range of different parts of the game may be affected by its presence, and we cannot isolate it and give you a simple number to represent that object.
Otoh, considering how isolationist VIG is and how their fighter swarms are basically just buzzing around affecting nothing most of the time, we do see people report performance gains from eliminating them, which if true shows that effect on the rest of the game aside, the assets themselves already have substantial performance impacts. Having access to that info is already very helpful even without taking into account their other impacts.
Which considering the scale players build at, is highly unlikely to be significant anyway. And besides, whatever else it impacts, it's not like the player not doing anything magically causes the factions to also not do anything.

Or for another example. Let's say if a megastation uses 1000MB of resources, but I can split it up into 10 stations that uses 10MB each, but the logistics network of ships I use to keep them supplying themselves uses 1500MB of resources anyway, because they need to search for trades because we do not have the ability to setup logistic routes, then it's clear that if I want my background to run better, I should as well built a single megastation instead.
User avatar
TruePikachu
Posts: 70
Joined: Tue, 3. Mar 15, 01:51
x4

Re: How to find out what uses most CPU Resources?

Post by TruePikachu »

Raptor34 wrote: Thu, 24. Jul 25, 17:31 Otoh, considering how isolationist VIG is and how their fighter swarms are basically just buzzing around affecting nothing most of the time, we do see people report performance gains from eliminating them
Just as a sidenote, this has recently been confirmed as a bug (to some extent at least) and should be fixed... I'm not sure if it's in the beta, but it'll be in 8.00 IIRC.
CBJ wrote: Thu, 24. Jul 25, 17:16 We can and do do those things. But they are not useful to players, because they don't break things down in a way that can meaningfully be acted upon without access to source code.
While I don't 100% agree with the statement (mainly because some players will figure out how to act on the numbers), I do agree with the general sentiment behind it; numbers which are meaningless from a functional perspective can be worse than no numbers at all. Additionally, for public versions of the game at least, it's almost certainly not going to be practical to add time instrumentation at a level that a player could directly act on, just because of things like entity update order probably not matching universe structure and how expensive querying high-performance timers can be.
Unless otherwise stated, statements I make about the core game are surmised from observation of behavior.
Raptor34
Posts: 3454
Joined: Sat, 12. Jun 10, 04:43
x4

Re: How to find out what uses most CPU Resources?

Post by Raptor34 »

TruePikachu wrote: Thu, 24. Jul 25, 21:45
Raptor34 wrote: Thu, 24. Jul 25, 17:31 Otoh, considering how isolationist VIG is and how their fighter swarms are basically just buzzing around affecting nothing most of the time, we do see people report performance gains from eliminating them
Just as a sidenote, this has recently been confirmed as a bug (to some extent at least) and should be fixed... I'm not sure if it's in the beta, but it'll be in 8.00 IIRC.
If I remember right, what was confirmed was them clumping up in big groups from the remnant of raiding parties. I did not notice them specifically mentioning that the large numbers fielded is a bug. Since that would mean there is an issue with the job system and that there are more ships than jobs.
So I'll be skeptical until we see what the fix actually entails. I figure it just means more smaller swarms but still the same number of total ships.
CBJ
EGOSOFT
EGOSOFT
Posts: 54187
Joined: Tue, 29. Apr 03, 00:56
x4

Re: How to find out what uses most CPU Resources?

Post by CBJ »

It seems you didn't actually read the release notes. ;)
The release notes for 8.00 Public Beta wrote: Thu, 6. Dec 18, 17:49 • [Beta 2] Fixed Vigor Syndicate accumulating excessive number of ships over time.
Raptor34
Posts: 3454
Joined: Sat, 12. Jun 10, 04:43
x4

Re: How to find out what uses most CPU Resources?

Post by Raptor34 »

CBJ wrote: Thu, 24. Jul 25, 23:56 It seems you didn't actually read the release notes. ;)
The release notes for 8.00 Public Beta wrote: Thu, 6. Dec 18, 17:49 • [Beta 2] Fixed Vigor Syndicate accumulating excessive number of ships over time.
Good to know. Thanks.
Hoping for some improvement then.

Return to “X4: Foundations”