You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
http: round-trip recording in stream info adds 2% CPU overhead in a benchmark #28133
add switch for setting round trip time to stream info
#24656 add a new feature to set round trip time to stream info. This introduce one time additional system call for every request.
This operation introduce additional context switch for every HTTP request and ~2% CPU overhead and no any flag or switch was added for that.
Considering this feature is not exposed for now (this round trip time is not exposed by logging or some other things), I think we can add a explicit switch or flag to enable/disable this feature. (or even just remove it if no one need it. cc @DiazAlan)
@ggreenway I think it default should to be off. Because I think most users will not use it and it's high level feature for experts. So, normal users should pay the overhead for it (they even don't know this feature and how to disable it).
@wbpcode yeah that seems fine, because it doesn't appear to be used anywhere yet. But please check with the author (or someone else from google who can look into it's use).
changed the title [-]add switch for setting round trip time to stream info[/-][+]http: round-trip recording in stream info adds 2% CPU overhead in a benchmark[/+]on Jun 29, 2023
I changed the issue title to reflect the problem rather than one possible solution :)
Is it also possible to figure out how to get this functionality w/o that much overhead? Even then we might want a switch because it won't be free. But 2% seems higher than I'd have expected for recording RTT.
As an approximation RTT can be recorded just after TCP connection was established and then used for all requests over that connection. It will not take into account any variation in latency over the lifetime of the connection, but it may be an appropriate tradeoff for 2% of CPU
Activity
wbpcode commentedon Jun 25, 2023
wbpcode commentedon Jun 25, 2023
cc @ggreenway @yanavlasov
ggreenway commentedon Jun 26, 2023
Sure, seems reasonable to me. Will it default to on or off?
wbpcode commentedon Jun 27, 2023
@ggreenway I think it default should to be off. Because I think most users will not use it and it's high level feature for experts. So, normal users should pay the overhead for it (they even don't know this feature and how to disable it).
ggreenway commentedon Jun 27, 2023
@wbpcode yeah that seems fine, because it doesn't appear to be used anywhere yet. But please check with the author (or someone else from google who can look into it's use).
[-]add switch for setting round trip time to stream info[/-][+]http: round-trip recording in stream info adds 2% CPU overhead in a benchmark[/+]jmarantz commentedon Jun 29, 2023
I changed the issue title to reflect the problem rather than one possible solution :)
Is it also possible to figure out how to get this functionality w/o that much overhead? Even then we might want a switch because it won't be free. But 2% seems higher than I'd have expected for recording RTT.
yanavlasov commentedon Jun 29, 2023
As an approximation RTT can be recorded just after TCP connection was established and then used for all requests over that connection. It will not take into account any variation in latency over the lifetime of the connection, but it may be an appropriate tradeoff for 2% of CPU