writev over OpenSSL

Marian Beermann public at enkore.de
Sun Feb 2 15:47:16 UTC 2020


> Creating a temporary buffer and then consolidating the
> vector is a problem because of the performance cost associated with
> memory copy.

Did you actually benchmark this or do you just think this is the case?
Consider that SSL_write/read will normally do something like AES or
Chapoly on your CPU at a throughput of 2-4 GB/s, which is about an order
of magnitude slower than streaming memory throughput.

-Marian

Am 02.02.20 um 15:27 schrieb Eran Borovik:
> Hi all,
> I am in the process of integrating OpenSSL with my application. My
> application uses scatter-gather unencrypted buffers. Without OpenSSL, I
> would use writev with no issues. Is there a way to do the equivalent
> over OpenSSL? I understand that I can split the vector into multiple
> SSL_write/SSL_read operations but that defeats the purpose and has a
> large overhead. Creating a temporary buffer and then consolidating the
> vector is a problem because of the performance cost associated with
> memory copy.
> Is there a clean way to achieve this without the performance overhead.
> Perhaps dealing with BIOs directly?
> 
> Many thanks,
> Eran



More information about the openssl-users mailing list