lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simon Willnauer (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LUCENE-4022) Offline Sorter wrongly uses MIN_BUFFER_SIZE if there is more memory available
Date Wed, 09 May 2012 11:07:49 GMT

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

Simon Willnauer commented on LUCENE-4022:
-----------------------------------------

bq. How did you come up with the 10x factor though? Is it something off the top of your head?

I wanted to differentiate between a significantly bigger "unallocated" heap to force a grow
if it makes sense so factor 10 seemed to be a good start. I mean this automatic stuff should
be a conservative default that gives you reasonable performance. In the first place it should
make sure your system is stable and doesn't run into OOM etc. It might seem somewhat arbitrarily.
I will add a changes entry and commit this stuff. Seems like robert wants to roll a 3.6.1
soonish ;) 
                
> Offline Sorter wrongly uses MIN_BUFFER_SIZE if there is more memory available
> -----------------------------------------------------------------------------
>
>                 Key: LUCENE-4022
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4022
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: modules/spellchecker
>    Affects Versions: 3.6, 4.0
>            Reporter: Simon Willnauer
>            Assignee: Simon Willnauer
>             Fix For: 4.0, 3.6.1
>
>         Attachments: LUCENE-4022.patch
>
>
> The Sorter we use for offline sorting seems to use the MIN_BUFFER_SIZE as a upper bound
even if there is more memory available. See this snippet:
> {code}
> long half = free/2;
> if (half >= ABSOLUTE_MIN_SORT_BUFFER_SIZE) { 
>   return new BufferSize(Math.min(MIN_BUFFER_SIZE_MB * MB, half));
> }
>       
> // by max mem (heap will grow)
> half = (max - total) / 2;
> return new BufferSize(Math.min(MIN_BUFFER_SIZE_MB * MB, half));
> {code}
> use use use Math.max instead of min here.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message