One of the things that you need to take particular care of when you are working on any Java-based application is configuring the JVM optimally, and Solr is no exception.
JVM configuration
Managing the memory heap
Anyone who has worked with Java-based applications would have surely come across setting the heap space. We do it using -Xms and -Xmx. Suppose I set following the command-line option:
-Xms256m -Xmx2048m
Here, Xms specifies our initial memory allocation pool, whereas Xmx specifies the maximum memory allocation pool for JVM. In the case we just saw, our JVM will start with 256 MB of memory and will be able to use up to 2 GB of memory.
If we require more heap space, then we can increase -Xms. We can also decide...