Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Managing huge amount of entities(Discussing java se client approach in focus of memory consumption)
Managing huge amount of entities [message #727226] Tue, 20 September 2011 12:36 Go to next message
Sven Klemm is currently offline Sven Klemm
Messages: 8
Registered: June 2011
Junior Member
We tried to let eclipselink manage more than 2,000 tables in a java se enviroment with static weaving and lazy loading enabled, database session behaviour (1 application session = 1 db session) and some descriptorcustomizer.
as expected
- fetching a huge set of rows (30,000) in a collection of managed entity object case some memory consumption (200 MB) [tried with only one table/managed entity object and fetching 30,000 rows]
- managing 2,500 entity objects cause a control overhead in eclipselink 300 MB [tried with 2,500 table/managed entity objects and fetching 1 row]

but as not expected: both items are influence each other: 2,500 table/managed entity objects and fetching 10,000 rows eclipselink uses 900 MB - why?

with regards
Sven
Re: Managing huge amount of entities [message #727681 is a reply to message #727226] Wed, 21 September 2011 15:54 Go to previous message
Chris Delahunt is currently offline Chris Delahunt
Messages: 1016
Registered: July 2009
Senior Member
I am not sure I understand what is expected, is 900MB higher or lower than you expect? If 10k of one particular object takes up (200MB/3) 67MB, I would expect that 10k of each of the 2500 different object types would take upto 167GB (1/3 of 200 times 2500).

This is probably more than your JVM memory can handle, and so garbage collection would run and clean up any references not being used, depending on the cache settings. The default caching strategy uses hard references for a fixed size cache, and then soft references for the identity map. These soft references would allow the objects to be garbage collected as needed by the JVM. So 900MB could be reasonable depending on how the test is being run and the configuration options being used.

http://wiki.eclipse.org/Introduction_to_Cache_%28ELUG%29
describes caching in EclipseLink in general, and
http://wiki.eclipse.org/EclipseLink/Examples/JPA/Caching
with how it relates to JPA.

Best Regards,
Chris
(no subject) [message #727688 is a reply to message #727226] Wed, 21 September 2011 15:54 Go to previous message
Chris Delahunt is currently offline Chris Delahunt
Messages: 1016
Registered: July 2009
Senior Member
I am not sure I understand what is expected, is 900MB higher or lower than you expect? If 10k of one particular object takes up (200MB/3) 67MB, I would expect that 10k of each of the 2500 different object types would take upto 167GB (1/3 of 200 times 2500).

This is probably more than your JVM memory can handle, and so garbage collection would run and clean up any references not being used, depending on the cache settings. The default caching strategy uses hard references for a fixed size cache, and then soft references for the identity map. These soft references would allow the objects to be garbage collected as needed by the JVM. So 900MB could be reasonable depending on how the test is being run and the configuration options being used.

http://wiki.eclipse.org/Introduction_to_Cache_%28ELUG%29
describes caching in EclipseLink in general, and
http://wiki.eclipse.org/EclipseLink/Examples/JPA/Caching
with how it relates to JPA.

Best Regards,
Chris
Previous Topic:Export to Runnable JAR
Next Topic:desktop Swing application with EclipseLink
Goto Forum:
  


Current Time: Wed Jul 30 21:38:14 EDT 2014

Powered by FUDForum. Page generated in 0.01896 seconds