How can I set JVM-Memory in Solr-5.0

How about using -m option

./solr restart -m 1g

From ./solr --help -

-m Sets the min (-Xms) and max (-Xmx) heap size for the JVM, such as: -m 4g results in: -Xms4g -Xmx4g; by default, this script sets the heap size to 512m


This info is in the WIKI: https://cwiki.apache.org/confluence/display/solr/Taking+Solr+to+Production#TakingSolrtoProduction-MemoryandGCSettings

SOLR_JAVA_MEM="-Xms10g -Xmx10g"


Follow the below steps to increase the JVM memory in Solr:

  1. Open solr.in.cmd in any text editor (path: bin/solr.in.cmd)

  2. Add the set SOLR_JAVA_MEM=-Xms1g -Xmx1g ( it will set the minimum and maximum Java heap memory by 1 GB. however you will only able the see 981.38 MB in solr dashboard)

  3. save the solr.in.cmd file and restart the solr

Tags:

Solr