You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "David Smiley (Jira)" <ji...@apache.org> on 2026/03/30 21:47:00 UTC

[jira] [Resolved] (SOLR-17076) Replica Placement could be slow for new collection creation with high amount of shards in a cluster with plenty of replicas

     [ https://issues.apache.org/jira/browse/SOLR-17076?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Smiley resolved SOLR-17076.
---------------------------------
    Fix Version/s: 9.5
       Resolution: Fixed

There's definitely a performance issue in such an environment (massive replica count across the cluster).  So much so that at Salesforce we switched to a custom randomized placement plugin that ignores node stats altogether.

> Replica Placement could be slow for new collection creation with high amount of shards in a cluster with plenty of replicas
> ---------------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-17076
>                 URL: https://issues.apache.org/jira/browse/SOLR-17076
>             Project: Solr
>          Issue Type: Improvement
>          Components: SolrCloud
>    Affects Versions: 9.3
>            Reporter: Patson Luk
>            Priority: Major
>             Fix For: 9.5
>
>          Time Spent: 1h 50m
>  Remaining Estimate: 0h
>
> It's found in our cluster with hundreds of thousands of replicas that collection creation is slow when the new collection has thousands of shards.
> In particular there are 4 mins+ computation time spent between the [collection initial creation|https://github.com/apache/solr/blob/ebcb3b92f6f0b2736d312a83de9d2ccadc0980aa/solr/core/src/java/org/apache/solr/cloud/api/collections/CreateCollectionCmd.java#L115] and [the SliceMutator creating slice|https://github.com/apache/solr/blob/ebcb3b92f6f0b2736d312a83de9d2ccadc0980aa/solr/core/src/java/org/apache/solr/cloud/api/collections/CreateCollectionCmd.java#L336]
> With some profiling and metrics checking, it appears that during those 4 mins, almost all of the CPU time is spent in {{org.apache.solr.cluster.placement.plugins.OrderedNodePlacementPlugin$WeightedNode.getAllReplicasOnNode}}.
> For each new shard, it invokes this method to compute the weight which iterates on all collection and shard,  with creation of a new replica set. This computation is costly for our environment based on the profiler and CPU metrics.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org