public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
* [Bug debuginfod/29975] New: Search concurrency doesn't respect CPU affinity
@ 2023-01-09 17:38 ross at burtonini dot com
  2023-01-09 17:42 ` [Bug debuginfod/29975] " fche at redhat dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: ross at burtonini dot com @ 2023-01-09 17:38 UTC (permalink / raw)
  To: elfutils-devel

https://sourceware.org/bugzilla/show_bug.cgi?id=29975

            Bug ID: 29975
           Summary: Search concurrency doesn't respect CPU affinity
           Product: elfutils
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: debuginfod
          Assignee: unassigned at sourceware dot org
          Reporter: ross at burtonini dot com
                CC: elfutils-devel at sourceware dot org
  Target Milestone: ---

I've a machine with lots of cores (256) but debuginfod doesn't respect CPU
affinity:

$ taskset -c 2 debuginfod -v
...
[Mon Jan  9 17:33:20 2023] (2351762/2351762): search concurrency 256

Instead of looking at the number of cores present, it should look at the number
of cores available to it (sched_getaffinity()).

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug debuginfod/29975] Search concurrency doesn't respect CPU affinity
  2023-01-09 17:38 [Bug debuginfod/29975] New: Search concurrency doesn't respect CPU affinity ross at burtonini dot com
@ 2023-01-09 17:42 ` fche at redhat dot com
  2023-01-09 18:24 ` ross at burtonini dot com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: fche at redhat dot com @ 2023-01-09 17:42 UTC (permalink / raw)
  To: elfutils-devel

https://sourceware.org/bugzilla/show_bug.cgi?id=29975

Frank Ch. Eigler <fche at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fche at redhat dot com

--- Comment #1 from Frank Ch. Eigler <fche at redhat dot com> ---
> number of cores available to it (sched_getaffinity()).

Do you happen to be aware of a c++y front-end to this, which we could
use instead of std::thread::hardware_concurrency() ?

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug debuginfod/29975] Search concurrency doesn't respect CPU affinity
  2023-01-09 17:38 [Bug debuginfod/29975] New: Search concurrency doesn't respect CPU affinity ross at burtonini dot com
  2023-01-09 17:42 ` [Bug debuginfod/29975] " fche at redhat dot com
@ 2023-01-09 18:24 ` ross at burtonini dot com
  2023-01-10 23:04 ` fche at redhat dot com
  2023-01-11 15:34 ` fche at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: ross at burtonini dot com @ 2023-01-09 18:24 UTC (permalink / raw)
  To: elfutils-devel

https://sourceware.org/bugzilla/show_bug.cgi?id=29975

--- Comment #2 from Ross Burton <ross at burtonini dot com> ---
No, but the C isn't that difficult:

#define _GNU_SOURCE
#include <sched.h>

int ret, count;
cpu_set_t mask;

CPU_ZERO(&mask);
ret = sched_getaffinity(0, sizeof(mask), &mask);
// if non-zero, errno is set
count = CPU_COUNT(&mask);

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug debuginfod/29975] Search concurrency doesn't respect CPU affinity
  2023-01-09 17:38 [Bug debuginfod/29975] New: Search concurrency doesn't respect CPU affinity ross at burtonini dot com
  2023-01-09 17:42 ` [Bug debuginfod/29975] " fche at redhat dot com
  2023-01-09 18:24 ` ross at burtonini dot com
@ 2023-01-10 23:04 ` fche at redhat dot com
  2023-01-11 15:34 ` fche at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: fche at redhat dot com @ 2023-01-10 23:04 UTC (permalink / raw)
  To: elfutils-devel

https://sourceware.org/bugzilla/show_bug.cgi?id=29975

--- Comment #3 from Frank Ch. Eigler <fche at redhat dot com> ---
please check out commit 7399e3bd7eb72d045 on elfutils.git for a test patch

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug debuginfod/29975] Search concurrency doesn't respect CPU affinity
  2023-01-09 17:38 [Bug debuginfod/29975] New: Search concurrency doesn't respect CPU affinity ross at burtonini dot com
                   ` (2 preceding siblings ...)
  2023-01-10 23:04 ` fche at redhat dot com
@ 2023-01-11 15:34 ` fche at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: fche at redhat dot com @ 2023-01-11 15:34 UTC (permalink / raw)
  To: elfutils-devel

https://sourceware.org/bugzilla/show_bug.cgi?id=29975

Frank Ch. Eigler <fche at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED

--- Comment #4 from Frank Ch. Eigler <fche at redhat dot com> ---

Pushed to master as dcb40f9caa7ca30

Author: Frank Ch. Eigler <fche@redhat.com>
Date:   Tue Jan 10 17:59:35 2023 -0500

    debuginfod PR29975 & PR29976: decrease default concurrency

    ... based on rlimit (rlimig -n NUM)
    ... based on cpu-affinity (taskset -c A,B,C,D ...)

    Signed-off-by: Frank Ch. Eigler <fche@redhat.com>

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

end of thread, other threads:[~2023-01-11 15:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-09 17:38 [Bug debuginfod/29975] New: Search concurrency doesn't respect CPU affinity ross at burtonini dot com
2023-01-09 17:42 ` [Bug debuginfod/29975] " fche at redhat dot com
2023-01-09 18:24 ` ross at burtonini dot com
2023-01-10 23:04 ` fche at redhat dot com
2023-01-11 15:34 ` fche at redhat dot com

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