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

Performance: Provide means to disable read buffer #2013

Closed
euroelessar opened this issue Apr 18, 2018 · 0 comments · Fixed by #2147
Closed

Performance: Provide means to disable read buffer #2013

euroelessar opened this issue Apr 18, 2018 · 0 comments · Fixed by #2147
Assignees
Labels
P2 Type: Performance Performance improvements (CPU, network, memory, etc)

Comments

@euroelessar
Copy link

Please answer these questions before submitting your issue.

What version of gRPC are you using?

grpc-go 1.11

What version of Go are you using (go version)?

go version go1.8.4 linux/amd64

What operating system (Linux, Windows, …) and version?

Linux

What did you do?

I've read golang's TLS and gRPC's http2 server code.

What did you expect to see?

gRPC provides means to disable read buffer for better performance while decreasing memory usage.

What did you see instead?

It looks like both TLS and gRPC have their own read buffers (by default ~8-16KB and 32KB accordingly) and gRPC buffer just performs memory copies from TLS buffer on every Read call without affecting number of syscalls while paying extra memory and cpu costs (for having buffer and performing extra memory copies accordingly).

Is it possible to provide grpc.DisableReadBuffer or similar option, please?

@dfawley dfawley added Type: Performance Performance improvements (CPU, network, memory, etc) P2 labels Apr 19, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Dec 24, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P2 Type: Performance Performance improvements (CPU, network, memory, etc)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants