Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to reduce solr memory usage?

Tags:

solr

jetty

I use solr in my application, there is just hundreds of documents. the memory usage is about 80M, how to reduce it?

like image 248
fallhunter Avatar asked Oct 10 '09 02:10

fallhunter


People also ask

How much RAM does Solr need?

If your OS, Solr's Java heap, and all other running programs require 4GB of memory, then an ideal memory size for that server is at least 12GB. You might be able to make it work with 8GB total memory (leaving 4GB for disk cache), but that also might NOT be enough.

How Solr uses memory?

Solr uses direct memory to cache data read from disks, mostly index, to improve performance. Direct memory doesn't cause any JVM GC overhead. Direct memory size can be set using CM (Cloudera Manager->Solr configuration->direct memory).


1 Answers

80M is not much, in fact it's pretty much the mininum, you won't go much lower than that.

Some factors that affect memory usage:

  • Input document size
  • Multi-threaded document updates
  • Cache size
  • Facet queries
  • Sorting

References:

  • http://wiki.apache.org/solr/SolrPerformanceFactors#Factors_affecting_memory_usage
  • http://www.nabble.com/Debugging-Solr-memory-usage-heap-problems-td8832794.html
  • http://osdir.com/ml/solr-user.lucene.apache.org/2009-02/msg00050.html
  • http://mail-archives.apache.org/mod_mbox/lucene-solr-user/200905.mbox/%[email protected]%3E
like image 120
Mauricio Scheffer Avatar answered Sep 23 '22 03:09

Mauricio Scheffer