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
Use SSL_sendfile() from OpenSSL 3.0 in SSLSocket.sendfile when available. #99813
SSL_sendfile() is a function added in OpenSSL 3.0. If we use this function, we can offload TLS to the kernel, which can hugely improve performance. However, both the kernel and OpenSSL must be built with kTLS support.
I would like to prepare a PR that enables SSL_sendfile() use in SSLSocket.sendfile.
Pitch
This would enable use of kernel TLS, which will yield significant increase of TLS performance in systems with kTLS support.
changed the title [-]Use `SSL_sendfile()` from OpenSSL 3.0 when avalible.[/-][+]Use `SSL_sendfile()` from OpenSSL 3.0 in `SSLSocket.sendfile` when available.[/+]on Nov 27, 2022
@moonsikpark thanks for opening the issue. I want to let you know that I made some progress in integrating the function in September and a little bit after #96830 was merged. It will be inefficient if we spend time solving the same problem. Let me open a PR with what I have tomorrow, then we can cooperate on finalizing this.
@illia-v I've finished basic PoC of using SSL_sendfile() in this branch. If your progress is beyond what I've been working on, It'd be nice if you open the PR with yours :)
@illia-v I've finished basic PoC of using SSL_sendfile() in this branch. If your progress is beyond what I've been working on, It'd be nice if you open the PR with yours :)
Cool! I created #99907, please leave your feedback about it.
Comparing to your branch, my version:
incorporates some sendfile usage experience moved to socket.socket._sendfile_zerocopy;
Activity
[-]Use `SSL_sendfile()` from OpenSSL 3.0 when avalible.[/-][+]Use `SSL_sendfile()` from OpenSSL 3.0 in `SSLSocket.sendfile` when available.[/+]illia-v commentedon Nov 29, 2022
@moonsikpark thanks for opening the issue. I want to let you know that I made some progress in integrating the function in September and a little bit after #96830 was merged. It will be inefficient if we spend time solving the same problem. Let me open a PR with what I have tomorrow, then we can cooperate on finalizing this.
moonsikpark commentedon Nov 30, 2022
@illia-v I've finished basic PoC of using
SSL_sendfile()in this branch. If your progress is beyond what I've been working on, It'd be nice if you open the PR with yours :)illia-v commentedon Nov 30, 2022
Cool! I created #99907, please leave your feedback about it.
Comparing to your branch, my version:
sendfileusage experience moved tosocket.socket._sendfile_zerocopy;_sendfile_use_send;_ssl__SSLSocket_write_implerror handling;_ssl._SSLSocket.sendfileat all if it unavailable similarly to howos.sendfileis not always defined.gh-99813: Start using `SSL_sendfile` when available (#99907)
pythongh-99813: Start using `SSL_sendfile` when available (python#99907)
pythongh-99813: Start using `SSL_sendfile` when available (python#99907)
pythongh-99813: Start using `SSL_sendfile` when available (python#99907)
pythongh-99813: Start using `SSL_sendfile` when available (python#99907)
StanFromIreland commentedon Oct 13, 2025
@picnixz can this be closed as completed?
picnixz commentedon Oct 13, 2025
Yes