1 (edited by muyouyuwan 2017-04-25 02:00:50)

Topic: Transmission speed is slow based on wolfssl

I implement a process based on wolfssl in QNX platform. And I compiled all WolfSSL sources with the following definitions:
-DOPENSSL_EXTRA -DHAVE_STUNNEL -DWOLFSSL_ALWAYS_VERIFY_CB -DATOMIC_USER -g -DDEBUG -DDEBUG_WOLFSSL -DWOLFSSL_HAVE_MIN -DHAVE_AESGCM -DWOLFSSL_KEY_GEN -DWOLFSSL_CERT_GEN -DWOLFSSL_CERT_REQ -DHAVE_ECC -Wall -Wno-unused -DHAVE_NULL_CIPHER -DWOLFSSL_STATIC_PSK -DHAVE_TLS_EXTENSIONS -DHAVE_SECURE_RENEGOTIATION -DNO_SESSION_CACHE

Set the CipherSuit(ECDHE-ECDSA-AES128-GCM-SHA256)

I transfer a file on one socket using POSIX recv() and send(), the transmission speed is 13760kbps. And I transfer the same file on the same socket using wolfSSL_read() and wolfSSL_write(), the the transmission speed is 2552kbps.

So, my question is if it is normal that the two transmission speed is such a big gap.

Share

Re: Transmission speed is slow based on wolfssl

Hi muyouyuwan,

A rule of thumb is that the overhead of adding SSL/TLS to a connection will be about 30%, but this will vary depending on what cipher suite and key sizes you are using for the connection.

SSL/TLS also has a maximum record size of 16kB.  Depending on the size of your file being transferred, the more chunks being done will increase the overhead.

We typically run the wolfCrypt benchmarks as a gauge of performance, since the performance of the SSL/TLS layer is directly dependent on the underlying cryptography performance.

The benchmark application source is located in wolfcrypt/benchmark/benchmark.c. For *nix platforms, the benchmark can be ran using ./wolfcrypt/benchmark/benchmark. The benchmark is compiled by default.  If benchmarking on an embedded platform, define BENCH_EMBEDDED to reduce resource use.  For more details regarding benchmarking wolfSSL and reference numbers we have gathered in the past, please reference the wolfSSL and wolfCrypt Benchmarks webpage:

https://www.wolfssl.com/wolfSSL/benchmarks-wolfssl.html

Best Regards,
Chris