Comments (6)
Here's the perf I'm getting: 80% is still in the helper_encrypt code, but a bit is still in sendmsg/recvmsg copying.
perf record -g ./client --sendfile file.txt --verbose --sendfile-size 10000000000 --server-host localhost --server-port 5555
from af_ktls.
I am getting:
- 47.45% from total spent in
rfc5288_encrypt
- 30% from total spent on actual encryption
- 11.73% from total spent on copy -
scatterwalk_map_and_copy
- 1.24% from total spent in
kmalloc
- 17.32% from total spent in
kernel_sendmsg()
- 7.72% form total in
tcp_push_one
(7% in actual transmit) - 4.23 from total in
memcpy_erms
- 7.72% form total in
So to sum it up, ideally we could get cca 13% better results when rfc5288 would be optimized and additional cca 4% when kernel_sendpage()
would be used instead of kernel_sendmsg()
. These numbers are ideal though, there will be different paths which could (probably) introduce different issues.
Transferred 1GB file, reported by perf report --sort=symbol
from af_ktls.
According to benchmarks available at [1] with optimizations mentioned above (with 17% saved in total), we would reach similar values that I got by using mmap(2)
on a file and sending it via Gnu TLS.
BTW perf
reports context switches not expensive at all (0.40%).
http://209.132.179.123:5000/i7-4600U-2.10GHz/sendfile-file_100MB.bin-16000--tls/index.html
from af_ktls.
I'm trying to repro your mmap + gnutls results, I'm seeing it only slightly faster than read+ssl write.
Link is old and broken now. You were comparing the following two commands?
./client --sendfile-mmap
vs.
./client --sendfile
?
I'm trying to pull together some benchmark numbers for netdev.
from af_ktls.
You were comparing the following two commands?
./client --sendfile-mmap
vs.
./client --sendfile
?
Yes, exactly.
from af_ktls.
Closing, kernel_sendmsg() is not used now.
from af_ktls.
Related Issues (20)
- Test suite HOT 6
- new ciphersuite: chacha20-poly1305 HOT 1
- license is GPLv3
- Copy data from multiple TLS records to userspace buffer HOT 9
- Buffer changes HOT 6
- kernel fault when decrypting to user buffer HOT 7
- Crypto API scatterwalk copy HOT 2
- MTU handling HOT 8
- Allocating too many pages HOT 1
- Sleeping with lock held HOT 1
- possible lock inversion surrounding splice HOT 2
- Remove rx async work HOT 6
- Race condition in KTLS_RECV_READY HOT 2
- peek tcp data using tcp_read_sock HOT 2
- check sock_queue_rcv_skb return value HOT 4
- DTLS sliding window should always advance
- Investigate using a single FD
- DTLS window check needs to happen after decrypt
- Support async crypto API
- Paper might also wish to cite Plan 9's devtls as related work HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from af_ktls.