lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrzej Bialecki (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-13427) Support simulating the execution of autoscaling suggestion
Date Sat, 27 Apr 2019 11:08:00 GMT

    [ https://issues.apache.org/jira/browse/SOLR-13427?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16827564#comment-16827564
] 

Andrzej Bialecki  commented on SOLR-13427:
------------------------------------------

Example output from an instance created with {{bin/solr start -e cloud}}, with a manually
introduced imbalance in the number of replicas on one node. Initial statistics and suggestions
show that 2 improvements (replica movements) are suggested. In the latter section we see the
result of the simulation where all suggestions have been applied and the STATISTICS section
shows that the cluster is well balanced.

{code}
~/lucene/solr$ bin/solr autoscaling -verbose -s -stats -simulate
INFO  - 2019-04-25 15:09:07.805; org.apache.solr.common.cloud.ConnectionManager; zkClient
has connected
INFO  - 2019-04-25 15:09:07.822; org.apache.solr.common.cloud.ZkStateReader; Updated live
nodes from ZooKeeper... (0) -> (2)
INFO  - 2019-04-25 15:09:07.841; org.apache.solr.client.solrj.impl.ZkClientClusterStateProvider;
Cluster at localhost:9983 ready
INFO  - 2019-04-25 15:09:07.845; org.apache.solr.util.SolrCLI; - reading autoscaling config
from the cluster.
INFO  - 2019-04-25 15:09:07.901; org.apache.solr.core.SolrResourceLoader; solr home defaulted
to 'solr/' (could not find system property or JNDI)
INFO  - 2019-04-25 15:09:08.227; org.apache.solr.util.SolrCLI; - calculating suggestions...
INFO  - 2019-04-25 15:09:08.252; org.apache.solr.util.SolrCLI;   (took 22 ms)
INFO  - 2019-04-25 15:09:08.252; org.apache.solr.util.SolrCLI; - calculating diagnostics...
INFO  - 2019-04-25 15:09:08.255; org.apache.solr.util.SolrCLI;   (took 2 ms)
INFO  - 2019-04-25 15:09:08.264; org.apache.solr.util.SolrCLI; -- step 1, 2 suggestions.
INFO  - 2019-04-25 15:09:08.723; org.apache.solr.util.SolrCLI; -- step 2, 0 suggestions.
INFO  - 2019-04-25 15:09:08.724; org.apache.solr.util.SolrCLI; - calculating suggestions...
INFO  - 2019-04-25 15:09:08.725; org.apache.solr.util.SolrCLI;   (took 1 ms)
INFO  - 2019-04-25 15:09:08.726; org.apache.solr.util.SolrCLI; - calculating diagnostics...
INFO  - 2019-04-25 15:09:08.726; org.apache.solr.util.SolrCLI;   (took 0 ms)
{
  "STATISTICS":{
    "coresPerNodes":{
      "2":1,
      "6":1},
    "nodeStats":{
      "10.37.129.2:7574_solr":{
        "isLive":true,
        "freedisk":22.517475128173828,
        "totaldisk":465.62699127197266,
        "cores":2,
        "replicas":{"gettingstarted":{
            "shard1_replica_n1":{
              "INDEX.sizeInBytes":69,
              "coreNode":"core_node3"},
            "shard2_replica_n4":{
              "INDEX.sizeInBytes":69,
              "coreNode":"core_node7"}}}},
      "10.37.129.2:8983_solr":{
        "isLive":true,
        "freedisk":22.517475128173828,
        "totaldisk":465.62699127197266,
        "cores":6,
        "replicas":{"gettingstarted":{
            "shard1_replica_n11":{
              "INDEX.sizeInBytes":135,
              "coreNode":"core_node12"},
            "shard1_replica_n13":{
              "INDEX.sizeInBytes":135,
              "coreNode":"core_node14"},
            "shard1_replica_n15":{
              "INDEX.sizeInBytes":69,
              "coreNode":"core_node16"},
            "shard1_replica_n2":{
              "INDEX.sizeInBytes":69,
              "coreNode":"core_node5",
              "leader":true},
            "shard1_replica_n9":{
              "INDEX.sizeInBytes":135,
              "coreNode":"core_node10"},
            "shard2_replica_n6":{
              "INDEX.sizeInBytes":69,
              "coreNode":"core_node8",
              "leader":true}}}}},
    "collectionStats":{"gettingstarted":{
        "activeShards":2,
        "inactiveShards":0,
        "rf":2,
        "maxShardsPerNode":-1,
        "maxActualShardsPerNode":2,
        "minActualShardsPerNode":2,
        "maxShardReplicasPerNode":5,
        "minShardReplicasPerNode":1,
        "numCores":8,
        "numNodes":2,
        "maxCoresPerNode":6,
        "minCoresPerNode":2,
        "avgShardSize":6.426125764846802E-8,
        "maxShardSize":6.426125764846802E-8,
        "minShardSize":6.426125764846802E-8}}},
  "SUGGESTIONS":[
    {
      "type":"improvement",
      "operation":{
        "method":"POST",
        "path":"/c/gettingstarted",
        "command":{"move-replica":{
            "targetNode":"10.37.129.2:7574_solr",
            "inPlaceMove":"true",
            "replica":"core_node8"}}}},
    {
      "type":"improvement",
      "operation":{
        "method":"POST",
        "path":"/c/gettingstarted",
        "command":{"move-replica":{
            "targetNode":"10.37.129.2:7574_solr",
            "inPlaceMove":"true",
            "replica":"core_node5"}}}}],
  "simulation":{
    "intermediateSuggestions":{"step1":[
        {
          "type":"improvement",
          "operation":{
            "method":"POST",
            "path":"/c/gettingstarted",
            "command":{"move-replica":{
                "targetNode":"10.37.129.2:7574_solr",
                "inPlaceMove":"true",
                "replica":"core_node8"}}}},
        {
          "type":"improvement",
          "operation":{
            "method":"POST",
            "path":"/c/gettingstarted",
            "command":{"move-replica":{
                "targetNode":"10.37.129.2:7574_solr",
                "inPlaceMove":"true",
                "replica":"core_node5"}}}}]},
    "finalState":{
      "STATISTICS":{
        "coresPerNodes":{"4":2},
        "nodeStats":{
          "10.37.129.2:7574_solr":{
            "isLive":true,
            "freedisk":22.5174560546875,
            "totaldisk":465.62699127197266,
            "cores":4,
            "replicas":{"gettingstarted":{
                "shard1_replica_n1":{
                  "INDEX.sizeInBytes":69,
                  "coreNode":"core_node3"},
                "shard1_replica_n19":{
                  "INDEX.sizeInGB":9.5367431640625E-6,
                  "INDEX.sizeInBytes":10240,
                  "coreNode":"core_node20"},
                "shard2_replica_n17":{
                  "INDEX.sizeInGB":9.5367431640625E-6,
                  "INDEX.sizeInBytes":10240,
                  "coreNode":"core_node18",
                  "leader":true},
                "shard2_replica_n4":{
                  "INDEX.sizeInBytes":69,
                  "coreNode":"core_node7"}}}},
          "10.37.129.2:8983_solr":{
            "isLive":true,
            "freedisk":22.517475256696343,
            "totaldisk":465.62699127197266,
            "cores":4,
            "replicas":{"gettingstarted":{
                "shard1_replica_n11":{
                  "INDEX.sizeInBytes":135,
                  "coreNode":"core_node12"},
                "shard1_replica_n13":{
                  "INDEX.sizeInBytes":135,
                  "coreNode":"core_node14"},
                "shard1_replica_n15":{
                  "INDEX.sizeInBytes":69,
                  "coreNode":"core_node16"},
                "shard1_replica_n9":{
                  "INDEX.sizeInBytes":135,
                  "coreNode":"core_node10",
                  "leader":true}}}}},
        "collectionStats":{"gettingstarted":{
            "activeShards":2,
            "inactiveShards":0,
            "rf":2,
            "maxShardsPerNode":-1,
            "maxActualShardsPerNode":2,
            "minActualShardsPerNode":1,
            "maxShardReplicasPerNode":4,
            "minShardReplicasPerNode":2,
            "numCores":8,
            "numNodes":2,
            "maxCoresPerNode":4,
            "minCoresPerNode":4,
            "avgShardSize":4.831235855817795E-6,
            "maxShardSize":9.5367431640625E-6,
            "minShardSize":1.257285475730896E-7}}},
      "SUGGESTIONS":[]}}}
{code}

> Support simulating the execution of autoscaling suggestion
> ----------------------------------------------------------
>
>                 Key: SOLR-13427
>                 URL: https://issues.apache.org/jira/browse/SOLR-13427
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: AutoScaling
>            Reporter: Andrzej Bialecki 
>            Assignee: Andrzej Bialecki 
>            Priority: Major
>             Fix For: master (9.0)
>
>         Attachments: SOLR-13427.patch
>
>
> It's not always clear what would be the final state of the cluster after applying the
suggested changes (obtained from {{/autoscaling/suggestions}}), especially on a large and
busy cluster where several autoscaling rules have to be considered.
> This issue proposes to use the simulation framework for simulating the effects of the
suggestions.
> First, the simulator would be initialized from the current state of a real cluster. Then
it would run several rounds of simulated execution of suggestions until there were either
no more suggestions (the cluster would be perfectly balanced) or the iteration count limit
was reached.
> This simulation could be executed using either the deployed autoscaling config or one
provided by the user, which would make it easier to test the effects of various configurations
on the cluster layout.
> Support for this functionality would be integrated into the existing {{SolrCLI autoscaling}}
tool.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message