On 11/17/2015 1:52 AM, 初十 wrote:
> Hello everyone!
>
> I use solr 5.0 with the RAMDirectory and a collection with 3 replication
> and 1 shard,
>
> the leader‘s  load is more higer than others, is it a bug ?

Version 5.2 includes a fix that balances the load better so there is not
such an imbalance between the leader and the other replicas when
indexing.  The leader will always have a slightly higher load even with
this fix, because it coordinates updates with the other nodes.

Upgrading to 5.3.1 would be sensible, but I would also stop using
RAMDirectory.  If you have enough memory to use RAMDirectory, then you
have enough memory to achieve stellar performance with the index on disk
too -- with the advantage that restarting Solr will not erase the
index.  RAMDirectory has problems of its own, which are also discussed
in this article:

http://blog.thetaphi.de/2012/07/use-lucenes-mmapdirectory-on-64bit.html

If you switch to the typical default in 4.x and 5.x
(NRTCachingDirectoryFactory, which uses MMapDirectoryFactory) then you
can use a smaller heap.  The OS will take care of keeping the index in
memory, rather than Solr/Lucene.

Thanks,
Shawn

Reply via email to