-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: hibernate sessionfactory memory usage for large database
PostPosted: Mon Aug 27, 2007 4:43 am 
Regular
Regular

Joined: Fri Feb 09, 2007 3:47 pm
Posts: 56
I'm using hibernate 3.2.2 and jboss 4.0.5

I've a huge database to be mapped, consinsting of more than 2000 inter-related tables

It's a legacy setup, so no changes could be done on the db.

The problem is that the startup of the hibernate session factory takes more than 2gb of ram to start.

using the verbose garbage collector, i've found out that the memory usage is 500mb after reading the mapping (hibernate.cfg.xml and relateive hbms) and jumps on 2gb after building the session factory. (under a test 64bit machine with 4gb ram)

the problem is that under a 32 bit architecture the jvm memory limit is 1.5 gb, so the session factory couldn't be built.

is there any way to reduce memory usage without loss of functionality (a performance loss is acceptable)? Something like lazy loading, but for relations and pojo definitions?


Top
 Profile  
 
 Post subject: Re: hibernate sessionfactory memory usage for large database
PostPosted: Mon Aug 27, 2007 12:14 pm 
Beginner
Beginner

Joined: Thu Jan 20, 2005 1:45 pm
Posts: 49
letmein2 wrote:
I'm using hibernate 3.2.2 and jboss 4.0.5

I've a huge database to be mapped, consinsting of more than 2000 inter-related tables

It's a legacy setup, so no changes could be done on the db.

The problem is that the startup of the hibernate session factory takes more than 2gb of ram to start.

using the verbose garbage collector, i've found out that the memory usage is 500mb after reading the mapping (hibernate.cfg.xml and relateive hbms) and jumps on 2gb after building the session factory. (under a test 64bit machine with 4gb ram)

the problem is that under a 32 bit architecture the jvm memory limit is 1.5 gb, so the session factory couldn't be built.

is there any way to reduce memory usage without loss of functionality (a performance loss is acceptable)? Something like lazy loading, but for relations and pojo definitions?


hi did u find any solution We have huge database and same problem with 32 bit machine?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.