You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kudu.apache.org by "Todd Lipcon (JIRA)" <ji...@apache.org> on 2016/10/19 18:30:58 UTC

[jira] [Created] (KUDU-1712) Schema::EncodeComparableKey burns CPU in compaction

Todd Lipcon created KUDU-1712:
---------------------------------

             Summary: Schema::EncodeComparableKey burns CPU in compaction
                 Key: KUDU-1712
                 URL: https://issues.apache.org/jira/browse/KUDU-1712
             Project: Kudu
          Issue Type: Bug
          Components: perf, tablet
    Affects Versions: 1.0.1
            Reporter: Todd Lipcon


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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)