Hello Shawn,

Thanks for quick reply.
> > Where precisely are you seeing the 98% usage?
On the Solr web UI. Although the same Solr UI is reporting heap usage
to be below 1 GB.
Also I found that Solr Java is holding(VIRT) 8GB of total memory even
with Xmx set to 2g using top command.

Can it be due to GC not clearing up the memory ?

Sourav Moitra
https://souravmoitra.com
On Thu, Oct 11, 2018 at 10:24 AM Shawn Heisey <apa...@elyograg.org> wrote:
>
> On 10/10/2018 10:08 PM, Sourav Moitra wrote:
> > We have a Solr server with 8gb of memory. We are using solr in cloud
> > mode, solr version is 7.5, Java version is Oracle Java 9 and settings
> > for Xmx and Xms value is 2g but we are observing that the RAM getting
> > used to 98% when doing indexing.
> >
> > How can I ensure that SolrCloud doesn't use more than N GB of memory ?
>
> Where precisely are you seeing the 98% usage?  It is completely normal
> for a modern operating system to report that almost all the system
> memory is in use, at least after the system has been shuffling a lot of
> data.  All modern operating systems will use memory that has not been
> specifically allocated to programs for disk caching purposes, and system
> information tools will generally indicate that this memory is in use,
> even though it can be instantly claimed by any program that requests it.
>
> https://en.wikipedia.org/wiki/Page_cache
>
> If you tell a Java program that it is limited to a 2GB heap, then that
> program will never use more than 2GB, plus a little extra for the java
> runtime itself.  I cannot give you an exact figure for that little bit
> extra.  But every bit of data on disk that Solr accesses will end up (at
> least temporarily) in the operating system's disk cache -- using that
> unallocated memory.
>
> https://wiki.apache.org/solr/SolrPerformanceProblems#RAM
>
> Thanks,
> Shawn
>

Reply via email to