X4 Performance Troubleshooting Suggestions

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

Moderator: Moderators for English X Forum

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: 51741
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: 4750
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: 9921
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: 4750
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.

User avatar
alt3rn1ty
Posts: 2298
Joined: Thu, 26. Jan 06, 19:45
x4

Re: X4 Performance Troubleshooting Suggestions

Post by alt3rn1ty » Sat, 12. Feb 22, 08:14

Suggestion :
If it doesn't already, could X4 implement using the Windows 11 DirectStorage api, for faster loading of assets ?
Laptop Dell G15 5510 : Win 11 x64
CPU - 10th Gen' Core I7 10870H 2.2-5.0ghz, GPU - NVidia Geforce RTX 3060, VRAM 6gb GDDR5,
RAM - 32gb (2x16gb, Dual Channel mode set in BIOS) DDR4 2933mhz Kingston Fury Impact,
SSD - Kioxia M.2 NVME 512gb (System), + Samsung M.2 NVME 970 Evo Plus 1tb (Games)

:boron: Long live Queen Polypheides and may her tentacles always be supple.
Seeker of Sohnen.

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

Re: X4 Performance Troubleshooting Suggestions

Post by Imperial Good » Sat, 12. Feb 22, 11:20

alt3rn1ty wrote:
Sat, 12. Feb 22, 08:14
If it doesn't already, could X4 implement using the Windows 11 DirectStorage api, for faster loading of assets ?
As far as I am aware this is not possible. Not only is the DirectStorage API currently private and restricted to Xbox developers (it is not public last time I checked), but it is most likely only compatible with Direct3D 12 and available on Windows 10/11 machines. X4 uses Vulkan and I am not aware of any extensions for Vulkan to interact with DirectStorage or similar functionality. I also am not aware of any Linux equivalent to DirectStorage for normal user use.

User avatar
alt3rn1ty
Posts: 2298
Joined: Thu, 26. Jan 06, 19:45
x4

Re: X4 Performance Troubleshooting Suggestions

Post by alt3rn1ty » Sat, 12. Feb 22, 12:37

Ah, I forgot about Vulkan and Linux, I have also just found a few more limits on what machines can use it too, not only does it need Windows 11 operating system, it also needs a GPU that supports the DirectX 12 Ultimate API (Currently NVIDIA's GeForce RTX 20-series, RTX 30-series, and AMD's Radeon RX 6000 series). It also needs NVMe SSD that uses Microsoft's "Standard NVM Express Controller" driver, and a weird one is that the SSD should be at least 1 TB in capacity.
I have NVME SSD, Windows 11 (as of 2 days ago), but the rest will be a few years until I get a laptop that could use it. Sigh. And when I do I think I will have jumped to Linux by then, wanted to get rid of windows for years.
Thanks for looking into it IG. :)
Laptop Dell G15 5510 : Win 11 x64
CPU - 10th Gen' Core I7 10870H 2.2-5.0ghz, GPU - NVidia Geforce RTX 3060, VRAM 6gb GDDR5,
RAM - 32gb (2x16gb, Dual Channel mode set in BIOS) DDR4 2933mhz Kingston Fury Impact,
SSD - Kioxia M.2 NVME 512gb (System), + Samsung M.2 NVME 970 Evo Plus 1tb (Games)

:boron: Long live Queen Polypheides and may her tentacles always be supple.
Seeker of Sohnen.

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

Re: X4 Performance Troubleshooting Suggestions

Post by Imperial Good » Tue, 15. Feb 22, 12:33

alt3rn1ty wrote:
Sat, 12. Feb 22, 12:37
not only does it need Windows 11 operating system
It works with Windows 10 as well, at least partly. Just Windows 11 should have better performance due to the kernel and/or drivers being designed around it. This is largely speculation until an actual DriectStorage product is released.

