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

Use atomics for counting outstanding RPCs in the QPS benchmark #1298

Merged
merged 1 commit into from
Oct 11, 2021

Conversation

glbrntt
Copy link
Collaborator

@glbrntt glbrntt commented Oct 11, 2021

Motivation:

The QPS benchmark synchronises state (the number of outstanding RPCs and
whether RPCs should continue to be made) on an EventLoop. This incurs
unnecessary thread hops for every request.

Modifications:

  • Use two atomics: one tracking how many RPCs are still active and
    another for whether we should continue making RPCs

Result:

Less benchmark overhead.

Motivation:

The QPS benchmark synchronises state (the number of outstanding RPCs and
whether RPCs should continue to be made) on an `EventLoop`. This incurs
unnecessary thread hops for every request.

Modifications:

- Use two atomics: one tracking how many RPCs are still active and
  another for whether we should continue making RPCs

Result:

Less benchmark overhead.
@glbrntt glbrntt added the semver/none No version bump required. label Oct 11, 2021
Copy link
Collaborator

@Lukasa Lukasa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shiny, LGTM.

@glbrntt glbrntt merged commit 7004c6d into grpc:main Oct 11, 2021
@glbrntt glbrntt deleted the gb-qps-use-atomic branch October 11, 2021 09:21
bimawa pushed a commit to StreamLayer/grpc-swift that referenced this pull request Nov 10, 2021
…1298)

Motivation:

The QPS benchmark synchronises state (the number of outstanding RPCs and
whether RPCs should continue to be made) on an `EventLoop`. This incurs
unnecessary thread hops for every request.

Modifications:

- Use two atomics: one tracking how many RPCs are still active and
  another for whether we should continue making RPCs

Result:

Less benchmark overhead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver/none No version bump required.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants