Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-11927

Use Native Hadoop Library for HFile checksum (And flip default from CRC32 to CRC32C)

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.2.0, 2.0.0
    • Component/s: Performance
    • Labels:
      None
    • Hadoop Flags:
      Reviewed
    • Release Note:
      Hide
      Checksumming is cpu intensive. HBase computes additional checksums for HFiles (hdfs does checksums too) and stores them inline with file data. During reading, these checksums are verified to ensure data is not corrupted. This patch tries to use Hadoop Native Library for checksum computation, if it’s available, otherwise falls back to standard Java libraries. Instructions to load NHL in HBase can be found here (http://hbase.apache.org/book.html#hadoop.native.lib).

      Default checksum algorithm has been changed from CRC32 to CRC32C primarily because of two reasons: 1) CRC32C has better error detection properties, and 2) New Intel processors have a dedicated instruction for crc32c computation (SSE4.2 instruction set)*. This change is fully backward compatible. Also, users should not see any differences except decrease in cpu usage. To keep old settings, set configuration ‘hbase.hstore.checksum.algorithm’ to ‘CRC32’.

      * On linux, run 'cat /proc/cpuinfo’ and look for sse4_2 in list of flags to see if your processor supports SSE4.2.
      Show
      Checksumming is cpu intensive. HBase computes additional checksums for HFiles (hdfs does checksums too) and stores them inline with file data. During reading, these checksums are verified to ensure data is not corrupted. This patch tries to use Hadoop Native Library for checksum computation, if it’s available, otherwise falls back to standard Java libraries. Instructions to load NHL in HBase can be found here ( http://hbase.apache.org/book.html#hadoop.native.lib ). Default checksum algorithm has been changed from CRC32 to CRC32C primarily because of two reasons: 1) CRC32C has better error detection properties, and 2) New Intel processors have a dedicated instruction for crc32c computation (SSE4.2 instruction set)*. This change is fully backward compatible. Also, users should not see any differences except decrease in cpu usage. To keep old settings, set configuration ‘hbase.hstore.checksum.algorithm’ to ‘CRC32’. * On linux, run 'cat /proc/cpuinfo’ and look for sse4_2 in list of flags to see if your processor supports SSE4.2.

      Description

      Up in hadoop they have this change. Let me publish some graphs to show that it makes a difference (CRC is a massive amount of our CPU usage in my profiling of an upload because of compacting, flushing, etc.). We should also make use of native CRCings – especially the 2.6 HDFS-6865 and ilk – in hbase but that is another issue for now.

        Attachments

        1. after-compact-2%.svg
          1.79 MB
          Appy
        2. after-randomWrite1M-0.5%.svg
          2.94 MB
          Appy
        3. before-compact-22%.svg
          1.61 MB
          Appy
        4. before-randomWrite1M-5%.svg
          3.05 MB
          Appy
        5. c2021.crc2.svg
          1.41 MB
          stack
        6. c2021.write.2.svg
          641 kB
          stack
        7. c2021.zip.svg
          1.03 MB
          stack
        8. crc32ct.svg
          1.17 MB
          stack
        9. HBASE-11927.patch
          11 kB
          Appy
        10. HBASE-11927-branch-1.1.patch
          23 kB
          Nick Dimiduk
        11. HBASE-11927-v1.patch
          11 kB
          Appy
        12. HBASE-11927-v2.patch
          11 kB
          Appy
        13. HBASE-11927-v4.patch
          19 kB
          Appy
        14. HBASE-11927-v5.patch
          22 kB
          Appy
        15. HBASE-11927-v6.patch
          22 kB
          Appy
        16. HBASE-11927-v7.patch
          22 kB
          Appy
        17. HBASE-11927-v8.patch
          23 kB
          stack
        18. HBASE-11927-v8.patch
          23 kB
          Appy

          Issue Links

          There are no Sub-Tasks for this issue.

            Activity

              People

              • Assignee:
                appy Appy
                Reporter:
                stack stack
              • Votes:
                0 Vote for this issue
                Watchers:
                13 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: