winbind: Improve child selection

Enterprise / Samba - Volker Lendecke [samba.org] - 12 February 2018 18:51 EST

This improves the situation when a client request blocks a winbind child. This might be a slow samlogon or lookupnames to a domain that's far away. With random selection of the child for new request coming in we could end up with a long queue when other, non-blocked children could serve those new requests. Choose the shortest queue.

This is an immediate and simple fix. Step two will be to have a per-domain and not a per-child queue. Right now we're pre-selecting the check-out queue at Fry's randomly without looking at the queue length. With this change we're picking the shortest queue. The better change will be what Fry's really does: One central queue and red/green lights on the busy/free checkout counters.

b4384b7f0ec winbind: Improve child selection
source3/winbindd/winbindd_dual.c | 36 +++++++++++++++++-------------------
1 file changed, 17 insertions(+), 19 deletions(-)

Upstream: gitweb.samba.org


  • Share