Currently I think (based on crumbs in API documents) what is happening is that Windows 11 gets BypassIO support which improves I/O performance when using DirectStorage by bypassing most of the IO stack when possible. Windows 10 can still use DirectStorage but using the full IO stack (slower) to read data. Both should support the advantage of sending various types of lossless compressed data directly to the GPU.
alt3rn1ty wrote:
Sat, 12. Feb 22, 12:37
it also needs a GPU that supports the DirectX 12 Ultimate API (Currently NVIDIA's GeForce RTX 20-series, RTX 30-series, and AMD's Radeon RX 6000 series)
Newer GPUs are needed due to the required hardware functionality. Specifically the GPUs need hardware support for decompression as that is the main benefit from DirectStorage, offloading data decompression from CPU to dedicated units on the GPU.

In theory applications could still benefit from BypassIO functionality used for DirectStorage even if the GPU lacks support for it. BypassIO lowers Kernel, Driver and CPU overhead for reading file data even if the CPU must still decompress it before sending to the GPU.
alt3rn1ty wrote:
Sat, 12. Feb 22, 12:37
It also needs NVMe SSD that uses Microsoft's "Standard NVM Express Controller" driver
I suspect this is related to BypassIO support. I would not be surprised if Samsung and other NVME controller drivers add support for it over time.
alt3rn1ty wrote:
Sat, 12. Feb 22, 12:37
and a weird one is that the SSD should be at least 1 TB in capacity.
This is more a recommendation rather than a requirement. Given modern games can be between 100 and 300 GB in size, a 512 GB drive will not handle multiple such big games very well. Near full NVME drives can suffer performance degradation due to the lack of space to move data around.

The marketing for DirectStorage is clearly "gamer" orientated, hence some of the requirements are closer to game recommended system requirements (capacities, specific GPUs) rather than technical system requirements (standards, features, architectures).

User avatar
Liath
Posts: 185
Joined: Sun, 25. Dec 05, 08:16
x4

Re: X4 Performance Troubleshooting Suggestions

Post by Liath » Fri, 18. Mar 22, 18:50

This is a suggestion for Egosoft regarding an issue that I just worked through.

