Thanks. The G1 docs say "G1 is designed to provide good overall performance without the need to specify additional options."
Would that look like this... GC_TUNE=" \ -XX:+UseG1GC \ " Is that the most minimal config? Is it typical to use it without options? On Tue, Oct 13, 2020 at 4:22 PM Walter Underwood <wun...@wunderwood.org> wrote: > The home page of the Solr admin UI shows all of the options to the JVM. > That will include the choice of garbage collector. > > You can also see the options with “ps -ef | grep solr”. > > wunder > Walter Underwood > wun...@wunderwood.org > http://observer.wunderwood.org/ (my blog) > > > On Oct 13, 2020, at 1:19 PM, Ryan W <rya...@gmail.com> wrote: > > > > I think I have it sorted. At this point I'm using GCG1, I take it, > because > > most recently I started Solr as a service... > > > > service solr start > > > > And that is running solr by way of /etc/init.d/solr because I don't have > > any systemd unit for solr, as explained here... > > > https://askubuntu.com/questions/903354/difference-between-systemctl-and-service-commands > > > > And I can see in the System V script for solr that /etc/default/ > solr.in.sh > > is the relevant config file. > > > > > > On Tue, Oct 13, 2020 at 11:23 AM Ryan W <rya...@gmail.com> wrote: > > > >> Or, perhaps if I start solr like so.... > >> > >> service solr start > >> > >> ...it will use the solr.in.sh at /etc/default/solr.in.sh ? > >> > >> > >> > >> On Tue, Oct 13, 2020 at 11:19 AM Ryan W <rya...@gmail.com> wrote: > >> > >>> This is how I start solr: > >>> > >>> /opt/solr/bin/solr start > >>> > >>> In my /etc/default/solr.in.sh, I have this... > >>> > >>> GC_TUNE=" \ > >>> -XX:+UseG1GC \ > >>> -XX:+ParallelRefProcEnabled \ > >>> -XX:G1HeapRegionSize=8m \ > >>> -XX:MaxGCPauseMillis=200 \ > >>> -XX:+UseLargePages \ > >>> -XX:+AggressiveOpts \ > >>> " > >>> > >>> But I don't know how to tell if Solr is using that file. > >>> > >>> In my /opt/solr/bin there is no solr.in.sh, but there is a > >>> solr.in.sh.orig -- perhaps I should copy my /etc/default/solr.in.sh to > >>> /opt/solr/bin ? > >>> > >>> I am running Linux (RHEL). The Solr version is 7.7.2. Solr 8.x is not > >>> compatible with my application. > >>> > >>> Thank you. > >>> > >>> > >>> On Mon, Oct 12, 2020 at 9:46 PM Shawn Heisey <elyog...@elyograg.org> > >>> wrote: > >>> > >>>> On 10/12/2020 5:11 PM, Ryan W wrote: > >>>>> Thanks. How do I activate the G1GC collector? Do I do this by > >>>> editing a > >>>>> config file, or by adding a parameter when I start solr? > >>>>> > >>>>> Oracle's docs are pointing me to a file that supposedly is at > >>>>> instance-dir/OUD/config/java.properties, but I don't have that path. > >>>> I am > >>>>> not sure what is meant by instance-dir here, but perhaps it means my > >>>> JRE > >>>>> install, which is at > >>>>> /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.262.b10-0.el7_8.x86_64/jre -- > but > >>>>> there is no "OUD" directory in this location. > >>>> > >>>> The collector is chosen by the startup options given to Java, in this > >>>> case by the start script for Solr. I've never heard of it being set > by > >>>> a config in the JRE. > >>>> > >>>> In Solr 7, the start script defaults to the CMS collector. We have > >>>> updated that to G1 in the latest Solr 8.x versions, because CMS has > been > >>>> deprecated by Oracle. > >>>> > >>>> Adding the following lines to the correct solr.in.sh would change the > >>>> garbage collector to G1. I got this from the "bin/solr" script in > Solr > >>>> 8.5.1: > >>>> > >>>> GC_TUNE=('-XX:+UseG1GC' \ > >>>> '-XX:+PerfDisableSharedMem' \ > >>>> '-XX:+ParallelRefProcEnabled' \ > >>>> '-XX:MaxGCPauseMillis=250' \ > >>>> '-XX:+UseLargePages' \ > >>>> '-XX:+AlwaysPreTouch') > >>>> > >>>> If you used the service installer script to install Solr, then the > >>>> correct file to add this to is usually /etc/default/solr.in.sh ... > but > >>>> if you did the install manually, it may be in the same bin directory > >>>> that contains the solr script itself. Your initial message says the > >>>> solr home is /opt/solr/server/solr so I am assuming it's not running > on > >>>> Windows. > >>>> > >>>> Thanks, > >>>> Shawn > >>>> > >>> > >