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

Question about setting stream window size #508

Open
asagrat opened this issue Aug 14, 2024 · 5 comments
Open

Question about setting stream window size #508

asagrat opened this issue Aug 14, 2024 · 5 comments

Comments

@asagrat
Copy link

asagrat commented Aug 14, 2024

Hi All,

Is there any option to explicitly set window size? Or it's hardcoded? What is the value in this case?

Maybe window size is dynamically calculated based on some system/environment factors (so that implicitly we can influence window size)?

@karimra
Copy link
Collaborator

karimra commented Aug 15, 2024

This is handled by the underlying gRPC package. Is there is a specific reason you want to manually set the window size ?

@asagrat
Copy link
Author

asagrat commented Aug 21, 2024 via email

@LimeHat
Copy link

LimeHat commented Aug 21, 2024

Not mandatory but will help with efficiency.

Just out of curiosity, how is the efficiency defined in this case?

We can expose the InitialConnWindowSize and InitialWindowSize settings, which disable the dynamic BDP estimator and allow you to manually configure the initial window size for the connection and streams. That should be a trivial change

Maybe window size is dynamically calculated based on some system/environment factors (so that implicitly we can influence window size)?

It is, based on BDP.
https://github.com/grpc/grpc-go/blob/master/internal/transport/bdp_estimator.go

@asagrat
Copy link
Author

asagrat commented Aug 21, 2024 via email

@karimra
Copy link
Collaborator

karimra commented Aug 22, 2024

You can increase the target buffer size to move more messages at once from gRPC to the output(s).

targets:
  router1:
    # other fields
    buffer-size: 1000 # defaults to 100

If you consider that the window size is not enough, it's probably that gNMIc is not able to write fast enough to the output and the gRPC congestion control is kicking in. There are ways to improve that depending on which output you are using.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants