Memory not released after layer removal

classic Classic list List threaded Threaded
5 messages Options
AndreaB AndreaB
Reply | Threaded
Open this post in threaded view
|

Memory not released after layer removal

Hello everyone,

I'm having problems due to an uncontrolled memory increase in my application even if I have removed the not-necessary image layers.

I have created my application based on osgEarth that loads and unloads at runtime several, potentially huge, image layers in various formats (mainly ECW and TIF). In order to save memory (this is my goal) I load and unload the various layers depending on the current view.

I can't load all the image layers once at startup since they will saturate the memory in a short time (the entire ECW dataset alone occupies 40 GB on disk...).

I have verified that the various image layers are removed (using the method getImageLayers of osgEarth::Map) as expected. However the memory of the application does not decrease accordingly.

Occasionally, after some manual zoom-in + zoom-out sequences the memory seems to be partially released, but it starts increasing again when moving the map.

My configuration is the following:
osgEarth: 2.8.0
OpenSceneGraph: 3.4.0
GDAL: 2.2
Compiler: MSVC2015 64 bit.

What can I check to ensure that the memory is released?

Thanks for your attention.

Andrea
remoe remoe
Reply | Threaded
Open this post in threaded view
|

Re: Memory not released after layer removal

Hi

First, try to use newer osgEarth (2.10) and osg (3.6.3). Then try to reproduce it.

Cheers
Remo Eichenberger, Switzerland
AndreaB AndreaB
Reply | Threaded
Open this post in threaded view
|

Re: Memory not released after layer removal

Thanks Remo for your reply.

Unfortunately I am forced to use that version of osgEarth and OSG at this time.

Anyway, I'have also tried with the newest version of osgEarth and OSG (that I have successfully managed to build a few weeks ago) but the problem seems to be the same.

Andrea
remoe remoe
Reply | Threaded
Open this post in threaded view
|

Re: Memory not released after layer removal

Ok, I've used ECW in the past (10 years ago) and had always issues with it :)
Try to create a TMS repos with jpg or png. You can create it with stock tools from osgEarth:

http://docs.osgearth.org/en/latest/data.html#tips-for-preparing-your-own-data

We use this tools with >2TB data.

Cheers

Remo Eichenberger, Switzerland
AndreaB AndreaB
Reply | Threaded
Open this post in threaded view
|

Re: Memory not released after layer removal

Thanks again Remo,

but unfortunately (again...) my map configuration already manages a TMS up to level 15 and only the last level occupies nearly 50GB on disk. The remaining part of the maps (ECWs and TIFs) cannot be converted to TMS since it is required to zoom up to level 20...and only the ECW TMS would occupy nearly 50 TB...which is unfeasible for my application since I have space limitations of about 256 GB.

Thanks again.

Andrea