[tahoe-lafs-trac-stream] [Tahoe-LAFS] #3939: HTTP protocol is significantly slower than Foolscap protocol

Tahoe-LAFS trac at tahoe-lafs.org
Thu Nov 3 17:17:46 UTC 2022


#3939: HTTP protocol is significantly slower than Foolscap protocol
----------------------+---------------------------------------
 Reporter:  itamarst  |          Owner:
     Type:  defect    |         Status:  new
 Priority:  normal    |      Milestone:  HTTP Storage Protocol
Component:  unknown   |        Version:  n/a
 Keywords:            |  Launchpad Bug:
----------------------+---------------------------------------
 Specifically, in https://github.com/tahoe-lafs/tahoe-lafs/pull/1225,
 `test_filesystem` (from test_system.py) is 40 seconds with HTTP, compared
 to 20 with Foolscap.

 Of those extra 20 seconds:

 * 7 seconds are from repeated calls to `get_spki_hash()` in the HTTP
 client validation code. Or rather, the _real_ bottleneck is the call to
 get_public_bytes(), which is a little surprising but OK.
 * Another 7 seconds or so are just the TLS handshake?!
 * http_client's getContext() method to create a TLS context is also quite
 expensive, and there's some expense in creating context objects on the
 server.

 The test setup doesn't use persistent connections, so this arguably
 unrealistic, and maybe tests should use persistent connections. This still
 seems... excessive. Perhaps we're doing way too many HTTP requests. E.g.
 maybe chunk sizes that are OK for Foolscap are too small for HTTP.

--
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/3939>
Tahoe-LAFS <https://Tahoe-LAFS.org>
secure decentralized storage


More information about the tahoe-lafs-trac-stream mailing list