X4 Performance Troubleshooting Suggestions

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

Moderator: Moderators for English X Forum

Gavrushka
Posts: 8072
Joined: Fri, 26. Mar 04, 19:28
x4

Re: X4 Performance Troubleshooting Suggestions

Post by Gavrushka » Tue, 8. Sep 20, 09:12

Just a silly question which, after reading this thread, I'm still not sure whether impacts the performance of my game. - I use a mechanical hard drive, and accept that leads to slow load and save times, but does it also impact the performance in-game? I guess gubbins must be loaded from the disc at some point, but if there is an impact, how big is it?

And as I'm due to replace my PC (8th generation I7 8700) with a 10th generation I9, what is the likely bottleneck I need to watch out for in speccing such a system? (I intend to buy from Palicomp.)

I'm not sure whether this is the right place to post, but I'm reckoning it's a technical question, and I could sure do with a little support.
“Man, my poor head is battered,” Ed said.

“That explains its unusual shape,” Styanar said, grinning openly now. “Although it does little to illuminate just why your jowls are so flaccid or why you have quite so many chins.”

“I…” Had she just called him fat? “I am just a different species, that’s all.”

“Well nature sure does have a sense of humour then,” Styanar said. “Shall we go inside? It’d not be a good idea for me to be spotted by others.”

CBJ
EGOSOFT
EGOSOFT
Posts: 51725
Joined: Tue, 29. Apr 03, 00:56
x4

Re: X4 Performance Troubleshooting Suggestions

Post by CBJ » Tue, 8. Sep 20, 10:15

Gavrushka wrote:
Tue, 8. Sep 20, 09:12
Just a silly question which, after reading this thread, I'm still not sure whether impacts the performance of my game. - I use a mechanical hard drive, and accept that leads to slow load and save times, but does it also impact the performance in-game? I guess gubbins must be loaded from the disc at some point, but if there is an impact, how big is it?
It shouldn't affect performance in general, but it may mean the occasional stutter and/or assets "popping" in occasionally, especially when you enter a new area. Note that we're working on improvements that should reduce the latter.
Gavrushka wrote:
Tue, 8. Sep 20, 09:12
And as I'm due to replace my PC (8th generation I7 8700) with a 10th generation I9, what is the likely bottleneck I need to watch out for in speccing such a system? (I intend to buy from Palicomp.)

I'm not sure whether this is the right place to post, but I'm reckoning it's a technical question, and I could sure do with a little support.
It's not; hardware recommendations belong in the off-topic forum. But as a simple answer, raw CPU core speed is more important than number of cores, and it should be paired with fast memory if possible.

BloodHunter2004
Posts: 407
Joined: Mon, 18. Oct 04, 16:18
x4

Re: X4 Performance Troubleshooting Suggestions

Post by BloodHunter2004 » Sat, 10. Oct 20, 17:46

Imperial Good wrote:
Fri, 21. Aug 20, 20:18
It has already been proven that memory speed is a lot more important than clock speed when it comes to X4 on modern CPU architectures.
I am wondering if there are any hard facts / benchmarks for this statement? Currently I have a Ryzen 3600xt with 64gb DDR4-3200 CL16 and wondering how much more performance i could get out of faster ram with better timings? The map is quite laggy when a lot is going on.

Imperial Good
Moderator (English)
Moderator (English)
Posts: 4743
Joined: Fri, 21. Dec 18, 18:23
x4

Re: X4 Performance Troubleshooting Suggestions

Post by Imperial Good » Sun, 11. Oct 20, 00:24

Gavrushka wrote:
Tue, 8. Sep 20, 09:12
Just a silly question which, after reading this thread, I'm still not sure whether impacts the performance of my game. - I use a mechanical hard drive, and accept that leads to slow load and save times, but does it also impact the performance in-game? I guess gubbins must be loaded from the disc at some point, but if there is an impact, how big is it?
SSD does not make much of a difference with save/load times. Most of the difference is with frame rate consistency and pop-in due to shorter asset stalls. Most noticeable when entering sectors at a high speed (when game cannot pre-load) and when teleporting.

