dbTalk Databases Forums  

java collections api + out of memory on load

comp.databases.berkeley-db comp.databases.berkeley-db


Discuss java collections api + out of memory on load in the comp.databases.berkeley-db forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
AT
 
Posts: n/a

Default java collections api + out of memory on load - 05-02-2006 , 08:08 PM






Hi,

I'm a newbie to berkeley db, so apologies in advance for any silly
questions...

I'm reading a large file into my berkeley db using the collections API.
I am using JVM settings of 512 MB, but I keep running out of memory,
perhaps because I am loading it in a very simple way: I am currently
doing a map.put() for each line. Why would there be such a large memory
footprint if I am just adding entries to the db? Is there a faster way
to load in a large, sorted, formatted file?

Thanks very much!


Reply With Quote
  #2  
Old   
Michael Cahill
 
Posts: n/a

Default Re: java collections api + out of memory on load - 05-03-2006 , 09:54 PM






Hi,

Out-of-memory errors can be caused by lots of things. The first thing
to do is to run "db_stat -e" in your environment directory, and look at
the cache and locking regions to see whether some resource has been
exhausted.

Also check how much cache you have allocated, the amount of memory
available to the JVM, and so on. The defaults are quite conservative
and shouldn't cause problems, but if you've allocated a bigger cache
than you have memory for (for example), that could cause problems.

Regards,
Michael.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.