It probably can work out reasonably well in both scenarios, but you do get some additional flexibility with multiple Tomcat instances:

1. Any "per-instance" Tomcat limits become per-core rather than for all cores on that machine.
2. If you have to restart Tomcat, only a single shard is impacted.
3. There are probably a fair number of little details that work better and with more parallelism if each Solr core is a separate JVM. E.g. BooleanQuery.maxTerms is across the whole JVM; PDFBox for Tika in SolrCell can have threads blocked due to a shared resource that is shared across cores in the JVM (was an issue - not sure if still an issue). But of course your usage may not run into any of them. It will depend a lot as well on how many CPU "cores" you have.

-- Jack Krupansky

-----Original Message----- From: Christian von Wendt-Jensen
Sent: Tuesday, June 05, 2012 7:22 AM
To: solr-user@lucene.apache.org
Subject: Solr instances: many singles vs multi-core

Hi,

I'm runing a cluster of Solr serveres for an index split up in a lot of shards. Each shard is replicated. Current setup is one Tomcat instance per shard, even if the Tomcats are running on the same machine.

My question is this:

Would it be more advisable to run one Tomcat per machine with all the shards as cores, or is the current setup the best, where each shard is running in its own Tomcat.

As I see it, i would think that One Tomcat running multiple cores is better as it reduces the overhead of having many Tomcat instances, and it there is the possibility to let the cores share all available memory after how much they actually need. In the One Shard/One Tomcat scenario, each instance must have it predefined memory settings wether or not it needs more or less.

Any opinions on the matter?



Med venlig hilsen / Best Regards

Christian von Wendt-Jensen

Reply via email to