[jboss-user] [JBossCache] - Re: Jboss cache and heapspace memory
haribaasha
do-not-reply at jboss.com
Wed Nov 14 07:00:28 EST 2007
ok, now i had a look at the BDbje code and noticed that it takes about 60 percent of the total memory, which is 60 percent of the 1024 i allocated in Xmx. so it caches all the objects already present in jbosscache and the copy of all this i s also there in the persistent storage.
now je is supposed to take in a je.properties when forming the environment , but looking at bdbjecacheloader we pass the envdir from there as java.io.tmpdir which is /tmp/ directory on unix systems. this is the reason why my putting je.properties everywhere(conf, lib, bin) didnt make any difference to the bdbjeconfig(it kept starting with cachepercent at 60 )
patching the BdbjeCacheloader to set the percentage of memory berkleydb should take for its inmemory cache to a bare minimum solves the problem.
in the method start():
i added this saying bdbje to use only 5 percent of total memory for its inmemory and put the whole thing in persistent.
envConfig.setPercent(5);
now everything works fine.the maxmemory used comes down from 1G to 500M and once the process is over gc kicks in and brings it down to 160M. previously it never even came down from 1G
Hope this helps!!
Hari
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4104502#4104502
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4104502
More information about the jboss-user
mailing list