Author Topic: [fixed] Increasing memory allocation (interpolation cache)  (Read 1148 times)

uuu

  • Guest
G3D Viewer v1.3.6
Windows Vista Service Pack 2 32bit

I forgot to close G3D viewer (with animating model loaded - "megapack/tech/battlemachine attacking" if it helps), when I came back (cca 1/2 hour), it used 1700MB of memory (it would use more, but pagefile+hdd activity slowed it's hunger), even though initially it uses only about 57MB of memory. You can actually watch the memory consumption to grow.
« Last Edit: 29 July 2012, 11:45:40 by tomreyn »

tomreyn

  • Local Moderator
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
Re: megaglest_g3dviewer memory leak
« Reply #1 on: 21 July 2012, 14:15:29 »
I can reproduce this on r3497 with

Code: [Select]
./start_megaglest_g3dviewer ../../data/glest_game/techs/megapack/factions/tech/units/battle_machine/models/battle_machine_attacking.g3dAfter 5 minutes of runtime, the memory consumption has tripled. Without a model loaded, there is no change in memory consumption.

When I "clear all", memory allocation stops increasing (but also doesn't decrease). When I then load the same model again, memory allocation still remains on the same elevated amount (but it may continue increasing the previously used memory is filled up again).

Another issue I have here is that the menu does not display, or rather it is 1 pixel high, so I can only access it by pressing F10.
atibox: Ryzen 1800X (8 cores @3.6GHz), 32 GB RAM, MSI Radeon RX 580 Gaming X 8G, PCI subsystem ID [1462:3417], (Radeon RX 580 chipset, POLARIS10) @3440x1440; latest stable Ubuntu release, (open source) radeon (amdgpu) / mesa video driver
atibox (old): Core2Quad Q9400 (4 cores @2.66GHz), 8 GB RAM, XFX HD-467X-DDF2, PCI subsystem ID [1682:2931], (Radeon HD 4670, RV730 XT) @1680x1050; latest stable Ubuntu release, (open source) radeon / mesa video driver
notebook: HP envy13d020ng
internet access: VDSL2+

· · · How YOU can contribute to MG · Latest development snapshot · How to build yourself · Megapack techtree · Currently hosted MG games · · ·

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: megaglest_g3dviewer memory leak
« Reply #2 on: 21 July 2012, 20:21:47 »
Give svn a try and let me know if the leak is resolved.

Thanks

tomreyn

  • Local Moderator
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
Re: megaglest_g3dviewer memory leak
« Reply #3 on: 21 July 2012, 22:21:04 »
r3498 does not fix it for me, yet. Memory allocation still doubles after 3 minutes.
atibox: Ryzen 1800X (8 cores @3.6GHz), 32 GB RAM, MSI Radeon RX 580 Gaming X 8G, PCI subsystem ID [1462:3417], (Radeon RX 580 chipset, POLARIS10) @3440x1440; latest stable Ubuntu release, (open source) radeon (amdgpu) / mesa video driver
atibox (old): Core2Quad Q9400 (4 cores @2.66GHz), 8 GB RAM, XFX HD-467X-DDF2, PCI subsystem ID [1682:2931], (Radeon HD 4670, RV730 XT) @1680x1050; latest stable Ubuntu release, (open source) radeon / mesa video driver
notebook: HP envy13d020ng
internet access: VDSL2+

· · · How YOU can contribute to MG · Latest development snapshot · How to build yourself · Megapack techtree · Currently hosted MG games · · ·

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: megaglest_g3dviewer memory leak
« Reply #4 on: 22 July 2012, 00:05:06 »
Found a cache that was taking way too much RAM (interploation). I hace turned it off and we should now see in both the viewer AND the game a lot less RAM usage. Hopefully performance is still ok.

tomreyn

  • Local Moderator
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
Re: megaglest_g3dviewer memory leak
« Reply #5 on: 22 July 2012, 00:38:10 »
Memory consumption of the G3DViewer looks good to me now. I'll take a look at memory on the next game we play on head of trunk.
Thanks!
atibox: Ryzen 1800X (8 cores @3.6GHz), 32 GB RAM, MSI Radeon RX 580 Gaming X 8G, PCI subsystem ID [1462:3417], (Radeon RX 580 chipset, POLARIS10) @3440x1440; latest stable Ubuntu release, (open source) radeon (amdgpu) / mesa video driver
atibox (old): Core2Quad Q9400 (4 cores @2.66GHz), 8 GB RAM, XFX HD-467X-DDF2, PCI subsystem ID [1682:2931], (Radeon HD 4670, RV730 XT) @1680x1050; latest stable Ubuntu release, (open source) radeon / mesa video driver
notebook: HP envy13d020ng
internet access: VDSL2+

· · · How YOU can contribute to MG · Latest development snapshot · How to build yourself · Megapack techtree · Currently hosted MG games · · ·

tomreyn

  • Local Moderator
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
Re: [testing] megaglest_g3dviewer memory leak
« Reply #6 on: 29 July 2012, 11:43:12 »
I've played a game with Pizza with a build which has the interploation cache disabled and there was no noticeable performace difference. We did, however, forget to take a look at how memory allocation has changed, but I guess it's safe to assume it will be lower now. I'll tag it as [fixed], but  more testing will be good.
atibox: Ryzen 1800X (8 cores @3.6GHz), 32 GB RAM, MSI Radeon RX 580 Gaming X 8G, PCI subsystem ID [1462:3417], (Radeon RX 580 chipset, POLARIS10) @3440x1440; latest stable Ubuntu release, (open source) radeon (amdgpu) / mesa video driver
atibox (old): Core2Quad Q9400 (4 cores @2.66GHz), 8 GB RAM, XFX HD-467X-DDF2, PCI subsystem ID [1682:2931], (Radeon HD 4670, RV730 XT) @1680x1050; latest stable Ubuntu release, (open source) radeon / mesa video driver
notebook: HP envy13d020ng
internet access: VDSL2+

· · · How YOU can contribute to MG · Latest development snapshot · How to build yourself · Megapack techtree · Currently hosted MG games · · ·

 

anything