public inbox for
 help / color / mirror / Atom feed
* Worker threads and MHD_USE_EPOLL
@ 2022-08-29 23:54 Aaron Merey
  0 siblings, 0 replies; only message in thread
From: Aaron Merey @ 2022-08-29 23:54 UTC (permalink / raw)
  To: elfutils-devel

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?


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-08-29 23:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-29 23:54 Worker threads and MHD_USE_EPOLL Aaron Merey

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).