[Java] reduce heap footprint of ValueVectors
- Dominant language
- Java
- Stars
- 94
- Forks
- 152
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 11
Description
In some scenarios, we hold lots of value vectors in memory eg. during join, aggregation. The heap analysis shows that the costs are as follows for a simple IntVector (used VisualVM on mac) :
IntVector : 80 bytes
vector.types.pojo.FieldType : 41 bytes
vector.types.pojo.Field : 40 bytes
IntReaderImpl : 28 bytes
I'll use this Jira to track ways to reduce the heap usage.
**Reporter**: [Pindikura Ravindra](https://issues.apache.org/jira/browse/ARROW-5482) / @pravindra
#### Related issues:
- [[Java] remove FieldReader from ValueVector](https://github.com/apache/arrow-java/issues/411) (is a parent of)
- [[Java] add ValueVector constructors that take a Field object](https://github.com/apache/arrow/issues/21932) (is a parent of)
**Note**: *This issue was originally created as [ARROW-5482](https://issues.apache.org/jira/browse/ARROW-5482). Please see the [migration documentation](https://github.com/apache/arrow/issues/14542) for further details.*
Contributor guide
Research direction
Start by reading the Java ValueVector implementations and the related “remove FieldReader from ValueVector” issue (#411), then reproduce the listed IntVector heap profile with VisualVM. Done should be a measured reduction in the reported ValueVector memory costs, with the affected scenarios and trade-offs documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- performance
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100