Skip to content

http: round-trip recording in stream info adds 2% CPU overhead in a benchmark #28133

Closed

Description

@wbpcode

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)

This is related to #19103.

Activity

  1. added
    enhancement
    triage
    on Jun 25, 2023
  2. wbpcode commented on Jun 25, 2023

    @wbpcode
    MemberAuthor

    image

  3. added and removed
    triage
    on Jun 25, 2023
  4. wbpcode commented on Jun 25, 2023

    @wbpcode
    MemberAuthor
  5. ggreenway commented on Jun 26, 2023

    @ggreenway
    Member

    Sure, seems reasonable to me. Will it default to on or off?

  6. wbpcode commented on Jun 27, 2023

    @wbpcode
    MemberAuthor

    @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).

  7. ggreenway commented on Jun 27, 2023

    @ggreenway
    Member

    @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).

  8. 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
  9. jmarantz commented on Jun 29, 2023

    @jmarantz
    Contributor

    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.

  10. yanavlasov commented on Jun 29, 2023

    @yanavlasov
    Contributor

    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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/perfenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions