[Bug X4 3.10] Poor performance on high spec pc. [RESOLVED]

Ask here if you experience technical problems with X4: Foundations.

Moderator: Moderators for English X Forum

sokaris415
Posts: 6
Joined: Thu, 6. Dec 18, 17:01
x4

[Bug X4 3.10] Poor performance on high spec pc. [RESOLVED]

Post by sokaris415 »

Game version: X4 Split Vendetta 3.10
Mods: None
Game start: Merchant
DxDiag: https://pastebin.com/HbNEnuKJ

System specs:

(I know all this is in my DxDiag but eh, thought it couldn't hurt to put it here too.)
Cpu: i9 9900hk
Gpu: Nvidia RTX 2080ti
Ram: 32gb

Game Graphics settings:
Vsync off, Ultra preset @ 4k borderless window.


Description of issue: I'm getting very poor performance in game, even when just idle my fps can drop to low 20's. This issue persists even when i drop my graphics settings or screen resolution down to 1080p. The game I've got going has about 4days 10hours of playtime. I've noticed while having my task manager open on my 2nd screen that the game isn't using all of my system resources at all, It's using 20%~ of my CPU and 20~40% of my GPU, after some troubleshooting I've noticed that the game is using my 6th CPU core to 100% and barely touching any of the other cores, If I disable the games access to my 6th core using set affinity, the high usage shifts to my 8th core. It seems that this is what's causing my game to run slow as it seems that the game is waiting for work to be finished on that core slowing down my overall performance massively and at times making things unresponsive and the game very hard to play. I've done all of the tricks when it comes to disabling map options and filters and while that did help a little, i think that's just making the issue rather than tackling it head on.

Using process explorer I've looked at the games threads and attempted to find any possible culprit for the bottleneck, the Thread ID of the most likely one is:
7632 - Start Address: X4.exe!xmlUCSlsCat+0x2doc74 (using 3x the cpu time as the next highest.)

7632 is using over a third of the games total CPU time.

Though, after writing this I just thought there's a good chance that the Thread ID's will change per system :/ as tbh I've never tried to look into this before, I'm just attempting to find as much info as I can to assist in finding the bug.)


I'm happy to give a copy of my save game file if someone is able to suggest a way for me to do so.

If someone wants to add me to steam to attempt to troubleshoot this, I'm more than happy to try and track down the bug with someones help.
https://steamcommunity.com/id/Sokari/

*edit*
forgot to mention, SETA causes the fps to drop to 10-20, pausing the game gives me perfect FPS.

*edit 2*
Adding save game file: https://drive.google.com/open?id=1UvH3z ... YF6PBk3-qa



FIX: It was been caused by the NPC ships around my station, so all I had to do was go far away from them. In the future I'll likely try to build fewer docks on my stations to keep the numbers down. Heh, I didn't want to leave my stations due to the low fps as it'd be more dangerous and it turns out they were causing it lol.
Last edited by sokaris415 on Sat, 25. Apr 20, 12:56, edited 2 times in total.
Raevyan
Posts: 1463
Joined: Sat, 4. Oct 08, 17:35
x4

Re: [Bug X4 3.10] Poor performance on high spec pc.

Post by Raevyan »

When I saw it correctly you are running an old driver released in August 2019. Try updating Nvidia driver. Did the same today and noticed better performance. You could also try the Beta Vulkan drivers. I heared they might give better performance than the normal ones.
sokaris415
Posts: 6
Joined: Thu, 6. Dec 18, 17:01
x4

Re: [Bug X4 3.10] Poor performance on high spec pc.

Post by sokaris415 »

I'll give it a go as I've nothing to lose hah. I still think it's mostly a CPU issue though. It seems one aspect of the games simulation has gotten out of hand and is causing the core of my cpu that handles that to be overloaded as when the game is paused the demand on the one core goes back to normal levels and my FPS recovers completely or if i turn on SETA my FPS drops drastically as X4 seems to be waiting on that core to finish its work before it'll draw the next frame.

*edit*
Just updated to the newest drivers & there's no noticeable improvement. Thanks for the suggestion though hah I’d have loved it if that was the cause.
Artean
Posts: 1120
Joined: Tue, 14. Feb 06, 17:41
x4

Re: [Bug X4 3.10] Poor performance on high spec pc.

Post by Artean »

sokaris415 wrote: Sat, 25. Apr 20, 04:39It seems one aspect of the games simulation has gotten out of hand and is causing the core of my cpu that handles that to be overloaded as when the game is paused the demand on the one core goes back to normal levels and my FPS recovers completely or if i turn on SETA my FPS drops drastically as X4 seems to be waiting on that core to finish its work before it'll draw the next frame.
Have you tried to start a new game just for comparison?
"In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move." - D.N.A
sokaris415
Posts: 6
Joined: Thu, 6. Dec 18, 17:01
x4

Re: [Bug X4 3.10] Poor performance on high spec pc.

Post by sokaris415 »

The load distribution across the cores is uneven, but my GPU is able to hit full utilisation & fps is perfect, over 60fps 100% of the time. (80-90fps.)

Here's a print screen of my task manager during gameplay (after letting it run for a few minutes.)

https://imgur.com/a/ehYiNk3

The image on the left, the one core is maxed out and my gpu is only at around 40% usage as I'm assuming it's having to wait on the one cpu core, the image on the right is the new game where I'm able to achieve perfect FPS and my card is being fully utilised (the dip at the end is due to me tabbing out to take the screenshot hah.)

The distribution of the X4 workload is kinda...chaotic hah. Pretty much half of my cores aren't doing much. (HT related issue?)
CBJ
EGOSOFT
EGOSOFT
Posts: 54272
Joined: Tue, 29. Apr 03, 00:56
x4

Re: [Bug X4 3.10] Poor performance on high spec pc.

Post by CBJ »

What you are seeing in terms of core usage is normal. The game does not, and cannot, distribute load across that many cores evenly. It has two primary threads, which will load two cores fairly heavily, and can use as many other cores as are available to distribute various secondary tasks. I've made various posts explaining the reasons for this in the past, which you're welcome to find and read if you're curious, but I won't waste time repeating it here because it won't affect your current situation. :)

In general performance will be slower on stations, because of the additional workload involved in dealing with the NPCs, complex sound environment, and so on. However, on some people's PCs this seems to be exaggerated by other factors, for example issues with NVIDIA sound drivers struggling to handle that sound environment. Similarly, performance will also tend to slow down in games where the player has built large numbers of stations and ships, because of the overhead of running the AI for those. We are always looking for ways to improve this, but ultimately if you give the game more to do then it will obviously not be able to do it as quickly. SETA is another prime example; if you accelerate game time, then you are asking the game to process more actions per second, and the framerate will drop.

Having said all of the above, there may well be ways to improve things for you.

1. Make sure you're using a sound device that can handle the station environments (on-board Realtek drivers seem to be the most reliable for this).
2. Building extremely large stations, or many stations in a single sector, will tend to slow things down a little more than spreading them out.
3. If you find performance on the map is a particular issue, then adjusting the filters will almost certainly improve things for you there.
4. If you're running the game on an SSD, make sure you're not using tools such as Magician and Rapid mode as these can cause stutter.
5. Running SETA is always going to reduce framerates no matter what you do.
sokaris415
Posts: 6
Joined: Thu, 6. Dec 18, 17:01
x4

Re: [Bug X4 3.10] Poor performance on high spec pc.

Post by sokaris415 »

One of the things I'm wondering is if one of the AI factions has built up an unusual number of units / stations over the run of the game, Is there a way for me to see all sectors fully? The reason I think this is that I've only got 2 stations of my own and a small sized number of ships. The fps issues I've been having aren't while on stations, most of the time It's just me idleing with seta on nearish to one of my two stations. (They're also both more of a medium size?)

I own 33 ships and two space stations.

station 1 has 61 sections including connectors
station 2 has 76 including connectors.

Performance wise, roughly what should I be trying to limit my stations to size wise?

Also, thank you to everyone that's posted in here trying to help, it's very much appreciated! I would've liked to have avoided restarting my game although it's starting to seem like I may have to.
CBJ
EGOSOFT
EGOSOFT
Posts: 54272
Joined: Tue, 29. Apr 03, 00:56
x4

Re: [Bug X4 3.10] Poor performance on high spec pc.

Post by CBJ »

Those station sizes seem fine, and the number of ships seems OK too. The AI doesn't usually build too many stations (there were some issues with this in earlier versions but they were resolved) so that shouldn't be a problem. There was also a similar issue with modified games and the Split Vendetta expansion but that won't affect you unless your game is modified. Being close to a station is pretty much the same as being on it, because the NPCs are created as soon as you get close. And as I said, SETA will slow things down a lot, so disengaging that should help.
sokaris415
Posts: 6
Joined: Thu, 6. Dec 18, 17:01
x4

Re: [Bug X4 3.10] Poor performance on high spec pc.

Post by sokaris415 »

After flying a good distance away from the stations I'm now getting 80+fps even with SETA active, thanks a bunch for that tip! I'll mark this as resolved and edit my first post to reflect this.

I was wondering is there any way for me to disable the NPC ships that spawn and fly around the stations? heh they seem to cause a pretty substantial performance hit. (could the way I've positioned my docks have increased this somehow? I'm unsure if each of those ships is having to path around my structures at all.)

but in any case, thanks for the info and saving my save file.

*edit*
I would like to ask though, is the sim speed FPS dependant? Or can X4 maintain a good sim speed with bad fps? Guessing it'll be linked directly to fps though?
CBJ
EGOSOFT
EGOSOFT
Posts: 54272
Joined: Tue, 29. Apr 03, 00:56
x4

Re: [Bug X4 3.10] Poor performance on high spec pc. [RESOLVED]

Post by CBJ »

Simulation speed is not directly linked to FPS, but there are limits, because otherwise SETA would become exponentially slower. :)
sokaris415
Posts: 6
Joined: Thu, 6. Dec 18, 17:01
x4

Re: [Bug X4 3.10] Poor performance on high spec pc. [RESOLVED]

Post by sokaris415 »

That's what i was hoping you'd say, thank you.
Mr.Freud
Posts: 325
Joined: Sat, 16. Nov 13, 20:20
x4

Re: [Bug X4 3.10] Poor performance on high spec pc. [RESOLVED]

Post by Mr.Freud »

CBJ wrote: Sat, 25. Apr 20, 13:46 Simulation speed is not directly linked to FPS, but there are limits, because otherwise SETA would become exponentially slower. :)
whats the minimum fps required to have full simulation experience? is 60 enough? how much would be the difference between 60 and 120 fps? also would it be possible in future to make those main threads use additional cpu cores/threads?
CBJ
EGOSOFT
EGOSOFT
Posts: 54272
Joined: Tue, 29. Apr 03, 00:56
x4

Re: [Bug X4 3.10] Poor performance on high spec pc. [RESOLVED]

Post by CBJ »

I think you might have misunderstood. The full simulation runs all the time. What changes is that if the framerate drops below a certain level, the passage of in-game time starts to slow down too. This doesn't affect what's simulated, and it generally only happens when SETA is running.

As I said above, I've explained the threading situation in a number of discussions before, and Tech Support isn't the place to repeat that. The quick answer is that we are always looking for ways to improve performance, but fundamentally splitting up the simulation part of it is all-but-impossible because of the deep and complex interaction between objects in the game universe.
Mr.Freud
Posts: 325
Joined: Sat, 16. Nov 13, 20:20
x4

Re: [Bug X4 3.10] Poor performance on high spec pc. [RESOLVED]

Post by Mr.Freud »

thank you

Return to “X4: Foundations - Technical Support”