all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#22966: HTTPS with GnuTLS's 'session-record-port' is inefficient
@ 2016-03-09 22:02 Ludovic Courtès
  2016-03-15 17:55 ` Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: Ludovic Courtès @ 2016-03-09 22:02 UTC (permalink / raw)
  To: 22966

(guix build download) uses ‘session-record-port’ from (gnutls), which
returns a port to conveniently write to/read from the TLS session’s
“record” layer.

The problem is that every write to the port, that is, every call to
‘write_to_session_record_port’ in the GnuTLS bindings, leads to the
creation of one “Application Data” packet.

For instance, when (web requests) writes an HTTP GET request, it roughly
does:

  (display "GET" port)
  (display " " port)
  (display uri port)
  (display "\n\r" port)
  …

it ends up creating a lot of small Application Data packets.  When
debugging is enabled in (guix build download), that translates to things
like:

  gnutls: [14594|5] REC[0x152c9c0]: Preparing Packet Application Data(23) with length: 1 and min pad: 0
  gnutls: [14594|9] ENC[0x152c9c0]: cipher: AES-128-GCM, MAC: AEAD, Epoch: 1
  gnutls: [14594|5] REC[0x152c9c0]: Sent Packet[4] Application Data(23) in epoch 1 and length: 30

Terribly suboptimal.

The difficulty is that the session record port doesn’t do any caching by
itself, and it shouldn’t, because it’s the application’s responsibility.
So we might have to do our own caching and/or use ‘record-send’ and
‘record-receive!’ instead of ‘session-record-port’.

Ludo’.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#22966: HTTPS with GnuTLS's 'session-record-port' is inefficient
  2016-03-09 22:02 bug#22966: HTTPS with GnuTLS's 'session-record-port' is inefficient Ludovic Courtès
@ 2016-03-15 17:55 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2016-03-15 17:55 UTC (permalink / raw)
  To: 22966-done

ludo@gnu.org (Ludovic Courtès) skribis:

> The problem is that every write to the port, that is, every call to
> ‘write_to_session_record_port’ in the GnuTLS bindings, leads to the
> creation of one “Application Data” packet.

Guix commit ec278439f3ff5dcd3d02c05099ba1724cc2459f1 works around it in
‘guix substitute’.

GnuTLS commit 0b1c136947878ccb600b4fa785ef257909104144 explains this in
the guile-gnutls manual.

I consider this bug closed.

Ludo’.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-03-15 17:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-09 22:02 bug#22966: HTTPS with GnuTLS's 'session-record-port' is inefficient Ludovic Courtès
2016-03-15 17:55 ` Ludovic Courtès

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.