Skip to main content



      Home
Home » Modeling » EMF » EMF and memory usage
EMF and memory usage [message #1073120] Wed, 24 July 2013 03:16 Go to next message
Eclipse UserFriend
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 04:13 Go to previous messageGo to next message
Eclipse UserFriend
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 04:44 Go to previous message
Eclipse UserFriend
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?
Previous Topic:[CDO] Factory not found: org.eclipse.connectors[mongodb]
Next Topic:Modeling implicits (how to?)
Goto Forum:
  


Current Time: Wed Jul 30 17:20:48 EDT 2025

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

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

Back to the top