public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] PR28708 debuginfod testsuite
@ 2022-04-03 17:01 Frank Ch. Eigler
  2022-04-03 19:41 ` Mark Wielaard
  0 siblings, 1 reply; 2+ messages in thread
From: Frank Ch. Eigler @ 2022-04-03 17:01 UTC (permalink / raw)
  To: elfutils-devel

Hi -

Planning to commit this shortly.


commit e646e363e72e06e0ed5574c929236d815ddcbbaf (HEAD -> master)
Author: Frank Ch. Eigler <fche@redhat.com>
Date:   Sun Apr 3 12:47:17 2022 -0400

    PR28708: debuginfod: use MHD_USE_EPOLL for microhttpd threads
    
    Testing on s390x and other architectures indicates that this
    configuration reduces thundering-herd wakeups and saturation of a
    small number of threads.  The run-debuginfod-webapi-concurrency.sh
    test appears solid now.
    
    Signed-off-by: Frank Ch. Eigler <fche@redhat.com>

diff --git a/debuginfod/ChangeLog b/debuginfod/ChangeLog
index dfb5d42ec8a5..38a389e7dfd3 100644
--- a/debuginfod/ChangeLog
+++ b/debuginfod/ChangeLog
@@ -1,3 +1,8 @@
+2022-04-03  Frank Ch. Eigler <fche@redhat.com>
+
+	* debuginfod.cxx (main): Use MHD_USE_EPOLL for libmicrohttpd, to
+	encourage more round-robin dispatch of incoming connections.
+
 2021-12-09  Alexander Kanavin <alex@linutronix.de>
 
 	* debuginfod-client.c (cache_clean_default_interval_s): Change type to
diff --git a/debuginfod/debuginfod.cxx b/debuginfod/debuginfod.cxx
index bb8e8e102896..99924d36f260 100644
--- a/debuginfod/debuginfod.cxx
+++ b/debuginfod/debuginfod.cxx
@@ -3880,6 +3880,9 @@ main (int argc, char *argv[])
                                      | MHD_USE_INTERNAL_POLLING_THREAD
 #else
                                      | MHD_USE_SELECT_INTERNALLY
+#endif
+#ifdef MHD_USE_EPOLL
+                                     | MHD_USE_EPOLL
 #endif
                                      | MHD_USE_DEBUG, /* report errors to stderr */
                                      http_port,
@@ -3894,6 +3897,9 @@ main (int argc, char *argv[])
                                      | MHD_USE_INTERNAL_POLLING_THREAD
 #else
                                      | MHD_USE_SELECT_INTERNALLY
+#endif
+#ifdef MHD_USE_EPOLL
+                                     | MHD_USE_EPOLL
 #endif
                                      | MHD_USE_IPv6
                                      | MHD_USE_DEBUG, /* report errors to stderr */


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

* Re: [PATCH] PR28708 debuginfod testsuite
  2022-04-03 17:01 [PATCH] PR28708 debuginfod testsuite Frank Ch. Eigler
@ 2022-04-03 19:41 ` Mark Wielaard
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Wielaard @ 2022-04-03 19:41 UTC (permalink / raw)
  To: Frank Ch. Eigler; +Cc: elfutils-devel

Hi Frank,

On Sun, Apr 03, 2022 at 01:01:14PM -0400, Frank Ch. Eigler via Elfutils-devel wrote:
> Planning to commit this shortly.

Yes, please!

> commit e646e363e72e06e0ed5574c929236d815ddcbbaf (HEAD -> master)
> Author: Frank Ch. Eigler <fche@redhat.com>
> Date:   Sun Apr 3 12:47:17 2022 -0400
> 
>     PR28708: debuginfod: use MHD_USE_EPOLL for microhttpd threads
>     
>     Testing on s390x and other architectures indicates that this
>     configuration reduces thundering-herd wakeups and saturation of a
>     small number of threads.  The run-debuginfod-webapi-concurrency.sh
>     test appears solid now.

Thanks for digging into this and finding a solution. Nice that it is
just adding that flag. It was driving me nuts that I didn't understand
where the failures really came from. I assume otherwise libmicrohttpd
uses select and it runs into trouble because that can only support up
to 1024 connections simultaniously.

Cheers,

Mark

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

end of thread, other threads:[~2022-04-03 19:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-03 17:01 [PATCH] PR28708 debuginfod testsuite Frank Ch. Eigler
2022-04-03 19:41 ` Mark Wielaard

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