Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » EMF and memory usage
EMF and memory usage [message #1073120] Wed, 24 July 2013 07:16 Go to next message
Tommaso De Sica is currently offline Tommaso De SicaFriend
Messages: 131
Registered: March 2012
Location: Italy
Senior Member

Goodmorning all,

I've got very large model (more than 1GB) to load. So I've implemented a mechanism to find which resources are not used and unload them.

Here is my problem: I remove all references to those resources and I unload them. After unload action my Java heap size decreases but RAM usage of Java VM remains the same. I've try to dump in memory analyzer and I've seen that instances of unnecessary resources are 0.

So why the Java VM process uses the same memory of the moment when the resources are yet loaded?

Am I missing something?
Re: EMF and memory usage [message #1073150 is a reply to message #1073120] Wed, 24 July 2013 08:13 Go to previous messageGo to next message
Leonid Ripeynih is currently offline Leonid RipeynihFriend
Messages: 150
Registered: February 2012
Senior Member
I don't think it's an EMF problem. Whenever Java Heap is GCed, the allocated by Java VM process memory, up to you Xmx will never be shrunk again.
Re: EMF and memory usage [message #1073164 is a reply to message #1073120] Wed, 24 July 2013 08:44 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Tommaso,

Unloading a resource will convert all objects to proxies which involves
setting each object's proxy URI. That will increase heap usage until
such objects are garbage collected. The objects in the resource are
all strongly connected, so if there remains any reference to any object
in the tree, e.g., from other resources, the whole tree will remain in
memory.


On 24/07/2013 9:16 AM, Tommaso De Sica wrote:
> Goodmorning all,
>
> I've got very large model (more than 1GB) to load. So I've implemented
> a mechanism to find which resources are not used and unload them.
>
> Here is my problem: I remove all references to those resources and I
> unload them. After unload action my Java heap size decreases but RAM
> usage of Java VM remains the same. I've try to dump in memory analyzer
> and I've seen that instances of unnecessary resources are 0.
>
> So why the Java VM process uses the same memory of the moment when the
> resources are yet loaded?
>
> Am I missing something?


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:[CDO] Factory not found: org.eclipse.connectors[mongodb]
Next Topic:Modeling implicits (how to?)
Goto Forum:
  


Current Time: Tue Apr 23 08:57:10 GMT 2024

Powered by FUDForum. Page generated in 0.03064 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top