On 12/6/22 07:53, Shawn Heisey wrote:
If Solr were a single-threaded application, this might make some
sense. But Solr is heavily multithreaded, there is no need to have
multiple nodes per machine to take full advantage of a multi-CPU
system. With multiple nodes, you're actually more likely to have
problems with too many threads competing for CPU resources because
each node has no insight into the other nodes.
This is a jconsole session connected to my tiny Solr install. Tiny
meaning a little over 200K docs and 700MB total index size, with a 1GB
heap. It works with a 512MB heap, I just wanted it to have a little
more room for Java to work in. It is a single Solr node in cloud mode
with embedded ZK:
https://www.dropbox.com/s/i7kceedb6qy5es1/jconsole_showing_solr_threads.png?dl=0
The spike in the graph is when I kicked off a complete reindex.
I've seen busy Solr installs with over 1000 threads. And that's
standalone mode, SolrCloud will have threads that standalone doesn't. A
single Solr node has no trouble using all available CPU resources.
Thanks,
Shawn