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

Uwe Schindler commented on LUCENE-6069:
---------------------------------------

+1 To Robert's patch here, with the reflection I provided as separate patch!

The reflection will be needed for the nuke of Unsafe anyways, because we need 
HotspotMXBean to detect reference size (which is still important, I just 
reviewed the code using all parts using the constant from RAMUsageEstimator). 
If one runs on compact profile on 64 bit without HotspotBean it will just 
assume that a refenece pointer is 8 bytes. If its uses compressed Oops we just 
calculate the size of arrays wrong (by factor of 2).

In my opinion: We should have good constants for huge systems, because with 
heap sizes around several gigabytes, the memory reporting by 
Lucene/Solr/Elasticsearch should not be wrong by factor 2 for some structures. 
I don't care about static object headers or alignments, if they are wrong - it 
has less effect (because we generally have few huge objects in 
FST/Filter/DocValues).

If you use compact profile on some platform, the ram usage reporting is in most 
cases not so interesting, because you are already limited by the platform...

> compile with compact profiles
> -----------------------------
>
>                 Key: LUCENE-6069
>                 URL: https://issues.apache.org/jira/browse/LUCENE-6069
>             Project: Lucene - Core
>          Issue Type: Task
>          Components: general/build
>    Affects Versions: Trunk
>            Reporter: Robert Muir
>            Assignee: Robert Muir
>             Fix For: Trunk
>
>         Attachments: LUCENE-6069.patch, LUCENE-6069.patch, LUCENE-6069.patch
>
>
> If we clean up the 'alignment' calculator in RamUsageEstimator, we can 
> compile core with compact1, and the rest of lucene (except tests) with 
> compact2.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to