Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-4835 HDFS scans should operate with a constrained number of I/O buffers
  3. IMPALA-6678

Better estimate of per-column compressed data size for low-NDV columns.

    XMLWordPrintableJSON

Details

    Description

      In the previous IMPALA-4835 patch, we assumed that the "ideal" memory per Parquet column was 3 * 8MB, except when the total size of the file capped the total amount of memory we might use. This is often an overestimate, particular for smaller files, files with large numbers of columns, and highly compressible data.

      We could do something smarter for Parquet given file sizes, per-partition row count, and column NDV. We can estimate row count per file by dividing the row count by the file size and estimate bytes per value with two methods:

      • For fixed width types, estimating bytes per value based on the type width. We don't know what the physical parquet type is necessarily, but it seems reasonable to estimate based on the type declared in the table.
      • log2(ndv) / 8, assuming that dictionary compression or general-purpose compression will kick in.

      See https://docs.google.com/document/d/1kR0zfevNNUJom3sH1XmposacVZ-QALan7NSwnR5CkSA/edit#heading=h.a2b8e8h5a6en for some analysis.
      I looked at encoded lineitem data and saw that many of the scanned columns were 3-4MB in size and that we could have estimated an ideal size < 24MB per column based on the above heuristics.

      Attachments

        Activity

          People

            tarmstrong Tim Armstrong
            tarmstrong Tim Armstrong
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: