Skip to content
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

mem package & bufferPoolingThreshold #7593

Closed
nikitacrit opened this issue Sep 6, 2024 · 4 comments
Closed

mem package & bufferPoolingThreshold #7593

nikitacrit opened this issue Sep 6, 2024 · 4 comments
Assignees
Labels
Area: Transport Includes HTTP/2 client/server and HTTP server handler transports and advanced transport features. stale Status: Requires Reporter Clarification Type: Question

Comments

@nikitacrit
Copy link

nikitacrit commented Sep 6, 2024

Hi! Thanks for the new package mem and the optimizations associated with it.
But there is one question, what is the reason for the restriction with bufferPoolingThreshold via IsBelowBufferPoolingThreshold call?
Is there a plan to add the api to change the threshold?
Is PR welcome?

@easwars
Copy link
Contributor

easwars commented Sep 11, 2024

During our initial benchmarking, we found that the mem package was causing a performance degradation for workloads that used very small messages. This was due to the overhead of allocating a struct which contained the reference count on the underlying byte slice, and a reference to the slice itself. To overcome this, we added this mechanism where we would not reference count byte slices which were under a predefined size.

We don't have plans to make this threshold configurable, but if there is a valid use-case for it, we will definitely consider it.

Could you please let us know why you want to tweak this threshold? Thanks

@PapaCharlie @dfawley

Copy link

This issue is labeled as requiring an update from the reporter, and no update has been received after 6 days. If no update is provided in the next 7 days, this issue will be automatically closed.

@github-actions github-actions bot added the stale label Sep 17, 2024
@coxley
Copy link
Contributor

coxley commented Sep 18, 2024

@nikitacrit I would recommend doing some benchmarking with your usecase — if you vendor dependencies with go mod vendor, you should be able to adjust the threshold to see if it'd actually be worth it.

@github-actions github-actions bot removed the stale label Sep 18, 2024
@purnesh42H purnesh42H added Area: RPC Features Includes Compression, Encoding, Attributes/Metadata, Interceptors. Area: Transport Includes HTTP/2 client/server and HTTP server handler transports and advanced transport features. and removed Area: RPC Features Includes Compression, Encoding, Attributes/Metadata, Interceptors. labels Sep 23, 2024
Copy link

This issue is labeled as requiring an update from the reporter, and no update has been received after 6 days. If no update is provided in the next 7 days, this issue will be automatically closed.

@github-actions github-actions bot added the stale label Sep 29, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Transport Includes HTTP/2 client/server and HTTP server handler transports and advanced transport features. stale Status: Requires Reporter Clarification Type: Question
Projects
None yet
Development

No branches or pull requests

5 participants