Using Ambari Core Services
Also available as:
loading table of contents...

Tuning GC settings for Solr

To use the G1 Garbage Collector with the Ambari Infra Solr Instance, follow these steps.

The garbage collection settings are very important for production Solr instances when indexing many Ranger audit logs. Using the G1 Garbage Collector is also recommended for production deployments.
  1. In Ambari Web, browse to Services > Ambari Infra > Configs.
  2. In Advanced, expand the section for Advanced infra-solr-env .
  3. In the infra-solr-env template, locate the multi-line GC_TUNE environmental variable definition, and replace it with the following content:

    The value used for the -XX:G1HeapRegionSize is based on the 12GB Solr Maximum Heap recommended. If you choose to use a different heap size for the Solr server, please consult the following table for recommendations:

    Table 1. Garbage Collection Heap Size Requirements for Solr
    Heap Size G1HeapRegionSize
    < 4GB 1MB
    4-8GB 2MB
    8-16GB 4MB
    16-32GB 8MB
    32-64GB 16MB
    >64GB 32MB