This aspect might see improvement in future versions. However some of these benefits may be more significant on SSD based systems.
BloodHunter2004 wrote:
Sat, 10. Oct 20, 17:46
ondering if there are any hard facts / benchmarks for this statement? Currently I have a Ryzen 3600xt with 64gb DDR4-3200 CL16 and wondering how much more performance i could get out of faster ram with better timings? The map is quite laggy when a lot is going on.
People have posted their frame rates of the same scene at various memory settings. Most of the tests were done on Intel which showed timings and memory speed mattered a lot more than overclocking core clocks. I recall some were also done with Zen2 CPUs (Ryzen 3000 series desktop) showing similar gains from tightened memory timings after using Ryzen DRAM calculator. In any case the performance between a Ryzen 5 3600 and Ryzen 9 3950X will be small and dominated by memory performance.

If you already have memory it is not worth getting new memory as you will be paying full price for a smallish differential gain. This is more something for people making new build systems to consider since a little more or a correct choice at the same price could yield a few more percent performance.

Gavrushka
Posts: 8072
Joined: Fri, 26. Mar 04, 19:28
x4

Re: X4 Performance Troubleshooting Suggestions

Post by Gavrushka » Sun, 11. Oct 20, 08:17

Imperial Good wrote:
Sun, 11. Oct 20, 00:24
Gavrushka wrote:
Tue, 8. Sep 20, 09:12
Just a silly question which, after reading this thread, I'm still not sure whether impacts the performance of my game. - I use a mechanical hard drive, and accept that leads to slow load and save times, but does it also impact the performance in-game? I guess gubbins must be loaded from the disc at some point, but if there is an impact, how big is it?
SSD does not make much of a difference with save/load times. Most of the difference is with frame rate consistency and pop-in due to shorter asset stalls. Most noticeable when entering sectors at a high speed (when game cannot pre-load) and when teleporting.

This aspect might see improvement in future versions. However some of these benefits may be more significant on SSD based systems.
Teleporting does cause me a 3-5 second grumble, but that's something I've always expected. - Is there also an 'asset stall' when approaching stations, as that is a far more pervasive and irritating stutter? Even though I'd reported the issue many times back in the early days, I don't recall it ever being answered definitively? (I remember there were performance issues around using GPU sound facilities, and made the suggested changes, but the problem has always been there when approaching to dock.)
“Man, my poor head is battered,” Ed said.

“That explains its unusual shape,” Styanar said, grinning openly now. “Although it does little to illuminate just why your jowls are so flaccid or why you have quite so many chins.”

“I…” Had she just called him fat? “I am just a different species, that’s all.”

“Well nature sure does have a sense of humour then,” Styanar said. “Shall we go inside? It’d not be a good idea for me to be spotted by others.”

Imperial Good
Moderator (English)
Moderator (English)
Posts: 4743
Joined: Fri, 21. Dec 18, 18:23
x4

Re: X4 Performance Troubleshooting Suggestions

Post by Imperial Good » Sun, 11. Oct 20, 12:14

Gavrushka wrote:
Sun, 11. Oct 20, 08:17
Is there also an 'asset stall' when approaching stations, as that is a far more pervasive and irritating stutter? Even though I'd reported the issue many times back in the early days, I don't recall it ever being answered definitively?
From my own personal experience playing with a HDD there were asset stalls and pop-in pretty much all the time when flying around. Especially at faster speeds since there is less times for assets to be loaded. Moving to a SATA SSD removed a lot of these stalls. Moving from SATA to PCIe SSD did not yield a perceptual benefit.

For conformation it is possible to measure when assets get loaded. By monitoring/logging HDD I/O activity it is possible to see when X4 is issuing a lot of reads to the underlying drive. If the drive is the boot drive of the system there will likely be other reads and writes from other applications and the operating system. Whenever X4 is loading assets, it will show improved performance if loading from a SSD instead of HDD. This improved performance could manifest as either quicker pop-in of assets, or as more consistent frame rates.

X4's data archives are not subject to OS file caching. I am unsure of the exact reasoning behind forcing this behaviour however it does mean that it is not possible to improve HDD I/O performance by using more main memory to file cache parts of the data archive files.

Skeeter
Posts: 3664
Joined: Thu, 9. Jan 03, 19:47
x3

Re: X4 Performance Troubleshooting Suggestions

Post by Skeeter » Mon, 12. Oct 20, 08:34

