JuliaLang / MbedTLS.jl

Wrapper around mbedtls
Other
41 stars 50 forks source link

possible performance issue: tiny packets? #252

Open vtjnash opened 2 years ago

vtjnash commented 2 years ago

why does mbedtls send such minuscule packets?

MBTLS: 2022-08-03T13:46:22.157 09a6 ssl_write ➡️  800000
MBTLS: 2022-08-03T13:46:22.158 09a6 f_send ➡️  16413
quinnj commented 2 years ago

It seems this is configured as the default: https://mbed-tls.readthedocs.io/en/latest/kb/how-to/reduce-polarssl-memory-and-storage-footprint/#reducing-the-ssl-frame-buffer

quinnj commented 2 years ago

In their docs, it says the TLS standard mandates a max packet size of 16K.

vtjnash commented 2 years ago

That is the max for a TLS packets, but it would likely be faster to send many packets at once. Though performance numbers recently elsewhere seem to indicate that the encryption algorithm is slow enough that it doesn't matter about having the extra overhead here