Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-1091 Reduce Avatica RPC latency umbrella
  3. CALCITE-1086

Statement is unnecessarily sent from client in update (write) path

    XMLWordPrintableJSON

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: avatica-1.7.0
    • Component/s: avatica
    • Labels:
      None

      Description

      I've had my nose buried in profilers and Avatica evaluating the write performance. Using Phoenix as the golden child, it was found that, compared to HBase REST server (also doing updates over HTTP), Avatica was performing quite a bit slower (2-3x).

      The client was doing something like:

      prepare()
      for x in 0..1000:
        for x in 0..1000:
          execute()
        end
        commit()
      end
      

      One of the first big things that jumped out at me was that we were spending a significant amount of time deserializing Meta.Signature (and all of its internal classes: AvaticaParameter, ColumnMetaData, CursorFactory, Style, etc).

      When we're ultimately doing a PreparedStatement.executeUpdate() inside JdbcMeta.execute(), we completely ignore the Signature. This turns out to be relatively significant WRT the entire cost of the execute. At the 99th percentile, serialization was taking ~40% of the time of the entire execute RPC. My hunch is that if we can drop the Statement from the client (when they use executeUpdate(), anyways), we can get a nice reduction in update latency.

        Attachments

          Activity

            People

            • Assignee:
              elserj Josh Elser
              Reporter:
              elserj Josh Elser
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: