public inbox for
 help / color / mirror / Atom feed
From: Aaron Merey <>
Subject: Worker threads and MHD_USE_EPOLL
Date: Mon, 29 Aug 2022 19:54:38 -0400	[thread overview]
Message-ID: <> (raw)

The debuginfod man page states that if the server is run without the
--connection-pool option, a new thread will be cloned for every request.
However this is not always the case.

Since commit e646e363e debuginfod attempts to configure the libmicrohttpd
daemon to use epoll for the daemon's internal event loop.  libmicrohttpd
requires that if epoll support is enabled, it will not create a new thread
to handle each request. So when the --connection-pool option is not given,
the daemon ends up configured to use a just a single worker thread that
can only respond to one request at a time.

There are a few ways we can address this.  My preferred approach is to use
--connection-pool is not given.  This preserves the behaviour stated in
the man page and if users want the performance benefits of epoll they can
always use --connection-pool to enable it.

If we insist on always using epoll when it's available then we might want
to change the default number of worker threads to something other than
1, just like when --connection-pool is given with no argument.

We could simply modify the man page to state that if --connection-pool isn't
given then only 1 worker thread will be used. However I don't like this
approach because it unnecessarily constrains the server's default behavior
and ideally we should try to preserve the behavior that we advertise in
the man page. WDYT?


                 reply	other threads:[~2022-08-29 23:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='' \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).