Bug 27701 - use long lived debuginfod-client objects & curl handles
Summary: use long lived debuginfod-client objects & curl handles
Status: RESOLVED FIXED
Alias: None
Product: elfutils
Classification: Unclassified
Component: debuginfod (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-06 17:41 UTC by Frank Ch. Eigler
Modified: 2021-05-13 01:27 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frank Ch. Eigler 2021-04-06 17:41:50 UTC
Discussion of bug #27673 brought light to an important source of inefficiency in the debuginfod protocol for applications that make repeated queries.  The basic problem is that each time we nuke and recreate a curl handle, any cached information such as an active keep-alive http connection, or crypto session keys, are thrown away.  Each new connection can take time & CPU, bleeding latency.

If we retain the curl-easy handles across debuginfod-client calls, rather than creating/destroying them during Every Call, then much of that setup work is eliminated, and anti-DoS web firewall concerns also eased.  Some estimates here indicate savings of hundreds of milliseconds per call are available, and even more if DoS penalties are applied.

debuginfod would itself be a good client to use this tactic to maintain persistent connections to its federation partners.
Comment 1 Frank Ch. Eigler 2021-05-01 18:03:41 UTC
commit 6c8b68b0245c8754997b4c4b0ff4ba24974e3fdd
Author: Frank Ch. Eigler <fche@redhat.com>
Date:   Fri Apr 23 13:04:26 2021 -0400

    PR27701: debuginfod client: encourage reused debuginfod_client objects