[2.21] question: memory increase usage vs the longer we play the same game session?

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

Moderator: Moderators for English X Forum

Browser_ice
Posts: 488
Joined: Sun, 5. Feb 06, 17:15
x4

[2.21] question: memory increase usage vs the longer we play the same game session?

Post by Browser_ice »

Hi, while I had X4 running in the background, I was checking other things and I had a few times Windows telling me X4 was using a lot of memory. I went to check and my current game session is using 8.5Gb of memory (I have 16Gb in total). That made me wonder about something.

As we keep playing the same game session, we accumulate in our game, more and more trade transactions saved in the <economylog> and the <universe> keeps growing with stations/ships that get added in time. So what would be the memory consumption of X4 if someone played the same game session for +6 months?

- current savefile non compressed is 294Mg in size and 6,319,495 in amount of records.

- number of records in the safevile <economylog> section : 1,293,621 (so 20% of the whole savefile)

- total gametime is currently 311573.584

I do not remember having memory usage warnings from XR. So I do not know if its because how X4 works.

Are we going to be heading into memory problems in a few months/weeks?
Ubuntu 24.04 playing with ProtonDB
Intel I7-12700K
32Gb Memory
Nvgidia RTX-3060
Alan Phipps
Moderator (English)
Moderator (English)
Posts: 31814
Joined: Fri, 16. Apr 04, 19:21
x4

Re: [2.21] question: memory increase usage vs the longer we play the same game session?

Post by Alan Phipps »

X4's memory usage will depend a lot upon cached graphics textures and your antialiasing settings. For a system with spare available RAM and VRAM, there is no real reason for the game not to continue to use what is available instead of perhaps using more frequent flushes that *might* affect gameplay more.

This shouldn't affect saves though.

Anyway, game (and save) optimisation is something that will hopefully continue to improve as further updates arrive.
A dog has a master; a cat has domestic staff.
CBJ
EGOSOFT
EGOSOFT
Posts: 54303
Joined: Tue, 29. Apr 03, 00:56
x4

Re: [2.21] question: memory increase usage vs the longer we play the same game session?

Post by CBJ »

Browser_ice wrote: Tue, 23. Apr 19, 16:10 Are we going to be heading into memory problems in a few months/weeks?
Memory usage and savegame size are two different things, with different parameters, but also some crossover.

While running, the game will make use of as much memory as it can, to avoid having to re-read things from the disk. This means that during a long play session, you may well find memory usage increasing for quite a while, though hopefully not indefinitely. This is independent of how many objects there are in the universe, and relates to any single game session (while the game is running continuously) rather than to how long you've been playing a particular savegame overall. While you could, in principle, run out of memory here if you added more and more objects to the game universe, it should be unlikely in the course of a normal, unmodified game.

With savegames, the issue of caching data isn't relevant. The savegame only stores the actual data about your game universe, not things like the models and textures used for ships. While this will expand as the number of objects in your game expands, the size of each object is not that great. The same applies to things like economy log entries, which are each really quite small in terms of memory, and which also have the benefit of being summarised as they get older to reduce the amount of space they take up. Again, in principle the save could get too big for your PC to handle, but in practice it probably won't unless you start writing scripts to do crazy things!
Browser_ice
Posts: 488
Joined: Sun, 5. Feb 06, 17:15
x4

Re: [2.21] question: memory increase usage vs the longer we play the same game session?

Post by Browser_ice »

While looking at the logfile, I found these below. I have no idea if it has any relations to the memory consumption.

Line 16834: [=ERROR=] 0.00 g:\dev\p1_hotfix\src\libs\xsfx\source\xsfx\openal/sound.cpp:160: ERR: 40965 AL_OUT_OF_MEMORY
Line 16837: [=ERROR=] 1.70 g:\dev\p1_hotfix\src\libs\xsfx\source\xsfx\openal/sound.cpp:160: ERR: 40965 AL_OUT_OF_MEMORY
Line 16840: [=ERROR=] 3.11 g:\dev\p1_hotfix\src\libs\xsfx\source\xsfx\openal/sound.cpp:160: ERR: 40965 AL_OUT_OF_MEMORY
Line 16843: [=ERROR=] 3.59 g:\dev\p1_hotfix\src\libs\xsfx\source\xsfx\openal/sound.cpp:160: ERR: 40965 AL_OUT_OF_MEMORY
Line 16846: [=ERROR=] 4.07 g:\dev\p1_hotfix\src\libs\xsfx\source\xsfx\openal/sound.cpp:160: ERR: 40965 AL_OUT_OF_MEMORY
Line 16849: [=ERROR=] 4.55 g:\dev\p1_hotfix\src\libs\xsfx\source\xsfx\openal/sound.cpp:160: ERR: 40965 AL_OUT_OF_MEMORY
Ubuntu 24.04 playing with ProtonDB
Intel I7-12700K
32Gb Memory
Nvgidia RTX-3060

Return to “X4: Foundations - Technical Support”