Elvas Tower: memory using monogame or - Elvas Tower

Jump to content

  • 8 Pages +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

memory using monogame or Rate Topic: -----

#1 User is offline   alteo80 

  • Hostler
  • Group: Status: Active Member
  • Posts: 65
  • Joined: 07-January 18
  • Gender:Male
  • Location:Paris 13 (France)
  • Simulator:open rails ny
  • Country:

Posted 05 November 2021 - 10:09 AM

hello, I regularly use your version of openrail, today, during an activity loaded with traffic and static equipment, on a French road at the lge v4, I noticed that the video memory is not discharged, and at the end of the activity which lasts 30 min, I reached 7190 mo of use of the video memory. letting the game continue the occupation of the memory continues to increase slowly. the graphics card has 8 gb of ram embeded and the system 16 gb ... tests carried out only on the latest version 108.2. thanks

#2 User is online   engmod 

  • Open Rails Developer
  • PipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 1,774
  • Joined: 26-February 08
  • Gender:Male
  • Location:Eltham, Victoria, Australia
  • Simulator:ORNYMG
  • Country:

Posted 05 November 2021 - 07:12 PM

Hi Alte,

I have just tested RMD_west and tested with GPUz and I find that GPUz reports "system memory used" rather than graphics card memory used.
I also used the extended HUD in 108.2 to see what memory usage it reports, but I unsure what memory it reports.

How are you measuring memory used?

#3 User is offline   alteo80 

  • Hostler
  • Group: Status: Active Member
  • Posts: 65
  • Joined: 07-January 18
  • Gender:Male
  • Location:Paris 13 (France)
  • Simulator:open rails ny
  • Country:

Posted 06 November 2021 - 03:32 PM

 engmod, on 05 November 2021 - 07:12 PM, said:

Hi Alte,

I have just tested RMD_west and tested with GPUz and I find that GPUz reports "system memory used" rather than graphics card memory used.
I also used the extended HUD in 108.2 to see what memory usage it reports, but I unsure what memory it reports.

How are you measuring memory used?

hello, to measure, I use two soft, to be sure, msi afterburner and xtremetunerplus which is used by the manufacturer of my video card. the results are identical, it looks like a memory leak, it seems to me that it was reported in last April on this forum http://www.elvastowe...es-more-memory/ the more we advance in the versions the more the fps deteriorate ... a memory leak is also present ... am I really the only one?

#4 User is online   engmod 

  • Open Rails Developer
  • PipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 1,774
  • Joined: 26-February 08
  • Gender:Male
  • Location:Eltham, Victoria, Australia
  • Simulator:ORNYMG
  • Country:

Posted 09 November 2021 - 12:35 AM

I have just run an activity from Mullan Pass.
Using the extended HUD and the last screen "debug"
I started with 420MB of gpu memory and ended 1.5 hours later with 1361MB of memory used.

Attached is the OR log and a screen shot at the end of the activity.

Attached File(s)



#5 User is offline   alteo80 

  • Hostler
  • Group: Status: Active Member
  • Posts: 65
  • Joined: 07-January 18
  • Gender:Male
  • Location:Paris 13 (France)
  • Simulator:open rails ny
  • Country:

Posted 09 November 2021 - 09:42 AM

 engmod, on 09 November 2021 - 12:35 AM, said:

I have just run an activity from Mullan Pass.
Using the extended HUD and the last screen "debug"
I started with 420MB of gpu memory and ended 1.5 hours later with 1361MB of memory used.

Attached is the OR log and a screen shot at the end of the activity.

hello, and thank you for your example, I have similar results, the American roads are generally much lighter than the European roads, and load less the video memory, the traffic too ... but the observation is there, the game does not restore no memory, it is very clear, memory leak, thank you for the interest in the subject.

#6 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 7,000
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 11 November 2021 - 12:02 AM

I have performed some tests yesterday. First I compared the official OR testing version (which is 32 bit) with ORNYMG with the 32 bit option checked. I got very similar results, and memory values growing at beginning, but then oscillating around a more or less stable value.
I then run ORNYMG at 64 bit, and saw memory growing much more. Memory usage is also higher at the beginning of the game.
I then introduced a garbage collection every two minutes, but nothing changed.
Strangely I noticed that, in two occasions, after starting another app while leaving OR in run state (no pause) and after few time moving again the OR window on the foreground, memory was lowered by some humdreds of MB!
At the moment I won't investigate further. I hope that in reasonable time 64 bit will be available also in the OR official version, and at that moment someone capable will solve this.
In the meantime I can only recommend what I recommended also some time ago: if there is no real need to go beyond the 4MB of RAM because the route or the activity is very heavy, it's better to run 32 bit. You use much less memory and probably also run faster.

#7 User is offline   alteo80 

  • Hostler
  • Group: Status: Active Member
  • Posts: 65
  • Joined: 07-January 18
  • Gender:Male
  • Location:Paris 13 (France)
  • Simulator:open rails ny
  • Country:

Posted 11 November 2021 - 06:56 AM

hello, and thank you for taking the time to watch and test carlo. we will wait with option 64 unchecked :). the problem is reported. Thank you all. AND GOOD RAIL :)

#8 User is online   engmod 

  • Open Rails Developer
  • PipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 1,774
  • Joined: 26-February 08
  • Gender:Male
  • Location:Eltham, Victoria, Australia
  • Simulator:ORNYMG
  • Country:

Posted 12 November 2021 - 02:42 AM

I have a better one.

3052MB for a 7 hour run on the ruel sub

Attached File(s)



#9 User is offline   Serana 

  • Conductor
  • Group: Status: Contributing Member
  • Posts: 489
  • Joined: 21-February 13
  • Gender:Male
  • Location:St Cyr l'Ecole (France)
  • Simulator:Open Rails
  • Country:

Posted 08 December 2021 - 02:11 PM

GPU memory is generally used by textures. Do you think this memory "leak" is due to textures remaining in VRAM?

On StackOverflow, I have read that textures loaded manually are not removed from VRAM automatically if we don't use the content manager of XNA/MonoGame.
We have to call the Dispose function manually and I don't think we are currently calling this function. (See https://stackoverflow.com/a/48777516)

Perhaps we should call this function from the Sweep function of the SharedTextureManager.

#10 User is offline   Serana 

  • Conductor
  • Group: Status: Contributing Member
  • Posts: 489
  • Joined: 21-February 13
  • Gender:Male
  • Location:St Cyr l'Ecole (France)
  • Simulator:Open Rails
  • Country:

Posted 09 December 2021 - 01:34 AM

About the main RAM, I did a test session to see what's happening. My results are the following:
- For managed memory (the one that is monitored directly by the application and that is garbage collected): the quantity is more or less constant.
- For unmanaged memory, we have indeed a memory leak: at the start of the session, I had 600MB occupied (300MB managed). At the end, I had 1200MB occupied (300MB managed).

So, it seems that we have some parts of the code using unmanaged memory and we are not cleaning up the memory properly.

  • 8 Pages +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users