Uh oh!
There was an error while loading. Please reload this page.
HDDS-4185. Remove IncrementalByteBuffer from Ozone client - #1374
Conversation
elek
commented
Sep 1, 2020
The key line is this: If the block/key is smaller than the If block size is bigger than the cc @bshashikant |
elek
commented
Sep 7, 2020
@bshashikant Do you have any feedback? |
bshashikant
commented
Sep 8, 2020
Thanks @elek for putting up the patch together. The patch looks good to me in general. I am just thinking of a scenario like this:
In cases like this, we will end up having too many small buffers (100 bytes in this cases) created (with each write call). Although, the overall key is larger than size, this pattern of write still will lead to allocation of very small buffers which is not desirable for performance as pointed by the perf tests. |
elek
commented
Sep 18, 2020
Thanks the feedback @bshashikant I am not sure if I understood the example. Based on my understanding bufferPool is block specific and not key specific. Writing keys are independent, and full blocks (and pool) are supposed to used for almost all the blocks. |
bshashikant
commented
Sep 18, 2020
If u see BufferPool, the initilization happens in BlockOutputStreamEntryPool which in turn gets initialised in KeyoutputStream. To the second point, the buffer allocation with the patch is driven by the len passed in write call write(b, off, len) or write(b). |
elek
commented
Sep 21, 2020
Had an offline call with @bshashikant This patch couldn't work with keySize=0 (where key size is unknown). The proposed solution is to adjust the size of increment to the size of the buffers. By default, we won't use the IncrementalByteBuffer, but the option will be kept with additional configuration... Closing this PR and opening a new one... |
What changes were proposed in this pull request?
During the teragen test it was identified that the IncrementalByteBuffer is one of the biggest bottlenecks.
In the PR of HDDS-4119 (#1336) a long conversation has been started if it can be removed, or we need other solution to optimize.
This jira is opened to continue the discussion and either remove or optimize the IncrementalByteByffer.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-4185
How was this patch tested?
Checked with basic smoke test locally, and with full green CI on my branch.
And tested with executing related, existing unit tests.