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

feat: enable tcp no_delay by default for internal services #2527

Merged
merged 1 commit into from
Oct 7, 2023

Conversation

WenyXu
Copy link
Member

@WenyXu WenyXu commented Oct 5, 2023

I hereby agree to the terms of the GreptimeDB CLA

What's changed and what's your intention?

Enable TCP_NODELAY for internal services by default, enabled by default in tonic::transport::server::Router::serve_with_shutdown. However,TcpListenerStream + TcpListener didn't.

For small, sequential requests, Disable TCP_NODELAY is slower ~100x than enabled (used in TcpIncoming).

TL; DR. I'm tuning my program and copying some ideas from the greptimedb repo, which has become slower.
Above(Enable)
Below(Disable)

image

Checklist

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.

Refer to a related PR or issue link (optional)

@WenyXu WenyXu force-pushed the fix/serve_with_tcpincoming branch from 9e7a3e4 to b9663f1 Compare October 5, 2023 16:23
@WenyXu WenyXu changed the title refactor: use serve_with_shutdown instead feat: enable tcp no_delay by default for internal services Oct 5, 2023
@codecov
Copy link

codecov bot commented Oct 5, 2023

Codecov Report

Merging #2527 (b9663f1) into develop (201acd1) will decrease coverage by 0.34%.
The diff coverage is 62.50%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2527      +/-   ##
===========================================
- Coverage    85.28%   84.94%   -0.34%     
===========================================
  Files          730      730              
  Lines       116093   116095       +2     
===========================================
- Hits         99009    98618     -391     
- Misses       17084    17477     +393     

Copy link
Collaborator

@fengjiachun fengjiachun left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@evenyag evenyag left a comment

Choose a reason for hiding this comment

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

LGTM

@evenyag evenyag added this pull request to the merge queue Oct 7, 2023
Merged via the queue into GreptimeTeam:develop with commit 00fe7d1 Oct 7, 2023
21 checks passed
paomian pushed a commit to paomian/greptimedb that referenced this pull request Oct 19, 2023
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

Successfully merging this pull request may close these issues.

3 participants