[ https://issues.apache.org/jira/browse/LUCENE-2283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12837865#action_12837865 ]
Michael McCandless commented on LUCENE-2283: -------------------------------------------- {quote} ramBufferSizeMB is 64MB Here's the yourkit breakdown per class: {quote} Hmm -- spooky. With ram buffer @ 64MB, DocumentsWriter is using 256MB!? Something is clearly amiss. 40 MB used by StoredFieldsWriter's PerDoc still leaves 152 MB unaccounted for... hmm. bq. If i recall correctly, I think the exception was caused by an out of disk space situation (which would recover) Oh OK. Though... closing the iW vs calling IW.commit should be not different in that regard. Both should have the same transient disk space usage. It's odd you'd see out of disk for .close but not also for .commit. bq. Seems like this would be the best approach as it makes the memory bounded by the configuration of the engine, giving better reuse of byte blocks and better ability to reclaim memory (in DocumentsWriter.balanceRAM()) I agree. I'll mull over how to do it... unless you're planning on consing up a patch ;) How many threads do you pass through IW? Are the threads forever from a static pool, or do they come and go? I'd like to try to simulate your usage (huge docs & tiny docs) in my dev area to see if I can provoke the same behavior. > Possible Memory Leak in StoredFieldsWriter > ------------------------------------------ > > Key: LUCENE-2283 > URL: https://issues.apache.org/jira/browse/LUCENE-2283 > Project: Lucene - Java > Issue Type: Bug > Affects Versions: 2.4.1 > Reporter: Tim Smith > Assignee: Michael McCandless > Fix For: 3.1 > > > StoredFieldsWriter creates a pool of PerDoc instances > this pool will grow but never be reclaimed by any mechanism > furthermore, each PerDoc instance contains a RAMFile. > this RAMFile will also never be truncated (and will only ever grow) (as far > as i can tell) > When feeding documents with large number of stored fields (or one large > dominating stored field) this can result in memory being consumed in the > RAMFile but never reclaimed. Eventually, each pooled PerDoc could grow very > large, even if large documents are rare. > Seems like there should be some attempt to reclaim memory from the PerDoc[] > instance pool (or otherwise limit the size of RAMFiles that are cached) etc -- 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: java-dev-unsubscr...@lucene.apache.org For additional commands, e-mail: java-dev-h...@lucene.apache.org