Or possible use a ram drive and put the whole game in ram or if you have a new 3090 nvidia card you might be able to fit x4 in its vram like someone said they did with erm crysis 3 i think which i didnt know you could put a game in a gpu vram till i read the article about it on https://www.dsogaming.com/news/someone- ... e-rtx3090/

Be interesting to see the results.
[ external image ]
7600x cpu 5.4ghz 32gb DDR5 5600mhz 6700XT 32" 1440p mon

Imperial Good
Moderator (English)
Moderator (English)
Posts: 4743
Joined: Fri, 21. Dec 18, 18:23
x4

Re: X4 Performance Troubleshooting Suggestions

Post by Imperial Good » Sat, 17. Oct 20, 00:53

Skeeter wrote:
Mon, 12. Oct 20, 08:34
or if you have a new 3090 nvidia card you might be able to fit x4 in its vram like someone said they did with erm crysis 3 i think which i didnt know you could put a game in a gpu vram till i read the article about it on
Possibly slower than a normal RAM drive since normally RAM memory has higher bandwidth than PCIe 4.0.

SirNukes
Posts: 546
Joined: Sat, 31. Mar 07, 23:44
x4

Re: X4 Performance Troubleshooting Suggestions

Post by SirNukes » Sat, 17. Oct 20, 04:18

Imperial Good wrote:
Sun, 11. Oct 20, 12:14
X4's data archives are not subject to OS file caching. I am unsure of the exact reasoning behind forcing this behaviour however it does mean that it is not possible to improve HDD I/O performance by using more main memory to file cache parts of the data archive files.
When I tested out enabling os file caching in X4 (by editing the file load args in the exe), the result was basically no change in load times outside margin of error, compared to loading off a sata ssd. I figure X4 is like many other games, and mostly limited by cpu time to decompress the files, compile shaders, etc.

Imperial Good
Moderator (English)
Moderator (English)
Posts: 4743
Joined: Fri, 21. Dec 18, 18:23
x4

Re: X4 Performance Troubleshooting Suggestions

Post by Imperial Good » Sat, 17. Oct 20, 18:52

SirNukes wrote:
Sat, 17. Oct 20, 04:18
When I tested out enabling os file caching in X4 (by editing the file load args in the exe), the result was basically no change in load times outside margin of error, compared to loading off a sata ssd. I figure X4 is like many other games, and mostly limited by cpu time to decompress the files, compile shaders, etc.
The benefit would be for HDD users with a lot of/excessive memory as some of the I/O calls may return cached results rather than needing to perform physical I/O with the drive. Especially if the user restarts X4 forcing it to reload everything or for small files which might share a sector in the data archive with other small files (not sure, depends on archive structure).

However if you have a SSD the difference in I/O performance is minimal as SSDs are fast enough that data processing or I/O overhead starts to dominate the load times.

Juravian
Posts: 13
Joined: Mon, 14. Nov 05, 21:26
x3

Re: X4 Performance Troubleshooting Suggestions

Post by Juravian » Tue, 30. Mar 21, 14:58

I tried much of what has been suggested here, but still have massive lag spikes in the late game. I'm talking about the game freezing for 10-20 seconds every few minutes.

I'm running a top of the line machine:

Intel-I9
GEForce RTX 2080 Super
32 GB RAM
1 TB SSD as C: drive and 1 TB SATA as D: drive

I disabled all unneeded services
I ran Malwarebytes to be sure there is no malware
CPU RAM and GPU are lightly overclocked for good performance and minimal Thermal uptake

I noticed it is much worse when running SETA in game, but it also does it out of SETA as well.

CBJ
EGOSOFT
EGOSOFT
Posts: 51725
Joined: Tue, 29. Apr 03, 00:56
x4

Re: X4 Performance Troubleshooting Suggestions

Post by CBJ » Tue, 30. Mar 21, 15:07

It's not really going to be possible for us to offer relevant advice without more information. Please provide a full DXDiag and vulkaninfo as requested at the top of the forum, rather than just a few summary lines about your system. Please also indicate whether or not your game is modified, and if not then a savegame might also help. Other things on your PC that may be running in the background could also be relevant.

One thing that might be relevant in the meantime: there have been a few people reporting performance issues when they have a lot of subordinate miners set up. Their symptoms don't sound entirely like yours (the pauses are shorter and more frequent) but maybe if you have a very extreme in-game setup, it could be relevant.

