Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-11418

Optimize select contant statement min memory reservation

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • Impala 4.0.0, Impala 4.1.0
    • Impala 4.2.0
    • Frontend
    • None
    • ghx-label-2

    Description

      If SPOOL_QUERY_RESULTS is true, then the ResourceProfile sets a min reservation in PlanRootSink.

      For the statement 'select 1', the min reservation is 4MB. It's no problem if the cluster has enough mem available within its process limit to execute the query. But if the host mem not available it will throw 'Failed to get minimum memory reservation'.
      Some connection pools use 'select 1' to check whether the connection is available. The check will fail if memory is oversubscribed.
      For this case we can set the min reservation to 0 to reduce failure when the memory is oversubscribed.
       

      Query: explain select 1
      +--------------------------------------------------------+
      | Explain String                                         |
      +--------------------------------------------------------+
      | Max Per-Host Resource Reservation: Memory=4MB Threads=1 |
      | Per-Host Resource Estimates: Memory=10MB               |
      | Codegen disabled by planner                            |
      |                                                        |
      | PLAN-ROOT SINK                                         |
      | |                                                      |
      | 00:UNION                                               |
      |    constant-operands=1                                 |
      |    row-size=1B cardinality=1                           |
      +--------------------------------------------------------+ 

       

      Attachments

        Issue Links

          Activity

            People

              xqhe Xianqing He
              xqhe Xianqing He
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: