malinjawi commented on PR #13790: URL: https://github.com/apache/gluten/pull/13790#issuecomment-7161295463
> @malinjawi is this a temporary fallback? Do you know what is the bottleneck? > Thanks @felipepessoto. Yeah, I've been looking at bottlenecks across a few different workloads, and one thing I found is that planning takes some overhead compared to vanilla. I was thinking of ways to work around that with a minimal blast radius, and this is what I came up with. So it's not really meant as a temporary fix. The reason for it: these are Delta's own planning jobs (file listing, data skipping, metadata-only counts), and offloading them makes every Delta query plan slower with nothing gained. Each job is 50 tiny tasks over a handful of log rows, so there is no work for native to speed up. The bottleneck is Gluten's fixed cost per task, not anything in Delta. A task here takes about 0.2 ms on vanilla and 4-10 ms on Gluten: `RowToVeloxColumnarExec` generates an `UnsafeProjection` per partition, each task creates 3-5 native runtimes, and the wide rows go to columnar and back just to filter a few of them. I tried trimming that and got back about a third of the gap at best. Planning time on a 640-file table (ms): | Query | Vanilla | Gluten | This PR | |---|---|---|---| | `count(*)` | 96 | 139 | 105 | | `count(*)` with a data filter | 123 | 212 | 138 | | Filtered scan | 113 | 198 | 137 | Do you see any issues with this approach longterm ? cc: @zhztheplayer lmk your thoughts too. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
