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

Attachment: signature.asc
Description: PGP signature

Reply via email to