This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Consensus: Tuning runtime behaviour with environment variables.
- From: "Carlos O'Donell" <carlos at redhat dot com>
- To: Andreas Jaeger <aj at suse dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Thu, 20 Jun 2013 20:19:04 -0400
- Subject: Re: Consensus: Tuning runtime behaviour with environment variables.
- References: <51A58A92 dot 4050508 at redhat dot com> <51B4DBD5 dot 30102 at suse dot com>
On 06/09/2013 03:47 PM, Andreas Jaeger wrote:
> Carlos, thanks for starting this and documenting everything.
It's ongoing work as we try to come to some conclusion about
runtime tuning.
> My general feeling is that we should have sane defaults so that the
> library does the right thing without any further interaction - and
> the need for tuneables implies that we have not reached that goal.
Customers will disagree with you though, and they will present you
with a use case for which the library doesn't perform optimally.
What do you say to them?
> Tuneable environment variables might make debugging harder. For bug
> reporting we need to ask next time not only in some cases the CPU (to
> check which ifunc is used) but also ask for all relevant environment
> variables.
You already need to ask for all relevant environment variables as
there are ~20-30+ that impact all facets of glibc behaviour from
the dynamic loader to NSS behaviour.
You raise a good point about debugging though and I've added it
to the wiki:
~~~
* Debugging
Provide a way to dump all of the tunables for debugging.
Provide a way to easily inspect all the tunable values from a
debugger, or reset all tunables directly from the debugger
e.g. inferior function call.
~~~
The ifunc question is going to get worse over time. We'll actually
want to have some way to record the decisions that were made and
dump that information in a simple way. We haven't seen any problems
because nobody is really using ifunc yet.
> Now looking at some of the concrete proposals, like Andi Kleen's
> patches, I see the benefit of adding environment variables.
>
> Seeing what you noticed, I'm fine with adding tuneable environment
> variables and like to add a large caution: These should be the
> exception and each new one should be discussed properly - and then
> also documented.
Agreed. Thanks for your vote of support.
I still need to review the existing env vars to describe prior
art and see if they meet the new criteria (request from Joseph).
Cheers,
Carlos.