Uploaded image for project: 'Kudu'
  1. Kudu
  2. KUDU-1712

Schema::EncodeComparableKey burns CPU in compaction

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.0.1
    • 1.4.0
    • perf, tablet
    • None

    Description

      Looking at a workload that is CPU-bound in compaction, the top CPU consumer is kudu::GetKeyEncoder<kudu::faststring>(kudu::TypeInfo const*). This is called for every cell that is part of the compound key, and is quite expensive since it involves a 'div' instruction.

      A very easy win would be to pre-cache the key encoder objects for each of the columns in the schema. A less-easy but probably bigger win would be to codegen the comparable key encoder for the schema.

      Attachments

        Activity

          People

            Unassigned Unassigned
            tlipcon Todd Lipcon
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: