Update
I've configured both xms (initial memory) and xmx (maximum memory allocation jvm paramters, after a restart i've hooked up Visual VM to monitor the Tomcat memory usage. While the indexing process is running, the memory usage of Tomcat seems ok, memory consumption is in range of defined jvm params. (see image)
So it seems that filesystem buffers are consuming all the leftover memory, and does not drop memory? Is there a way handle this behaviour, like change nGram size or directoryFactory?
I'm pretty new to Solr and Tomcat, but here we go:
OS Windows server 2008
- 4 Cpu
- 8 GB Ram
Tomcat Service version 7.0 (64 bit)
- Only running Solr
- No optional JVM parameters set, but Solr config through GUI
Solr version 4.5.0.
- One Core instance (both for querying and indexing)
Schema config:
- minGramSize="2" maxGramSize="20"
- most of the fields are stored = "true" (required)
Solr config:
- ramBufferSizeMB: 100
- maxIndexingThreads: 8
- directoryFactory: MMapDirectory
- autocommit: maxdocs 10000, maxtime 15000, opensearcher false
- cache (defaults):
filtercache initialsize:512 size: 512 autowarm: 0
queryresultcache initialsize:512 size: 512 autowarm: 0
documentcache initialsize:512 size: 512 autowarm: 0
We're using a .Net Service (based on Solr.Net) for updating and inserting documents on a single Solr Core instance. The size of documents sent to Solr vary from 1 Kb up to 8Mb, we're sending the documents in batches, using one or multiple threads. The current size of the Solr Index is about 15GB.
The indexing service is running around 3 a 4 hours to complete all inserts and updates to Solr. While the indexing process is running the Tomcat process memory usage keeps growing up to > 7GB Ram and does not reduce, even after 24 hours.
After a restart of Tomcat, or a Reload Core in the Solr Admin the memory drops back to 1 a 2 GB Ram. Memory leak?
Is it possible to configure the max memory usage for the Solr process on Tomcat? Are there other alternatives? Best practices?
Thanks