A "sad" but true situation

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

dtpsprt
Posts: 2853
Joined: Wed, 6. Nov 02, 20:31
x4

A "sad" but true situation

Post by dtpsprt »

I'm not so sure on where should i post this, it's more a "feature" request, than a bug (I think) based on my experience with X4 so far.

Having the "luxury" of having both Windows 10 and Linux Ubuntu 20.4 installed in my system (so the hardware is exactly the same, therefore irrelevant) I have noticed that X4 saves (and loads) about 30% faster in Linux than Windows (except for the initial start of the game where Linus Steam processes the Vulkan shaders).

I have also made some "notes" of my own, that in about 3 hours of playtime one autosave will, eventually, ocure and I shall have to save another three times, reaching points that need saving plus the final save before closing.
Also, I shall have to save and reload another three to four times, due either to scrambled graphics on the map or "missing" Station Traders (most annoying is when you save and reload for a trader and then you undock to find yourself in a fight some 10 minutes later (definitely save before a fight).
All in all my time is better spent playing the game in Linux than Windows.

I do realise that the devs can not do anything with the way Operating Systems behave, but maybe they can do something that would clear the VRAM (often) so, at least, the saves and reloads will be minimised?
Not everybody has my "luxury", besides I would rather keep all games in the Windows section and leave the Linux one for serious and secure work.
Imperial Good
Moderator (English)
Moderator (English)
Posts: 4933
Joined: Fri, 21. Dec 18, 18:23
x4

Re: A "sad" but true situation

Post by Imperial Good »

dtpsprt wrote: Tue, 20. Oct 20, 03:16 I do realise that the devs can not do anything with the way Operating Systems behave, but maybe they can do something that would clear the VRAM (often) so, at least, the saves and reloads will be minimised?
VRAM usage is an area that the developers intend to improve with 4.00.
dtpsprt wrote: Tue, 20. Oct 20, 03:16 I do realise that the devs can not do anything with the way Operating Systems behave
It sounds more like an optimization problem with the different ports. There is likely a way to achieve near performance parity on Windows, but the part that performs worse has to be identified and may require alternative approaches to work around.
KMcr
Posts: 35
Joined: Sun, 17. Jun 12, 15:04
x4

Re: A "sad" but true situation

Post by KMcr »

dtpsprt wrote: Tue, 20. Oct 20, 03:16
Having the "luxury" of having both Windows 10 and Linux Ubuntu 20.4 installed in my system (so the hardware is exactly the same, therefore irrelevant) I have noticed that X4 saves (and loads) about 30% faster in Linux than Windows (except for the initial start of the game where Linus Steam processes the Vulkan shaders).
This is my experience too. I went the whole hog and blasted Windows from existence on my laptop (I'm an embedded/cloud software developer so Windows was there to play games/use Office) and it's really enhanced my enjoyment of the game. It looks prettier, runs smoothly. I reckon if I really need Windows, there's always VirtualBox. :D
Rei Ayanami
Posts: 3354
Joined: Wed, 6. Nov 02, 20:31
x4

Re: A "sad" but true situation

Post by Rei Ayanami »

dtpsprt wrote: Tue, 20. Oct 20, 03:16 but maybe they can do something that would clear the VRAM (often) so, at least, the saves and reloads will be minimised?
Curious : How would clearing video ram improve save / loading speeds? Your graphics card memory has nothing to do with how fast your game saves (unless it's an integrated graphics chip, in which case it eats away system RAM, but we shouldn't use integrated graphics for X4 in the first place).

Also, when comparing Windows and Linux : Did you take into account that perhaps other programs that run in the background or OS settings (like windows defender) might be the reason for the slowdown?
dtpsprt
Posts: 2853
Joined: Wed, 6. Nov 02, 20:31
x4

Re: A "sad" but true situation

Post by dtpsprt »

Rei Ayanami wrote: Tue, 20. Oct 20, 23:36 Curious : How would clearing video ram improve save / loading speeds? Your graphics card memory has nothing to do with how fast your game saves (unless it's an integrated graphics chip, in which case it eats away system RAM, but we shouldn't use integrated graphics for X4 in the first place).

Also, when comparing Windows and Linux : Did you take into account that perhaps other programs that run in the background or OS settings (like windows defender) might be the reason for the slowdown?
It will not by itself, but it will greatly reduce the times (2 minutes each or more depending on the hardware and the player, one minute to save and one to reload) we need to save and reload to clear it.

As for the comparison, my machine (hardware) is one, no difference there and first thing I do upon starting is load the same Antivirus (Win and Linux version respectively), connect to the same internet connection and start the game (which will open Steam Win and Linux respectively). Besides, if an OS is in "need" of stuff that slows the computer it's not the fault of Egosoft (of course), but something for the OS's developers to think about (if people will ever stop being led like cattle by the "Leading Corporations" of any industry).
KMcr
Posts: 35
Joined: Sun, 17. Jun 12, 15:04
x4

Re: A "sad" but true situation

Post by KMcr »

Rei Ayanami wrote: Tue, 20. Oct 20, 23:36
Also, when comparing Windows and Linux : Did you take into account that perhaps other programs that run in the background or OS settings (like windows defender) might be the reason for the slowdown?
Personally, I always get rid of any unnecessary programs on Windows. I'll grant that maybe the cr**ware that Dell insist on putting on their laptops (yes, I'm looking at you Alienware Control Centre) may have had something to do with the slowdown, but I suspect it's more to do with the fact that Windows is just "not very good". I spent the early part of my development career sorting out the sh**storm that was 16/32 bit DLL's, IMHO the whole operating system is built on sand. I don't believe the marketing bull that Win10 is a complete re-write. The days of MS innovating stopped pretty much as soon as they went public. "Gotta generate a fair profit for our shareholders" means "do it as quickly and cheaply as you can" with all the downsides that brings (technical debt anyone?)

For another comparison:
Standard yocto build (headless, x86-64): 16mins on Focal, 27mins on Win10 WSL. Win10 doesn't really take advantage of the 8 cores, 2 are always doing nothing. Focal, on the other hand maxes out all 8 cores (and I can still surf/listen to music). This is the main reason I switched to Linux only here.
dtpsprt
Posts: 2853
Joined: Wed, 6. Nov 02, 20:31
x4

Re: A "sad" but true situation

Post by dtpsprt »

KMcr wrote: Wed, 21. Oct 20, 15:55 Personally, I always get rid of any unnecessary programs on Windows. I'll grant that maybe the cr**ware that Dell insist on putting on their laptops (yes, I'm looking at you Alienware Control Centre) may have had something to do with the slowdown, but I suspect it's more to do with the fact that Windows is just "not very good". I spent the early part of my development career sorting out the sh**storm that was 16/32 bit DLL's, IMHO the whole operating system is built on sand. I don't believe the marketing bull that Win10 is a complete re-write. The days of MS innovating stopped pretty much as soon as they went public. "Gotta generate a fair profit for our shareholders" means "do it as quickly and cheaply as you can" with all the downsides that brings (technical debt anyone?)

