This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Consensus: Tuning runtime behaviour with environment variables.


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]