public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug dynamic-link/27695] ld has poor performance characteristics when loading large quantities of .so files
       [not found] <bug-27695-131@http.sourceware.org/bugzilla/>
@ 2021-04-05 20:50 ` hjl.tools at gmail dot com
  2021-04-05 20:57 ` hjl.tools at gmail dot com
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 11+ messages in thread
From: hjl.tools at gmail dot com @ 2021-04-05 20:50 UTC (permalink / raw)
  To: glibc-bugs

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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|ld                          |dynamic-link
            Product|binutils                    |glibc

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

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

* [Bug dynamic-link/27695] ld has poor performance characteristics when loading large quantities of .so files
       [not found] <bug-27695-131@http.sourceware.org/bugzilla/>
  2021-04-05 20:50 ` [Bug dynamic-link/27695] ld has poor performance characteristics when loading large quantities of .so files hjl.tools at gmail dot com
@ 2021-04-05 20:57 ` hjl.tools at gmail dot com
  2021-04-22 13:15 ` steve.gargolinski at gmail dot com
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 11+ messages in thread
From: hjl.tools at gmail dot com @ 2021-04-05 20:57 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> ---
This may be related to PR 17645.

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

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

* [Bug dynamic-link/27695] ld has poor performance characteristics when loading large quantities of .so files
       [not found] <bug-27695-131@http.sourceware.org/bugzilla/>
  2021-04-05 20:50 ` [Bug dynamic-link/27695] ld has poor performance characteristics when loading large quantities of .so files hjl.tools at gmail dot com
  2021-04-05 20:57 ` hjl.tools at gmail dot com
@ 2021-04-22 13:15 ` steve.gargolinski at gmail dot com
  2022-01-27 15:54 ` hjl.tools at gmail dot com
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 11+ messages in thread
From: steve.gargolinski at gmail dot com @ 2021-04-22 13:15 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #2 from steve.gargolinski at gmail dot com ---
@H.J. Lu - We experimented with PR 17645 and it had no effect on our use case
at all. Performance was the same with or without that patch.

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

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

* [Bug dynamic-link/27695] ld has poor performance characteristics when loading large quantities of .so files
       [not found] <bug-27695-131@http.sourceware.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2021-04-22 13:15 ` steve.gargolinski at gmail dot com
@ 2022-01-27 15:54 ` hjl.tools at gmail dot com
  2022-01-28 11:07 ` fweimer at redhat dot com
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 11+ messages in thread
From: hjl.tools at gmail dot com @ 2022-01-27 15:54 UTC (permalink / raw)
  To: glibc-bugs

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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
                 CC|                            |carlos at redhat dot com,
                   |                            |fweimer at redhat dot com,
                   |                            |hjl.tools at gmail dot com
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2022-01-27

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

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

* [Bug dynamic-link/27695] ld has poor performance characteristics when loading large quantities of .so files
       [not found] <bug-27695-131@http.sourceware.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2022-01-27 15:54 ` hjl.tools at gmail dot com
@ 2022-01-28 11:07 ` fweimer at redhat dot com
  2022-01-28 14:16 ` [Bug dynamic-link/27695] ld.so " fweimer at redhat dot com
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 11+ messages in thread
From: fweimer at redhat dot com @ 2022-01-28 11:07 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #3 from Florian Weimer <fweimer at redhat dot com> ---
I assume you use BIND_NOW (which is definitely the forward-looking thing to
do). This means that you already have to handle inter-module dependencies in
some way. Why do you need to use RTLD_GLOBAL, then?

Is it perhaps because you want to use dlsym as some sort of global service
lookup mechanism, without having the to find the implementing module first?

Typically, switching to RTLD_LOCAL provides a nice speedup for dlopen, for
non-degenerate dependency graphs.

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

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

* [Bug dynamic-link/27695] ld.so has poor performance characteristics when loading large quantities of .so files
       [not found] <bug-27695-131@http.sourceware.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2022-01-28 11:07 ` fweimer at redhat dot com
@ 2022-01-28 14:16 ` fweimer at redhat dot com
  2022-02-08 22:07 ` steve.gargolinski at gmail dot com
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 11+ messages in thread
From: fweimer at redhat dot com @ 2022-01-28 14:16 UTC (permalink / raw)
  To: glibc-bugs

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

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|ld has poor performance     |ld.so has poor performance
                   |characteristics when        |characteristics when
                   |loading large quantities of |loading large quantities of
                   |.so files                   |.so files
             Status|NEW                         |WAITING

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

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

* [Bug dynamic-link/27695] ld.so has poor performance characteristics when loading large quantities of .so files
       [not found] <bug-27695-131@http.sourceware.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2022-01-28 14:16 ` [Bug dynamic-link/27695] ld.so " fweimer at redhat dot com
@ 2022-02-08 22:07 ` steve.gargolinski at gmail dot com
  2022-03-01 10:48 ` fweimer at redhat dot com
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 11+ messages in thread
From: steve.gargolinski at gmail dot com @ 2022-02-08 22:07 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #4 from steve.gargolinski at gmail dot com ---
We use a combination of RTLD_LOCAL and RTLD_GLOBAL in our program. For the core
libraries that most other libraries and plugins depend on, we use RTLD_GLOBAL
to load to avoid cross-library exception and RTTI issues. Also, localizing the
core libraries prevent our program from “stacked” dynamic loading (e.g., at
some later time dynamically loading another shared object that depends on the
same core libraries).

For small plugins that are self-contained, our program uses RTLD_LOCAL to load
them. As to RTLD_NOW, we use that to avoid runtime symbol resolution issues,
which can only be found via exhaustive testing when using RTLD_LAZY.

If a targeted discussion about our use case would be helpful to dig into more
details, we would definitely be willing to do so.

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

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

* [Bug dynamic-link/27695] ld.so has poor performance characteristics when loading large quantities of .so files
       [not found] <bug-27695-131@http.sourceware.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2022-02-08 22:07 ` steve.gargolinski at gmail dot com
@ 2022-03-01 10:48 ` fweimer at redhat dot com
  2022-03-03 22:56 ` pieterjan.briers at gmail dot com
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 11+ messages in thread
From: fweimer at redhat dot com @ 2022-03-01 10:48 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #5 from Florian Weimer <fweimer at redhat dot com> ---
(In reply to steve.gargolinski from comment #4)
> We use a combination of RTLD_LOCAL and RTLD_GLOBAL in our program. For the
> core libraries that most other libraries and plugins depend on, we use
> RTLD_GLOBAL to load to avoid cross-library exception and RTTI issues.

Is this really necessary? Do you use the RTTI/exception handling implementation
from GCC? I think it disregards type metadata addresses and falls back on type
name comparisons. (Historically, this was not the case.)

Maybe narrowing the search scope is the way to tackle this.

> Also,
> localizing the core libraries prevent our program from “stacked” dynamic
> loading (e.g., at some later time dynamically loading another shared object
> that depends on the same core libraries).

Sorry, I don't understand this comment.

> For small plugins that are self-contained, our program uses RTLD_LOCAL to
> load them. As to RTLD_NOW, we use that to avoid runtime symbol resolution
> issues, which can only be found via exhaustive testing when using RTLD_LAZY.

Right, that's makes a lot of sense to me. Although RTLD_NOW greatly amplifies
issues with binding performance. But we prefer it for its predictability (and
the full RELRO hardening it enables).

> If a targeted discussion about our use case would be helpful to dig into
> more details, we would definitely be willing to do so.

It's very hard to improve the general case. It may be possible to lift some
ideas from JOIN optimization for relational databases.

Are many of your shared objects loaded from the system search paths covered by
/etc/ld.so.cache (after they have been found by ldconfig)?

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

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

* [Bug dynamic-link/27695] ld.so has poor performance characteristics when loading large quantities of .so files
       [not found] <bug-27695-131@http.sourceware.org/bugzilla/>
                   ` (7 preceding siblings ...)
  2022-03-01 10:48 ` fweimer at redhat dot com
@ 2022-03-03 22:56 ` pieterjan.briers at gmail dot com
  2022-03-03 23:04 ` pieterjan.briers at gmail dot com
  2022-03-03 23:36 ` fche at redhat dot com
  10 siblings, 0 replies; 11+ messages in thread
From: pieterjan.briers at gmail dot com @ 2022-03-03 22:56 UTC (permalink / raw)
  To: glibc-bugs

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

Pieter-Jan Briers <pieterjan.briers at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pieterjan.briers at gmail dot com

--- Comment #6 from Pieter-Jan Briers <pieterjan.briers at gmail dot com> ---
Created attachment 14003
  --> https://sourceware.org/bugzilla/attachment.cgi?id=14003&action=edit
Core dump from SIGSEGV in ld

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

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

* [Bug dynamic-link/27695] ld.so has poor performance characteristics when loading large quantities of .so files
       [not found] <bug-27695-131@http.sourceware.org/bugzilla/>
                   ` (8 preceding siblings ...)
  2022-03-03 22:56 ` pieterjan.briers at gmail dot com
@ 2022-03-03 23:04 ` pieterjan.briers at gmail dot com
  2022-03-03 23:36 ` fche at redhat dot com
  10 siblings, 0 replies; 11+ messages in thread
From: pieterjan.briers at gmail dot com @ 2022-03-03 23:04 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #7 from Pieter-Jan Briers <pieterjan.briers at gmail dot com> ---
Ok I have no idea how I managed to do this but I could have sworn I just
attached that file to my bug report (I have no idea how I even ended up here??)

Maybe I shouldn't be doing this kind of stuff at midnight?

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

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

* [Bug dynamic-link/27695] ld.so has poor performance characteristics when loading large quantities of .so files
       [not found] <bug-27695-131@http.sourceware.org/bugzilla/>
                   ` (9 preceding siblings ...)
  2022-03-03 23:04 ` pieterjan.briers at gmail dot com
@ 2022-03-03 23:36 ` fche at redhat dot com
  10 siblings, 0 replies; 11+ messages in thread
From: fche at redhat dot com @ 2022-03-03 23:36 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #8 from Frank Ch. Eigler <fche at redhat dot com> ---
The content of attachment 14003 has been deleted for the following reason:

erroneous addition

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

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

end of thread, other threads:[~2022-03-03 23:36 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-27695-131@http.sourceware.org/bugzilla/>
2021-04-05 20:50 ` [Bug dynamic-link/27695] ld has poor performance characteristics when loading large quantities of .so files hjl.tools at gmail dot com
2021-04-05 20:57 ` hjl.tools at gmail dot com
2021-04-22 13:15 ` steve.gargolinski at gmail dot com
2022-01-27 15:54 ` hjl.tools at gmail dot com
2022-01-28 11:07 ` fweimer at redhat dot com
2022-01-28 14:16 ` [Bug dynamic-link/27695] ld.so " fweimer at redhat dot com
2022-02-08 22:07 ` steve.gargolinski at gmail dot com
2022-03-01 10:48 ` fweimer at redhat dot com
2022-03-03 22:56 ` pieterjan.briers at gmail dot com
2022-03-03 23:04 ` pieterjan.briers at gmail dot com
2022-03-03 23:36 ` 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).