I had been having issues with stuttering in the game, in ways that screamed "loading texture data". I could fly a ship toward a station, and at times where I'd expect LOD to start pulling textures, I'd hit a few FPS drops. This also occurs if I fly to the middle of a station, and turn the ship after allowing it to look in one direction for a few seconds (so I'm guessing the engine is GCing the parts of the station that are off-screen). This is especially frustrating when flying a fast ship and trying to dock ASAP, or having a fight near a station, where you may look at the station, turn away to fire at the enemy, then turn back to the station to keep a bead on the target. Frame-stutters galore! (This also applies to fleet fights where large ship(s) may be on and off-screen often)

Thing is, the GPU's RAM is only sitting at 62% usage, around 5.2GB of 8GB total (RTX 3070 Ti). For reference, the system uses about 1.04GB just sitting at the desktop. I'm guessing from this that X4's engine is capping its own GPU RAM usage at ~4GB.

If it wouldn't be a huge issue to change this, I'd suggest asking the system how much RAM is free, and using as much as possible, and certainly not GCing items that are in proximity to the actor-camera, as having a dogfight near a station, or larger fleets, those frame stutters can be a major cause of frustration.

The good news is that I've moved the game to my OS drive, which is NVMe, as opposed to SATA(AHCI), and the issue is generally not noticeable now. However, my my OS drive is only 256GB, and I don't like having games on it, so I'm going to need to get myself another NVMe drive for that second NVMe bay. First world issues, I know.
If I seem super-critical lately, it's due to having played X2 and X3, which were awesome games. X:R's release was a hard fail, however there *were* improvements, especially with stations, capitals, and capturing/boarding. X4 right now feels like the best parts of X2/3 and Rebirth all got thrown out the friggin window. I'm honestly hopeful that X4 will turn out awesome, but I'm already hugely disappointed in ES as I have seen them do better and really expect more from them.

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

Re: X4 Performance Troubleshooting Suggestions

Post by CBJ » Fri, 18. Mar 22, 19:19

Liath wrote:
Fri, 18. Mar 22, 18:50
I'm guessing from this that X4's engine is capping its own GPU RAM usage at ~4GB.

If it wouldn't be a huge issue to change this, I'd suggest asking the system how much RAM is free, and using as much as possible, and certainly not GCing items that are in proximity to the actor-camera, as having a dogfight near a station, or larger fleets, those frame stutters can be a major cause of frustration.
It isn't, and we do all of those things. The limiting factor in most cases is getting the data off the disk.

User avatar
Liath
Posts: 185
Joined: Sun, 25. Dec 05, 08:16
x4

Re: X4 Performance Troubleshooting Suggestions

Post by Liath » Fri, 18. Mar 22, 21:07

CBJ wrote:
Fri, 18. Mar 22, 19:19
Liath wrote:
Fri, 18. Mar 22, 18:50
I'm guessing from this that X4's engine is capping its own GPU RAM usage at ~4GB.

If it wouldn't be a huge issue to change this, I'd suggest asking the system how much RAM is free, and using as much as possible, and certainly not GCing items that are in proximity to the actor-camera, as having a dogfight near a station, or larger fleets, those frame stutters can be a major cause of frustration.
It isn't, and we do all of those things. The limiting factor in most cases is getting the data off the disk.
I'm confused, then. If I fly up to a station, spin around a few times (so it loads all model/texture data), sit still for a few seconds, then do the same thing again, then why would I still experience a disk-related loading stutter? If the data remained in the GPU's RAM, it stands to reason there would not be a disk-read incurring a hit?
Since this is occurring, would it possibly be a bug in the engine that is GCing the data, or causing it to be re-read despite already being cached?
If I seem super-critical lately, it's due to having played X2 and X3, which were awesome games. X:R's release was a hard fail, however there *were* improvements, especially with stations, capitals, and capturing/boarding. X4 right now feels like the best parts of X2/3 and Rebirth all got thrown out the friggin window. I'm honestly hopeful that X4 will turn out awesome, but I'm already hugely disappointed in ES as I have seen them do better and really expect more from them.

rgiles18
Posts: 22
Joined: Sat, 19. Mar 22, 04:14
x4

Re: X4 Performance Troubleshooting Suggestions

Post by rgiles18 » Mon, 11. Apr 22, 00:06

I was hoping to eliminate the stuttering from my game by upgrading my system with a Ryzen 7 5800X CPU, 32GB 4133Mhz DDR4 ram and M.2 SSD but it still stutters. Also using a 1080 Nvidia Graphics card.

Star Citizen runs much better than X4 on my system.

I do use mods since I'm not a combat player and would rather create an Empire so that could be what's causing the stuttering I'm experiencing.

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

Re: X4 Performance Troubleshooting Suggestions

Post by Imperial Good » Mon, 11. Apr 22, 20:37

rgiles18 wrote:
Mon, 11. Apr 22, 00:06
Star Citizen runs much better than X4 on my system.
Given it has a budget multiple orders of magnitude bigger than X4... Not really fair to compare AAA games, especially one that is literally one of the most expensive game ever made.
rgiles18 wrote:
Mon, 11. Apr 22, 00:06
I do use mods since I'm not a combat player and would rather create an Empire so that could be what's causing the stuttering I'm experiencing.
Quite possibly. Especially if the stutter is approaching the 100ms or longer range. X4 might not have perfect frame pacing consistency but it is acceptable given the scope of the simulation.

HumanSDK
Posts: 10
Joined: Mon, 11. Feb 19, 17:20

Re: X4 Performance Troubleshooting Suggestions

Post by HumanSDK » Tue, 31. May 22, 11:28

Hi guys. Do the developers have plans to add FSR 2.0 support?

Post Reply

Return to “X4: Foundations - Technical Support”