[ 
https://issues.apache.org/jira/browse/LUCENE-1091?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12552772
 ] 

Grant Ingersoll commented on LUCENE-1091:
-----------------------------------------

My understanding of virtual memory is this is just the OS being smart about 
making sure any given process will have the memory it needs when it needs it, 
plus it will be able to swap it out when needed.  
http://tweakhound.com/xp/virtualmemory.htm and 
http://forums.cnet.com/5208-6142_102-0.html?forumID=7&threadID=42641&messageID=499859
 might be of some help.

I don't know if you are actually seeing any problem.  On OS X, I routinely see 
IntelliJ and other applications with a large gap between the physical memory 
and the virtual memory.  For instance, right now IntelliJ physical mem is 
~450MB while the virtual mem is ~1GB.  Even w/ that, IntelliJ itself is 
reporting that memory available for garbage collection (in the lower right 
corner) is around 200M.  Try Googling for XP Process Manager virtual memory or 
something like that to read more on it.

Granted, I am no expert in how operating systems implement this, but it doesn't 
seem to me like there actually is a problem.  I would worry more about what the 
JDK is returning based on Doron's test, which seems to be reasonable.

> Big IndexWriter memory leak: when Field.Index.TOKENIZED
> -------------------------------------------------------
>
>                 Key: LUCENE-1091
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1091
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Index
>    Affects Versions: 2.2
>         Environment: Ubuntu Linux 7.10, 32-bit
> Java 1.6.0 buld 1.6.0_03-b05 (default in Ubuntu 7.10)
> 1GB RAM
>            Reporter: Mirza Hadzic
>         Attachments: lucene.txt, LuceneOOM.PNG, TestOOM.java
>
>
> This little program eats incrementally 2MB of virtual RAM per each 1000 
> documents indexed, only when Field.Index.TOKENIZED used :
> public Document getDoc() {
>    Document document = new Document();
>    document.add(new Field("foo", "foo bar", Field.Store.NO, 
> Field.Index.TOKENIZED));
>    return document;
> }
> public Document run() {
>    IndexWriter writer = new IndexWriter(new File(jIndexFileName), new 
> StandardAnalyzer(), true);                                      
>    for (int i = 0; i < 1000000; i++) {
>       writer.addDocument(getDoc());
>    }
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to