-
-
Notifications
You must be signed in to change notification settings - Fork 193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
high number of allocations in kgo.recordToRecord
function
#823
Comments
Alternatively, perhaps the |
In #827 I've proposed a possible solution to the problem. |
I see you took your proposal a good bit further in grafana#3. I used to have a PR 3 there I think is sound but is tricky to follow. I think it's trying to solve a few goals:
I think the implementation does the job, but the code is pretty sketchy to analyze. As well, I think it's not working 100% as intended in the case where you are consuming uncompressed data. Currently, if consuming uncompressed data, nothing is being acquired from the I think some of the buffers could be put back into the pool a bit more aggressively? e.g., I don't know why I'm open to a caching API, but I can't think of a great one yet. I don't think it's something that should be added always for everybody, especially not via globals. |
ref: twmb#823 (comment) Signed-off-by: Miguel Ángel Ortuño <ortuman@gmail.com>
ref: twmb#823 (comment) Signed-off-by: Miguel Ángel Ortuño <ortuman@gmail.com>
ref: twmb#823 (comment) Signed-off-by: Miguel Ángel Ortuño <ortuman@gmail.com>
ref: twmb#823 (comment) Signed-off-by: Miguel Ángel Ortuño <ortuman@gmail.com>
) ref: twmb#823 (comment) Signed-off-by: Miguel Ángel Ortuño <ortuman@gmail.com>
As a result of the large volume of records generated, we’ve observed in one of our consumers a high number of allocations originated in the
kgo.recordToRecord
function (~65%
of total allocations according to the attached screenshot, concretely in this line). This results in a performance degradation caused by GC overhead.Has the possibility of reusing the generated records through a pool ever been considered in order to minimize this effect? Perhaps it could be offered as an optional parameter? I could propose a PR for your review if you consider it.
The text was updated successfully, but these errors were encountered: