apache / apache/arrow

[C++][Gandiva] Gandiva heavy workloads experienced performance regression with OrcJit upgrade.

Open
#49,412 0 comments 0 reactions 0 assignees View on GitHub
Component: Gandiva Type: enhancement
Dominant language
C++
Stars
17.1k
Forks
4.3k
Avg merge
3d 13h
Merged PRs (30d)
88

Description

### Describe the enhancement requested

The Orc Jit component of LLVM is more modern and supported by the community, compared to MCJit which is being phased out. The change was made here to switch engines: [GH-37848: [C++][Gandiva] Migrate LLVM JIT engine from MCJIT to ORC v2… · apache/arrow@83cba25](https://github.com/apache/arrow/commit/83cba25017a5c3a03e47f1851f242fa284f93533)

At Dremio we've observed a 30% reduction in throughput which has been attributed to the LLVM engine update. This was verified by building and testing version of the Arrow Gandiva jars with and without that change only.

It isn't feasible or desirable to go back to the older engine. The Orc Jit engine is designed to be more modular and usable but that introduces more overhead when creating and destroying the engine internals.

I haven't researched this thoroughly but there may be ways (caching, shared instances, longer lifespan) to tune how LLVM is used with Gandiva which avoids some of the construction costs.

### Component(s)

Gandiva

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.