>    Set -Xms to "I know it wants at least this much".
>    Set -Xmx to significantly, but not wildly, more.


no, always set them to the same no matter what.  I like increments of 1024M
so I would start at 2048M and work up to 8gb and see how it performs.
Having a test script that forks to how many users at one given point you
are expecting helps a lot to see what is going to happen in the real
world.




On Thu, Mar 9, 2023 at 8:39 AM Mark H. Wood <mw...@iupui.edu> wrote:

> On Thu, Mar 09, 2023 at 01:56:11PM +0100, Jan Høydahl wrote:
> > It's a waste to set heap to 30g if your use of Solr only requires 6g to
> function. That is 24G memory not being used for index caching, and it will
> may, depending on chose GC, cause bigger/longer GC events as more garbage
> piles up before collection.
> >
> > You have to measure and experiment to find your heap sweetspot.
>
> Very sensible.
>
> It seems to me that there are two situations:
>
> 1  I don't know how much heap is right for my appllication:
>    Set -Xms to "I know it wants at least this much".
>    Set -Xmx to significantly, but not wildly, more.
>    Monitor performance.
>    If better than previous settings, set -Xms to -Xmx and increase -Xmx.
>    Repeat until performance is worse or the heap never expands beyond
>    -Xms.  If it got worse, then back off.
>    You are now in the second situation.
>
> 2  I know how much heap is right for my application:
>    Set -Xms = -Xmx = that much.
>    Continue to monitor, because workloads can change.
>
> Comments?
>
> --
> Mark H. Wood
> Lead Technology Analyst
>
> University Library
> Indiana University - Purdue University Indianapolis
> 755 W. Michigan Street
> Indianapolis, IN 46202
> 317-274-0749
> www.ulib.iupui.edu
>

Reply via email to