is increasing RAM usage on linux memory leak?

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

rudi_pioneer
XWiki Moderator
XWiki Moderator
Posts: 583
Joined: Fri, 2. Apr 21, 21:06
x4

is increasing RAM usage on linux memory leak?

Post by rudi_pioneer »

I was looking at overlay stats and noticed that over time RAM use slowly creeps up.

Since i don't know much about how RAM is used, maybe it's expected (game caches more things in RAM or something?) or maybe it's a memory leak? Practically, does this mean i should restart the game if game starts lagging and RAM is full?

(game started at 12gb RAM and slowly went up to 30gb, at which point i've stopped playing)
adeine
Posts: 1509
Joined: Thu, 31. Aug 17, 17:34
x4

Re: is increasing RAM usage on linux memory leak?

Post by adeine »

rudi_pioneer wrote: Tue, 2. Dec 25, 01:55 or maybe it's a memory leak? Practically, does this mean i should restart the game if game starts lagging and RAM is full?
Yes.
Blaze1st
Posts: 233
Joined: Thu, 13. Feb 25, 13:42

Re: is increasing RAM usage on linux memory leak?

Post by Blaze1st »

You shouldn't assume a memory leak purely on high memory usage by a given process.

The Operating System is responsible for memory management, applications request allocations from it.

Typically if the memory is freeable it is not a leak. There are various tools and techniques to determine if a leak is occurring, with the deepest of these requiring access to the source code. The simplest test you can do though is run some other application(s) and check that the system can reallocate memory more evenly or if the process with the suspected memory leak hogs more than its share still.

Remember that the system will not reallocate memory previously allocated unless it can be freed and until something else actually requests some of it.
Worilio
Posts: 94
Joined: Fri, 24. Jan 25, 14:44
x4

Re: is increasing RAM usage on linux memory leak?

Post by Worilio »

This could also be a thread leak. Perhaps, it would not harm to monitor processes with "ps -aux" in order to get a clear picture.
rudi_pioneer
XWiki Moderator
XWiki Moderator
Posts: 583
Joined: Fri, 2. Apr 21, 21:06
x4

Re: is increasing RAM usage on linux memory leak?

Post by rudi_pioneer »

Totally, I figure this is very nuanced area.

Funny enough, stutter I was trying to reproduce is when *GPU* RAM got filled up, not motherboard RAM. I didn't even know that's a thing! Easy to solve: quit the game fully, and i'm back at 5/16Gb RAM usage.

Since this is relatively newer Radeon RX 9070, maybe driver/mesa updates will improve on this too.

Return to “X4: Foundations”