Re: [TLS] TLS Record Size Limitation (Martin Rex) Wed, 09 December 2015 16:14 UTC

Return-Path: <>
Received: from localhost ( []) by (Postfix) with ESMTP id 1DD0C1A6F1E for <>; Wed, 9 Dec 2015 08:14:53 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -4.652
X-Spam-Status: No, score=-4.652 tagged_above=-999 required=5 tests=[BAYES_40=-0.001, HELO_EQ_DE=0.35, RCVD_IN_DNSWL_HI=-5, SPF_PASS=-0.001] autolearn=ham
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id nuejGeswmYkG for <>; Wed, 9 Dec 2015 08:14:51 -0800 (PST)
Received: from ( []) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 703D21A87E1 for <>; Wed, 9 Dec 2015 08:13:08 -0800 (PST)
Received: from ( []) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 8BAF144676; Wed, 9 Dec 2015 17:13:06 +0100 (CET)
X-purgate-ID: 152705::1449677586-00002D85-1999A5F4/0/0
X-purgate-size: 1276
X-purgate: clean
X-purgate: This mail is considered clean (visit for further information)
X-purgate-Ad: Categorized by eleven eXpurgate (R)
X-purgate-type: clean
X-SAP-SPAM-Status: clean
Received: from ( []) by (Postfix) with ESMTP id 3B3E140C9F; Wed, 9 Dec 2015 17:13:06 +0100 (CET)
Received: by (Postfix, from userid 10159) id 314631A3AC; Wed, 9 Dec 2015 17:13:06 +0100 (CET)
In-Reply-To: <>
To: Software Engineer 979 <>
Date: Wed, 9 Dec 2015 17:13:06 +0100 (CET)
X-Mailer: ELM [version 2.4ME+ PL125 (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="US-ASCII"
Message-Id: <>
From: (Martin Rex)
Archived-At: <>
Subject: Re: [TLS] TLS Record Size Limitation
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: "This is the mailing list for the Transport Layer Security working group of the IETF." <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Wed, 09 Dec 2015 16:14:53 -0000

Software Engineer 979 wrote:
> I'm currently developing an data transfer application using OpenSSL. The
> application is required to securely transfer large amounts of data over a
> low latency/high bandwidth network. The data being transferred lives in a
> 3rd part application that uses 1 MB buffer to transfer data to my
> application. When I hook OpenSSL into my application I notice an
> appreciable decline in network throughput. I've traced the issue the
> default TLS record size of 16K. The smaller record size causes the 3rd
> party application's buffer to be segmented into 4 16K buffers per write and
> the resulting overhead considerably slows things down. I've since modified
> the version of OpenSSL that I'm using to support an arbitrary TLS record
> size allowing OpenSSL to scale up to 1MB or larger TLS record size. Since
> this change, my network throughput has dramatically increased (187%
> degradation down to 33%).

I have strong doubts that the TLS record size is the problem here.

But I've seen higher layer design flaws before, which can cause
such problems.  The OpenSSL membio-interface seems to exhibit 
quite sub-optimal behaviour, because it moves data around like crazy
if you fill it with MBytes of data.