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

Replace stdlib write/read with send/recv #12673

Closed
franz1981 opened this issue Aug 6, 2022 · 4 comments
Closed

Replace stdlib write/read with send/recv #12673

franz1981 opened this issue Aug 6, 2022 · 4 comments

Comments

@franz1981
Copy link
Contributor

franz1981 commented Aug 6, 2022

See fredrikwidlund/libreactor#5 for more info;

I've verified (thanks to async-profiler using dwarf stack walking) that indeed the write/read code paths are a bit more "involved" then plain send/recv with FLAG == 0

I'll run some benchs in our labs, but the issue I've mentioned (and the super nice blog posts on https://talawah.io/blog/extreme-http-performance-tuning-one-point-two-million/) is encouraging
@chrisvest @normanmaurer

@franz1981
Copy link
Contributor Author

I believe that we have used write/read due to what the JDK does, but JDK is handling general file descriptors (meaning files too!!) while on Netty we can benefit from being specialized

@normanmaurer
Copy link
Member

@franz1981 yep thats a good one.. I remember reading about that as well but totally forgot to open a PR / issue:)

@franz1981
Copy link
Contributor Author

I can open one, it should be 2 lines of code I suppose

franz1981 added a commit to franz1981/netty that referenced this issue Aug 20, 2022
Motivation:

The performance Unix write/read paths is more involved (and slower) then the specialized socket send/rcv ones.

Modification:

Replace Unix write/read paths with send/recv

Result:

Better performance for single buffer send/recv
@franz1981
Copy link
Contributor Author

@normanmaurer
Famous last words

I can open one, it should be 2 lines of code I suppose

eheh

normanmaurer pushed a commit that referenced this issue Aug 22, 2022
Motivation:

The performance Unix write/read paths is more involved (and slower) then the specialized socket send/rcv ones.

Modification:

Replace Unix write/read paths with send/recv

Result:

Better performance for single buffer send/recv
normanmaurer added a commit that referenced this issue Aug 22, 2022
)

Motivation:

The performance Unix write/read paths is more involved (and slower) then the specialized socket send/rcv ones.

Modification:

Replace Unix write/read paths with send/recv

Result:

Better performance for single buffer send/recv

Co-authored-by: Francesco Nigro <nigro.fra@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants