Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-14847

improvement of nodetool status -r

    XMLWordPrintableJSON

Details

    Description

      Hello,

      When using "nodetool status -r", I found a problem that the response time becomes longer depending on the number of vnodes.
      In my testing environment, when the num_token is 256 and the number of nodes is 6, the response takes about 60 seconds.

      It turned out that the findMaxAddressLength method in status.java is causing the delay.
      Despite only obtaining the maximum length of the address by the number of vnodes, `tokenrange * vnode` times also loop processing, there is redundancy.

      To prevent duplicate host names from being referenced every time, I modified to check with hash.
      In my environment, the response time has been reduced from 60 seconds to 2 seconds.

      I attached the patch, so please check it.
      Thank you

      [before]
      Datacenter: dc1
      ===============
      Status=Up/Down
      |/ State=Normal/Leaving/Joining/Moving
      -- Address Load Tokens Owns (effective) Host ID Rack
      UN ******* 559.32 KB 256 48.7% 0555746a-60c2-4717-b042-94ba951ef679 *******
      UN ******* 721.48 KB 256 51.4% 1af4acb6-e0a0-4bcb-8bba-76ae2e225cd5 *******
      UN ******* 699.98 KB 256 48.3% 5215c728-9b80-4e3c-b46b-c5b8e5eb753f *******
      UN ******* 691.65 KB 256 48.1% 57da4edf-4acb-474d-b26c-27f048c37bd6 *******
      UN ******* 705.66 KB 256 52.8% 07520eab-47d2-4f5d-aeeb-f6e599c9b084 *******
      UN ******* 610.87 KB 256 50.7% 6b39acaf-6ed6-42e4-a357-0d258bdf87b7 *******
      
      time : 66s
      
      [after]
      Datacenter: dc1
      ===============
      Status=Up/Down
      |/ State=Normal/Leaving/Joining/Moving
      -- Address Load Tokens Owns (effective) Host ID Rack
      UN ******* 559.32 KB 256 48.7% 0555746a-60c2-4717-b042-94ba951ef679 *******
      UN ******* 721.48 KB 256 51.4% 1af4acb6-e0a0-4bcb-8bba-76ae2e225cd5 *******
      UN ******* 699.98 KB 256 48.3% 5215c728-9b80-4e3c-b46b-c5b8e5eb753f *******
      UN ******* 691.65 KB 256 48.1% 57da4edf-4acb-474d-b26c-27f048c37bd6 *******
      UN ******* 705.66 KB 256 52.8% 07520eab-47d2-4f5d-aeeb-f6e599c9b084 *******
      UN ******* 610.87 KB 256 50.7% 6b39acaf-6ed6-42e4-a357-0d258bdf87b7 *******
      
      time : 2s
      

      Attachments

        1. 3.11.1.patch
          1 kB
          Fumiya Yamashita

        Activity

          People

            fyamashi Fumiya Yamashita
            fyamashi Fumiya Yamashita
            Fumiya Yamashita
            Dinesh Joshi
            Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: