Use default chunk size as 4 MB than than 16Mb in arrow's rolling policy

Open
#1,040 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
java
Domain
performance

Research direction

Start by locating the rolling policy implementation containing getRoundedSize and the chunkSize default, then read how CommonUtil.nextPowerOfTwo is used. Compare the policy with Netty's 4 MB default described in the issue. Done means the default uses 4 MB and the existing behavior for request sizes is covered by the relevant tests, if present.

Written by the indexing model from the issue text.

Description

Type: enhancement
Describe the enhancement requested

Apache Arrow currently calculates chunk sizes based on the assumption that Netty's PooledByteBufAllocatorL uses a 16MB page size. If size is blow 16MB, will use nextPowerOfTwo of requestSize.

  public long getRoundedSize(long requestSize) {
    return requestSize < chunkSize ? CommonUtil.nextPowerOfTwo(requestSize) : requestSize;
  }

However, Netty's default maximum buffer size has been reduced from 16MB to 4MB in recent versions (see https://github.com/netty/netty/pull/12108). This mismatch leads to memory inefficiency in scenarios where chunk sizes fall between 4MB and 16MB.

Dominant language
Java
Stars
95
Forks
154
Avg merge
2d 10h
Merged PRs (30d)
11

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/arrow-java

All issues in apache/arrow-java

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.