memory using monogame or
#1
Posted 05 November 2021 - 10:09 AM
#2
Posted 05 November 2021 - 07:12 PM
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
Posted 06 November 2021 - 03:32 PM
engmod, on 05 November 2021 - 07:12 PM, said:
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
Posted 09 November 2021 - 12:35 AM
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)
-
memory_usage_Mullan_1.5Hour.jpg (1.83MB)
Number of downloads: 12 -
CokeCanyon 2021-11-09 19.00.49.txt (32.61K)
Number of downloads: 3
#5
Posted 09 November 2021 - 09:42 AM
engmod, on 09 November 2021 - 12:35 AM, said:
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
Posted 11 November 2021 - 12:02 AM
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
Posted 11 November 2021 - 06:56 AM
#8
Posted 12 November 2021 - 02:42 AM
3052MB for a 7 hour run on the ruel sub
Attached File(s)
-
HEAVY_WINTER_WESTBOUND 2021-11-12 21.36.37.jpg (2.14MB)
Number of downloads: 15
#9
Posted 08 December 2021 - 02:11 PM
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
Posted 09 December 2021 - 01:34 AM
- 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.