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

    • Sub-task
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • None
    • avatica-1.7.0
    • avatica
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: