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

Uwe Schindler commented on LUCENE-8389:
---------------------------------------

You are not fully precise what memory is used out, so your question is unclear.

If you give 16 GiB of heap, JIRA and Lucene it will of course use it out - 
thats fine. This has nothing to do with MMapDirectory (see blog post), because 
the filesystem cache is outside of heap, so Lucene uses lots of off-heap space, 
but that's just virtual and has nothing to do with allocated heap space. If you 
run TOP on your Linux installation you will see a column "RES", which should be 
around the heap size plus a bit or extra memory (around 20 GiB) heap. In 
addition the column "VIRT" of top is showing the reserved address space, which 
will be RES plus the size of all open indexes. Depending on index size this can 
be up to several hundreds of gigabytes.

The general rule is: Keep a MINIMUM of 50% of physical RAM free to allow file 
system caching. So if you use 16 GiB cache, you should have at least 32 GiB, 
better 48 GiB of physical RAM in the machine (depending on index size).

So high VM usage in VIRT is wanted and fine. If JIRA is taking lots of heap 
space and really needs 16 GiB this is not our problem, so ask JIRA for help. I 
will close this bug report as "won't fix", as it's not our issue. 

There are rumors that JIRA will update the Lucene support to a later version, 
maybe this will help. Lucene 3.3 is out of maintenance since 6 years.

> Could not limit Lucene's memory consumption
> -------------------------------------------
>
>                 Key: LUCENE-8389
>                 URL: https://issues.apache.org/jira/browse/LUCENE-8389
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: core/index
>    Affects Versions: 3.3
>         Environment: |Java Version|1.8.0_102|
> |Operating System|Linux 3.12.48-52.27-default|
> |Application Server Container|Apache Tomcat/8.5.6|
> |atabase JNDI address|mysql 
> jdbc:mysql://mo-15e744225:3306/jira?useUnicode=true&characterEncoding=UTF8&sessionVariables=default_storage_engine=InnoDB|
> |Database version|5.6.27|
> |abase driver|MySQL Connector Java mysql-connector-java-5.1.34 ( Revision: 
> [email protected] )|
> |Version|7.6.1|
>            Reporter: changchun huang
>            Priority: Major
>
> We are running Jira 7.6.1 with Lucene 3.3 on SLES 12 SP1
> We configured 16GB Jira heap on 64GB server
> However, each time, when we run background re-index, the memory will be used 
> out by Lucene and we could not only limit its memory consumption.
> This definitely will cause overall performance issue on a system with heavy 
> load.
> We have around 500 concurrent users, 400K issues.
> Could you please help to advice if there were workaround  or fix for this?
> Thanks.
>  
> BTW: I did check a lot and found a blog introducing the new behavior of 
> Lucene 3.3
> [http://blog.thetaphi.de/2012/07/use-lucenes-mmapdirectory-on-64bit.html]
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

Reply via email to