You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gluten.apache.org by "zhztheplayer (via GitHub)" <gi...@apache.org> on 2024/09/06 06:24:02 UTC

[I] [VL] Enable RAS planner by default in Velox backend [incubator-gluten]

zhztheplayer opened a new issue, #7143:
URL: https://github.com/apache/incubator-gluten/issues/7143

   ### Description
   
   RAS planner has been added into code base for 6 months, and it's time to move it forward.
   
   In out company, a internal fallback benchmark, which consists of queries with considerable number of operators fell back to vanilla Spark, has been showing averagely ~20% overall speedup (for certain queries, up to ~300%) when RAS planner is turned on and a well-tuned RAS cost model is set.
   
   Note the cost model we are testing on internally is still based on hardcoded estimated cost numbers for operators, without reading logical statistics from vanilla Spark. So we still have space to enhance the cost model work in future.
   
   And given that we now able to align query plans generated between RAS planner and legacy planner with the new default cost model https://github.com/apache/incubator-gluten/pull/6493, it's feasible now to turn on RAS planner for Velox by default.
   
   Note, one of the biggest difference between RAS planner and legacy planner is that RAS planner doesn't support [whole stage fallback](https://github.com/apache/incubator-gluten/blob/37d09c1092a3916a28f23da9b27cc799a8885a5e/shims/common/src/main/scala/org/apache/gluten/GlutenConfig.scala#L1206-L1212). Since RAS planner achieves similar effect via cost model. If you are using that feature and are not prepared moving to RAS, then in your case RAS should be turned off after the change is made. (TODO: raise a warning or error message to user when whole stage fallback and RAS are both enabled)
   
   And note, switching to RAS planner doesn't mean deprecation of legacy columnar rules. In a way RAS is only in charge of the computation offloading part in the entire columnar planning procedure. Regular Spark columnar rules can still be inserted to RAS's columnar rule list. Meanwhile we will soon add a API for backends for inserting RAS rules as well.
   
   Code references:
   1. RAS rule applier: https://github.com/apache/incubator-gluten/blob/main/gluten-substrait/src/main/scala/org/apache/gluten/extension/columnar/enumerated/EnumeratedApplier.scala
   2. RAS rule list: https://github.com/apache/incubator-gluten/blob/37d09c1092a3916a28f23da9b27cc799a8885a5e/backends-velox/src/main/scala/org/apache/gluten/backendsapi/velox/VeloxRuleApi.scala#L34


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [I] [VL] Enable RAS planner by default in Velox backend [incubator-gluten]

Posted by "DamonZhao-sfu (via GitHub)" <gi...@apache.org>.
DamonZhao-sfu commented on issue #7143:
URL: https://github.com/apache/incubator-gluten/issues/7143#issuecomment-2334812758

   Are there any details on the internal fallback benchmark? I'm doing research on the fallback policy with cost model as well. Thanks! @zhztheplayer  


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [I] [VL] Enable RAS planner by default in Velox backend [incubator-gluten]

Posted by "zhztheplayer (via GitHub)" <gi...@apache.org>.
zhztheplayer commented on issue #7143:
URL: https://github.com/apache/incubator-gluten/issues/7143#issuecomment-2337165254

   Hi @DamonZhao-sfu, this benchmark is currently based on regular TPC benchmark but fallbacks some operators. And per my perspective the benchmark is required to be improved so far since it's not randomized enough. I'll share more results once I get a fuzzier version of it done, which I think is necessary to make this measurement more objective.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org