User avatar
Old Drullo321
Posts: 1032
Joined: Sat, 7. Feb 04, 16:01
x4

Re: X4 Performance Troubleshooting Suggestions

Post by Old Drullo321 » Fri, 2. Apr 21, 03:19

In addition to CBJ provided informations please make sure, that you can exclude external issues, either by hard- or software. A virus and/or malware check isn't enough and in 2021 on windows 10, rarely a problem. Check your CPU/GPU and mainboard temperatures with tools like CoreTemp, gpu-z and hwinfo (hwi) while running some stability benchmarks (all are freeware or have a sufficient free mode): Prime95 with Small FTTs, 3dmark TimeSpy, Superposition Benchmark. Additionally it could be helpful to run onscreen monitoring tools like MSIAfterburner+RivaTuner statistic server (or similar) and display CPU/GPU clock speed, temperature and frametimes while playing. More then often things like stuttering are a result of thermal throttling.

User avatar
Huib-Bloodstone
Posts: 99
Joined: Thu, 20. Dec 18, 22:13
x4

Re: X4 Performance Troubleshooting Suggestions

Post by Huib-Bloodstone » Mon, 12. Apr 21, 22:39

i recommend installing X4 on a different drive.. i had this issue to with the lag spikes... seems my older SSD is broken and my new m.2 SSD works great.
"a problem well put is half solved"

cdeeks
Posts: 89
Joined: Tue, 22. Jan 13, 20:38
x3tc

Re: X4 Performance Troubleshooting Suggestions

Post by cdeeks » Sat, 24. Apr 21, 12:14

Also might help some people to go into task mgr and let x4.exe run at high priority and also set affinity to the most used cores that x4 utilizes. the way i see this is by using HWMONITOR. I loaded up an intense scene in x4 watched it for ten minutes to see what cores the game uses most of and out of all 8 of my cores only 4 ever got used more than %50 so i just explicitly let x4 use only those 4 cores and as a result, CPU runs a little cooler and i gained about 8 to ten fps now my average even in battle is about 40 - 70 fps.

nOy
Posts: 39
Joined: Tue, 26. Apr 05, 15:07
x4

Re: X4 Performance Troubleshooting Suggestions

Post by nOy » Wed, 2. Jun 21, 21:12

Just curious, has anyone tried adjusting processor affinity for the X4 executable so you can assign it to less utilized cores and say move other processes out of those said cores? Assuming the clocks don't drastically change between cores, will it help improve performance if X4 is more CPU-limited than GPU-limited?
nOy>>

Imperial Good
Moderator (English)
Moderator (English)
Posts: 4743
Joined: Fri, 21. Dec 18, 18:23
x4

Re: X4 Performance Troubleshooting Suggestions

Post by Imperial Good » Tue, 27. Jul 21, 08:00

nOy wrote:
Wed, 2. Jun 21, 21:12
Just curious, has anyone tried adjusting processor affinity for the X4 executable so you can assign it to less utilized cores and say move other processes out of those said cores? Assuming the clocks don't drastically change between cores, will it help improve performance if X4 is more CPU-limited than GPU-limited?
I think it helps with frame time consistency, especially if doing something CPU intensive in the background such as video encoding. However the difference is likely a few percent at best. With modern cores you need to be sure that X4 has affinity with the highest (best) cores for optimal performance. The Kernel scheduler will do this automatically however setting core affinities can override this behaviour and so result in X4 running on sub-optimal cores unless those cores are included in the list of CPU cores it can run on. X4 also does benefit from multi-threading so will see improved performance when more cores are available, although benefit starts to diminish extremely fast past 4 cores.

Panos
Posts: 848
Joined: Sat, 25. Oct 08, 00:48
x4

Re: X4 Performance Troubleshooting Suggestions

Post by Panos » Thu, 19. Aug 21, 13:54

We run some tests on this discussion
viewtopic.php?f=146&t=441417

RDNA1 & RDNA2 gpus (at least those we had) under perform by a hefty margin with the game both 4.0 and 4.1b6. Both in windows and in Linux.

The GTX1080Ti shouldn't be 60% faster than an overclocked & watercooled 5700XT (1800mhz VRAM, core running around 2046 not the usual 1870 on air) as card which is in par if not faster even in Vulkan based games, nor should be the 3080ti performing 60% faster than the 6900XT too.

This is the only game we see such discrepancy. Only one I can think of is Vulkan based Wolfstein Youngblood where they are in par but not that much slower.
Can someone look at this please?

Scoob
Posts: 9920
Joined: Thu, 27. Feb 03, 22:28
x4

Re: X4 Performance Troubleshooting Suggestions

Post by Scoob » Fri, 31. Dec 21, 16:18

I've noticed the Windows Scheduler has been performing differently lately in regard to X4, and it reminded me of the old days of Windows XP and X Games. Back then I had one of the early duel-core AMD Athlon X2 CPUs having originally had what was basically the single-core version of that chip. Same clocks, same IPC. So, a "doubling" of CPU performance... well, not quite of course. However, back then, one time I'd run X2 (I think that was the X-Game at the time) and it'd run flawlessly, silky-smooth and lovely to behold. Another time it'd be...not so nice. This was down to the Windows XP scheduler not really understanding Dual Cores. Sometimes (when things worked well) the scheduler would pop the main X2 thread and the DX thread on separate Cores. Other times (when things didn't run so well) they'd be on the same Core. Often, just closing and re-launching X2 could transform the performance drastically. Multiple games exhibited similar behaviour.

Fast-forward to today and the Window 10 scheduler is pretty good. I used to play around with affinity on my 3900X, limiting the game to the "best" cores etc. and it did make a slight difference. Not a huge fps bump or anything, but a slightly smoother experience when I did so. As things improved for AMD CPU's scheduler-wise, I no longer needed to play around with affinity, it just worked(TM). I observed during this time how X4 would regularly just use three Cores (six threads) on my CPU. A couple would be pretty darn busy threads, a third would be fairly busy, with the remaining up to three threads having only a very light load. This has been the norm for a long time now.

However, very recently, perhaps since v4.2 or perhaps a Windows update, I'm not totally sure, X4's thread use characteristics have changed. There are still the main two busy threads and the third less busy along with two or three very lightly-loaded threads. In addition though, I'm often seeing two additional lightly-loaded threads. The thing is, it's not every time I launch the game, but the game does seem somewhat smoother, holding my vSync-limited 60fps more consistently.

I've even done tests where I've been on a station dock (on foot) and performance has been "spiky" while I'm just sat there watching ships land, go in / out of storage and launch. I save, exit and go back in and things are much smoother. I thought at first it might just be "long session" syndrome, where performance can degrade over a longer session. This wasn't a long session though. Additionally, from multiple observations, when I see the game showing additional Core / Thread utilisation like this, performance does seem better.

Can't explain it, just sharing what I'm seeing while playing with various diagnostic tools (all locked to Core 12, game never uses that Core for whatever reason) up on my second screen. This observation reminded me so much of those early Windows XP days I thought I'd share.

So, performance being different between game launches, along with seemingly different Core utilisation characteristics. Windows Scheduler being sketchy, or the something the game is doing different...sometimes?

For the record I have a 1070 and 32GB RAM with the game on a fast, RAID0 NVMe drive. When things get busy, I appear to be very much CPU-limited with the settings I use, due to the game's heavy reliance on the two busiest threads. When things run better, it's almost like some of that heavy workload is split off to another thread or two. If true, this is great as things are objectively (judging by the FPS counter) better when the game does this. I'll continue to observe things during gameplay as what I've seen so far can't be considered concrete evidence by any means, more intriguing observation lol.

Imperial Good
Moderator (English)
Moderator (English)
Posts: 4743
Joined: Fri, 21. Dec 18, 18:23
x4

Re: X4 Performance Troubleshooting Suggestions

Post by Imperial Good » Wed, 26. Jan 22, 22:52

Be aware the R9 3900X is a 2 CCD CPU. In theory optimum performance might be obtained by limiting all threads to the same, best, CCD while leaving the other to run background tasks. If X4 runs threads on both CCDs then there is a larger synchronisation overhead to synchronise between the CCDs than within a single CCD. The scheduler should be smart enough for this, and even schedule onto one CCD without the best core should it have more good cores, but it might still make strange decisions at times. As long as the tasks run are highly multithreaded it will not make a difference, but as synchronisation becomes more critical running between CCDs might start to have noticeable performance impacts and potentially even cause poor frame time spikes.

Post Reply

Return to “X4: Foundations - Technical Support”