For another comparison:
Standard yocto build (headless, x86-64): 16mins on Focal, 27mins on Win10 WSL. Win10 doesn't really take advantage of the 8 cores, 2 are always doing nothing. Focal, on the other hand maxes out all 8 cores (and I can still surf/listen to music). This is the main reason I switched to Linux only here.
I can give you a "hint" on how you can make Windows even faster than Linux (just don't get connected to the Internet on that machine, Microsoft will have a field day suing you).
Spoiler
Show
Removed, Alan Phipps, moderator
Alan Phipps
Moderator (English)
Moderator (English)
Posts: 31735
Joined: Fri, 16. Apr 04, 19:21
x4

Re: A "sad" but true situation

Post by Alan Phipps »

@ dtpsprt: I have removed your spoiler because it is not something that Egosoft would want their general forum users to try out and possibly make mistakes with and/or run into licence issues about.
A dog has a master; a cat has domestic staff.
Alm888
Posts: 488
Joined: Sat, 14. Sep 19, 19:38
x4

Re: A "sad" but true situation

Post by Alm888 »

KMcr wrote: Wed, 21. Oct 20, 15:55For another comparison:
Standard yocto build (headless, x86-64): 16mins on Focal, 27mins on Win10 WSL. Win10 doesn't really take advantage of the 8 cores, 2 are always doing nothing. Focal, on the other hand maxes out all 8 cores (and I can still surf/listen to music). This is the main reason I switched to Linux only here.
Just some off-topic comment from a stranger: You DO know WSL2 is a glorified virtual machine running a custom Linux distro, right? Thus, those "2 cores" (more like 1 core with hyper-threading) is used to control said virtual machine from a host OS.

In other words, WSL vs. native Linux is not a fair match (just like comparing a half-a$$ed Linux port of a Windows game with DX->OpenGL wrapper, like "The Witcher 2" to its DirectX Windows original developer-optimized version is hardly fair).

That being said, the comparison must be made in the most-equal conditions (whatever that means), and given we can not enforce the very same behavior onto completely different operating systems, we probably should try to speed-up the game as much as possible using every way available on a given OS, employing every trick: disabling file indexing, turning off all antivirus software, enforcing custom scheduler, overclocking GPU via available software… And, my favorite: running the game from a RAM-drive (because no SSD can beat RAM in speed!). Of course, on Linux we shall launch the game without desktop environment from a dedicated X server session (and on Windows we shall also use server version without Cortana, Explorer and other consumer-level dead weight).
KMcr
Posts: 35
Joined: Sun, 17. Jun 12, 15:04
x4

Re: A "sad" but true situation

Post by KMcr »

Alm888 wrote: Wed, 21. Oct 20, 19:22
Just some off-topic comment from a stranger: You DO know WSL2 is a glorified virtual machine running a custom Linux distro, right? Thus, those "2 cores" (more like 1 core with hyper-threading) is used to control said virtual machine from a host OS.

In other words, WSL vs. native Linux is not a fair match (just like comparing a half-a$$ed Linux port of a Windows game with DX->OpenGL wrapper, like "The Witcher 2" to its DirectX Windows original developer-optimized version is hardly fair).
Yes, I do know what WSL is. Maybe the comparison is unfair, but still, 10 minutes? On the same hardware? I point my learned friend to my earlier comment: "Windows is just not very good"! :D

Return to “X4: Foundations”