-
Notifications
You must be signed in to change notification settings - Fork 185
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
gadgettracermanager: Make gRPC buffer size configurable. #2181
Conversation
1a5ab49
to
b1845c6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think having this number configurable is a really good thing. At which point did it lead to issues? Can you please attach some data/benchmarks around it?
Also, this is about the buffer of events (in number of events, not number of bytes of event data) that we're holding before marshaling them, so it's got nothing to do at that stage with gRPC, yet (gRPC uses buffers on its own, so let's not confuse by calling this gRPC buffer (naming again, I know... hehe) - even though it eventually will get sent over gRPC). So I think eventBufferSize
or eventBufferLen
would be a better name.
Just fyi, sending looks something like this:
Event -> __Event Buffer__ -> Marshaling -> gRPC -> TCP send buffer -> wire
The buffer is mainly used to throw away events if the client is slow in reading the events (and thus the tcp write on the server is blocking), and it especially handles bursts at the start of a gadget run - it also kicks in if marshaling is too slow to keep up (if the CPU is under heavy load for example). It would be interesting to know if increasing the TCP write buffer would also help.
Hi.
As already discussed, everything is available here:
The whole problem here is that since the refactoring we do not have any document and/or figures which depicts the current architecture regarding of events are sent.
I still have a 5% difference between how many events where generated by Best regards. |
b1845c6
to
df0c885
Compare
This commit adds flags and environment values to set events buffer length rather than having it hardcoded. The default value size is set to 16384 to improve horizontal scaling. Signed-off-by: Francis Laniel <flaniel@linux.microsoft.com>
df0c885
to
f8dbe31
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From my side it looks good.
Thank you for the review! |
This commit adds flags and environment values to set gRPC buffer size rather than having it hardcoded.
The default value size is set to 16384 to improve horizontal scaling.