Reading all the documents is going to be slow. If you want to do that, use a database.
You do NOT keep all of the index in heap. Solr doesn’t work like that. Your JVM heap is probably way too big for 2 million documents, but I doubt that is the performance issue. We use an 8 GB heap for all of our Solr instances, including one with about 5 million docs per shard. wunder Walter Underwood wun...@wunderwood.org http://observer.wunderwood.org/ (my blog) > On Jun 1, 2020, at 8:28 AM, Tarun Jain <tjai...@yahoo.com.INVALID> wrote: > > Hi,I have a SOLR installation in master-slave configuration. The slave is > used only for reads and master for writes. > I wanted to know if there is anything I can do to improve the performance of > the readonly Slave instance? > I am running SOLR 8.5 and Java 14. The JVM has 24GB of ram allocated. Server > has 256 GB of RAM with about 50gb free (rest being used by other services on > the server)The index is 15gb in size with about 2 million documents. > We do a lot of queries where documents are fetched using filter queries and a > few times all 2 million documents are read.My initial idea to speed up SOLR > is that given the amount of memory available, SOLR should be able to keep the > entire index on the heap (I know OS will also cache the disk blocks) > My solrconfig has the following: > <query> <maxBooleanClauses>200000</maxBooleanClauses> <filterCache > class="solr.FastLRUCache" size="512" initialSize="512" autowarmCount="0" /> > <queryResultCache class="solr.LRUCache" size="512" initialSize="512" > autowarmCount="0" /> <documentCache class="solr.LRUCache" size="8192" > initialSize="8192" autowarmCount="0" /> <cache name="perSegFilter" > class="solr.search.LRUCache" size="10" initialSize="0" autowarmCount="10" > regenerator="solr.NoOpRegenerator" /> > <enableLazyFieldLoading>true</enableLazyFieldLoading> > <queryResultWindowSize>20</queryResultWindowSize> > <queryResultMaxDocsCached>200</queryResultMaxDocsCached> > <useColdSearcher>false</useColdSearcher> > <maxWarmingSearchers>2</maxWarmingSearchers> </query> > I have modified the documentCache size to 8192 from 512 but it has not helped > much. > I know this question has probably been asked a few times and I have read > everything I could find out about SOLR cache tuning. I am looking for some > more ideas. > > Any ideas? > Tarun Jain-=-