Here is an example of solrconfig.xml with defaults: Whether to enable the NRTCachingDirectory. The following parameters control NRT caching behavior: The segment is the result of a flush or a merge and the estimated size of the merged segment is Lucene caches a newly created segment if both of the following conditions are true: Solr HDFS optimizes caching when performing NRT indexing using Lucene's NRTCachingDirectory.
Add -XX:MaxDirectMemorySize=20g to the JAVA_OPTS environment variable in /etc/default/solr.To set MaxDirectMemorySize in unmanaged environments: Restart Solr servers after editing the parameter.In the Search box, type Java Direct Memory Size of Solr Server in Bytes.To set MaxDirectMemorySize using Cloudera Manager: Setting MaxDirectMemorySize to the number of slabs multiplied by the slab size does not provide enough memory. Total memory configured for slabs is sufficient. The amount of additional memory required varies according to multiple factors, but for most cases, setting MaxDirectMemorySize to at least 20-30% more than the Therefore, ensure that the MaxDirectMemorySize is set comfortably above the value expected for slabsĪlone. Each Solr slab allocates memory, which is 128 MB by default,Īs well as allocating some additional direct memory overhead. Increasing the direct memory cache size may make it necessary to increase the maximum direct memory size allowed by the JVM. The size of the cache is 8 KB (the block size) times the number of blocks per slab memory.allocationĮnable direct memory allocation. If the block cache is enabled, Cloudera Manager automatically disables the read cache. Override this setting, you must use the Solr Service Environment Advanced Configuration Snippet (Safety Valve). If the block cache is enabled, Cloudera Manager automatically enables the read cache. Enabling this parameter simplifies managing HDFS block cache memory. If blockcache.global is disabled, each SolrCore on a host creates its own private HDFS block cache. If enabled, one HDFS block cache is used for each collection on a host. You must use the Solr Service Environment Advanced Configuration Snippet (Safety Valve). Cloudera Manager automatically enables the global block cache. XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -XX:+PrintGCDetails To rotate the GC logs: -Xloggc: -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=įor Cloudera Manager environments, you can set these flags at Solr service > Configuration > Category > Java Configuration Options for Solr Server.įor unmanaged environments, you can configure Java options by adding or modifying the JAVA_OPTS environment variable in /etc/default/solr: JAVA_OPTS="-Xmx10g -XX:MaxDirectMemorySize=20g \.The minimum recommended GC logging flags are: -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps.To help identify any garbage collector (GC) issues, enable GC logging in production.
If you are working with especially large documents, you may consider decreasing the batch