Uwe Schindler ,thanks for your reply. First,I did not use reopens method, even when I start the my program, I can see this two big anon memory at once. Second,if I miss unmap,I will see some other index file map to virtual memory other than anon memory. -----邮件原件----- 发件人: Uwe Schindler [mailto:u...@thetaphi.de] 发送时间: 2010年1月30日 16:47 收件人: java-user@lucene.apache.org 主题: RE: MMapDirectory need twice more virtual memory than actually need?
MMapDirectory should only be used on 64bit machines with 64bit JVMs. This is described in the Javadocs. The additional sizes are caused by reopens and have their reason in specialties with the Java VM, described in 2.9/3.0 Javadocs of the class, please take a look. You can also enable a workaround for the missing “unmap” call. ----- Uwe Schindler H.-H.-Meier-Allee 63, D-28213 Bremen <http://www.thetaphi.de/> http://www.thetaphi.de eMail: u...@thetaphi.de From: luocanrao [mailto:luocan19826...@sohu.com] Sent: Saturday, January 30, 2010 8:31 AM To: java-user@lucene.apache.org Subject: MMapDirectory need twice more virtual memory than actually need? Environment: 64 bit linux,memory 8G When I used pmap instruction to see virtual memory, I found two big anon memory which grows with the index file size. I had the two following pictures to show the problem, can you explain? This is why I got out of memory exception in 32 bit machine. Because my index file size is only 800m. Anon memory picture Indexfile memory picture --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org