[
https://issues.apache.org/jira/browse/GOBBLIN-1957?focusedWorklogId=890790&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-890790
]
ASF GitHub Bot logged work on GOBBLIN-1957:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 15/Nov/23 21:06
Start Date: 15/Nov/23 21:06
Worklog Time Spent: 10m
Work Description: Will-Lo opened a new pull request, #3828:
URL: https://github.com/apache/gobblin/pull/3828
Dear Gobblin maintainers,
Please accept this PR. I understand that it will not be reviewed until I
have checked off all the steps below!
### JIRA
- [ ] My PR addresses the following [Gobblin
JIRA](https://issues.apache.org/jira/browse/GOBBLIN/) issues and references
them in the PR title. For example, "[GOBBLIN-XXX] My Gobblin PR"
- https://issues.apache.org/jira/browse/GOBBLIN-1957
### Description
- [ ] Here are some details about my PR, including screenshots (if
applicable):
GobblinORCWriter self tune uses a number of metrics to determine how large
their buffers should be for both its own internal buffer used for conversion
and the native ORC writer buffer. However when there are very large record
sizes (100s of kb) the buffers default max size (e.g. 1000) can still hold a
very large amount of data. Observed performance would be hundreds of megabytes
to even a gigabyte depending on the configured batch size maximums.
We want a configuration to impose a maximum buffer max size so that large
records in the buffer do not exceed the size of a stripe, so when it is added
to the native ORC Writer, the native orc writer should be flushing its records
and freeing the memory.
This PR adds the configuration
`gobblin.orcWriter.auto.selfTune.max.buffer.orc.stripe` which when enabled to
`true`, will restrict the max buffer size to be the value of the ORC stripe
size divided by the estimated record size recorded. Since it can still tune the
buffer sizes in between the min value (1) and this maximum, it will not
overfill the buffers like previously recorded.
Since this configuration may impact performance, hid it under a feature flag
as it will lead to less OOM but more frequent memory checks may impact write
speed. However since it should generally be checking as often as it has enough
memory to fill one stripe, this should be acceptable.
### Tests
- [ ] My PR adds the following unit tests __OR__ does not need testing for
this extremely good reason:
Unit tests, tested on large topic, reduction in OOM observed
### Commits
- [ ] My commits all reference JIRA issues in their subject lines, and I
have squashed multiple commits if they address the same issue. In addition, my
commits follow the guidelines from "[How to write a good git commit
message](http://chris.beams.io/posts/git-commit/)":
1. Subject is separated from body by a blank line
2. Subject is limited to 50 characters
3. Subject does not end with a period
4. Subject uses the imperative mood ("add", not "adding")
5. Body wraps at 72 characters
6. Body explains "what" and "why", not "how"
Issue Time Tracking
-------------------
Worklog Id: (was: 890790)
Remaining Estimate: 0h
Time Spent: 10m
> Add feature to improve ORCWriter buffer sizes with large record sizes
> ---------------------------------------------------------------------
>
> Key: GOBBLIN-1957
> URL: https://issues.apache.org/jira/browse/GOBBLIN-1957
> Project: Apache Gobblin
> Issue Type: Improvement
> Components: gobblin-core
> Reporter: William Lo
> Assignee: Abhishek Tiwari
> Priority: Major
> Time Spent: 10m
> Remaining Estimate: 0h
>
> GobblinORCWriter self tune uses a number of metrics to determine how large
> their buffers should be for both its own internal buffer used for conversion
> and the native ORC writer buffer. However when there are very large record
> sizes (100s of kb) the buffers default max size (e.g. 1000) can still hold a
> very large amount of data. Observed performance would be hundreds of
> megabytes to even a gigabyte depending on the configured batch size maximums.
> We want a configuration to impose a maximum buffer max size so that large
> records in the buffer do not exceed the size of a stripe, so when it is added
> to the native ORC Writer, the native orc writer should be flushing its
> records and freeing the memory.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)