Giter VIP home page Giter VIP logo

Comments (6)

djwatson avatar djwatson commented on May 26, 2024

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

screen shot 2016-05-05 at 11 10 46 am

from af_ktls.

fridex avatar fridex commented on May 26, 2024

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

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.

fridex avatar fridex commented on May 26, 2024

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.

djwatson avatar djwatson commented on May 26, 2024

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.

fridex avatar fridex commented on May 26, 2024

You were comparing the following two commands?
./client --sendfile-mmap
vs.
./client --sendfile
?

Yes, exactly.

from af_ktls.

fridex avatar fridex commented on May 26, 2024

Closing, kernel_sendmsg() is not used now.

from af_ktls.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.