This is the mail archive of the libc-alpha@sources.redhat.com 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: NIS performance patches


On Thu, Jan 15, Jeff Bastian wrote:

> >And this part is not ok. While the idea is correct, the implementation
> >does the worst thing that could happen (in conjunction with your
> >ypbind changes):
> >
> >If the cached data is invalid, we will now always ask ypbind for
> >a new server and ypbind will query the server. This is overkill.
> >If the cached data is invalid, we should at first try if the binding
> >files are updated. And only if this fails, too, we should start
> >searching a new server.
> 
> Hmm?  We only try to find a new server if an error was returned from 
> clnt_call() and we're on the first iteration if the while() loop.
> 
> The test_bindings_once() function then calls do_broadcast() which calls 
> either remove_bindingfile() or update_bindingfile() and the invalid data 
> in the binding file will be cleaned up.
> 
> Maybe I'm not reading something right...?

The first run is using an existing, cached connection.
This means, dom_client is not NULL and we don't use the binding dir
data nor do we ask ypbind.
If the exiting connection does not work anymore, we read the binding
dir data. This could be a newer one than we cached. If this fails, too,
we should start quering ypbind. Quering ypbind is very expensive,
so we should avoid them as long as possible.

  Thorsten

-- 
Thorsten Kukuk       http://www.suse.de/~kukuk/        kukuk@suse.de
SuSE Linux AG        Maxfeldstr. 5                 D-90409 Nuernberg
--------------------------------------------------------------------    
Key fingerprint = A368 676B 5E1B 3E46 CFCE  2D97 F8FD 4E23 56C6 FB4B


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