delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/02/25/16:54:43

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; q=dns; s=
default; b=bx9mRewc7BBOTLYV3S4NE1EKUxN2N/JOTXy5K3s+dFv/1l86pCNEE
0TPxDF4fzE7mMFmUe6jFSOhArKp6WaD3Tfif32/IGIZS6t84zkg6LzmU0w93bump
BKCH/BiQSXhKaf9mPeKqjQ6G6AjKun3jVUQni7OrJBddeys47C3plE=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; s=default;
bh=FcpQo85R1X0mrkD1eomIAr2lcyQ=; b=OuNUOyQmwjRmEKRwYqjevpgWMNMX
O1d3aDN1Jes3HCOTak+9ci9WPc91wLjg7sXtBFc7nv6UuqwRYbMbn8AspG4scsaV
Mh59gPrxLkXv0M38CEXh6ItGSimQDXVQVG29tfxMhJgF6Sq1s4Kqmyljd263dEat
fUJDi5MJnz/sMDo=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-5.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2
X-HELO: calimero.vinschen.de
Date: Tue, 25 Feb 2014 22:54:23 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Testers needed: New passwd/group handling in Cygwin
Message-ID: <20140225215423.GA6065@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <20140213143849 DOT GH2246 AT calimero DOT vinschen DOT de> <87fvn7cb68 DOT fsf AT Rainer DOT invalid> <20140225200414 DOT GA4238 AT calimero DOT vinschen DOT de> <87y50zaqjb DOT fsf AT Rainer DOT invalid>
MIME-Version: 1.0
In-Reply-To: <87y50zaqjb.fsf@Rainer.invalid>
User-Agent: Mutt/1.5.21 (2010-09-15)

--G4iJoqBmSsgzjUCe
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Feb 25 21:25, Achim Gratz wrote:
> Corinna Vinschen writes:
> > The stuff in the `id' application is not cached at all.  Caching is
> > inherited from the parent process, but the parent never asked for all
> > your groups so it hasn't cached this information.  Every invocation of
> > id has to request the group info anew.
>=20
> OK, then I was misunderstanding what caching meant.  I was operating
> under the assumption that there'd be something like a session cache that
> serves all Cygwin processes in the same process tree.

Right now the cache is in the cygheap, so it's per-process, with
inheritance from the parent process.  I am mulling over adding other
caching methods, but I'm reluctant to add another shared memory region
of variable and potentially big size to the 32 bit version of Cygwin.
I'm not as reluctant to do this for the 64 bit version, but I *am*
reluctant to add different code for 32 and 64 bit.

> > Do you have a very slow connection to your DC by any chance?  I admit
> > that I never tested with 440 groups, only with about 30 or so, but 13
> > seconds sounds *very* lame.
>=20
> That's around 33 lookups per second; not great, but also not bad (I'm
> far from the only user of that DC obviously).  I'll have to check what
> our web application server is doing (albeit it uses a connection pool to

Sorry, I don't grok this.  What has a web application server to do with
asking a DC for user info?

> than about 200 peak.  The answers can be insanely large depending on
> what and how you ask, too.  In any case, based on the fact that I'm
> certainly not in as many groups as some other folks, I don't think I can
> drop file-based operation at the moment (which I really hoped I could).

Erm... how often are you calling id, usually?  Also, we're in the early
stages of testing this change.  The idea is not that you just switch,
the idea is that we *test* this and I get enough feedback to be able to
ease the biggest pains.

Other than that, I just had an in-shower inspiration how to speed up
`id' specificially.  The getgroups(2) call is in the center of this and
I could probably speed up the stuiff a lot by opening the LDAP
connection in getgroups only once.=20

Also, more radically, if we drop the functionality to define another
group name for a group, we could drop the requirement to open an LDAP
connection to fetch group information to the DC entirely(*).  This would
only affect domain groups, local groups could still have different
names.  But I'm already wondering for a couple of days if having a
Cygwin group name different from the Windows group name is really
necessary at all.  I added this years ago for fun, but there's no
serious reason I can think of which would require to keep up with this.

(*) Assuming the group info is cached in the local LSA, which is
    pretty likely for the groups of the current user.

> > The fact that the shells are doing it right seems to indicate that this
> > isn't a generic problem.  I can't debug this, though.  Can you see if
> > you can figure out what's going on under the hood?  Does strace show
> > anything of interest?  Can we perhaps set up some joint debugging via
> > private mail during the next couple of days?
>=20
> I can't dig further into this for the next two weeks.  I need to get
> some work done, so I have rolled the snapshot back for now.  I'll get
> back to you when this is out of the way, thanks for the offer.

Sigh.  Testing in this tempo will take ages.


Corinna

--=20
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

--G4iJoqBmSsgzjUCe
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBAgAGBQJTDREPAAoJEPU2Bp2uRE+gwdgP/RBvI8Azjq6CE5BoWpxEfGHn
LMdxVeI9tbIehP/s8SllyRhXmnSlH2IG/knYUHEypgs2WRTUyWwdlVKfWG3kYbbX
lTGA4BLFxth7f5ximAuafyYU+OzljpjXkL52IvxK88PRdthxJ/iS7aPnoMXwR91J
mf3flt5kcMLOwujweoxV/mcvn8t/5P5N3ckmLoAuSgRgDrlBlORFpUY2BfDXDxMZ
ovdV1p9J+ZCS6mgE8SXal++kE7j3ClB55cRp9YkWfYaNKgq+UXBK1NWSu5c8oaWA
pDIpyqkl9BHrd8yr3IPaXO8mF8ISunGz2TeXaQ0TZy04e3kWmjBKqisRA7DoIGUK
z/hD7s+yMK0QW65qh7CUqht3gB3FYgbZ/hYaB3YLyXWeeltbjqqbP9Iv/uoCy7Kw
3ltm3sL+W8jMcF5B/tGSgeZIF6MT5cMTmwtaNAoLQyBkW/849FyBu1CpS/Rvu7CJ
xN3jdzYhPPIWOaQsniV0pQsaN5kuRIUilRQdah16QmLAtIcCGI9A/iCn2/Eljdg3
mvE8us5zYjjtmOQBItD6Z1TF6w4525PTskZQPYF81zOrwxf6o6FfTMux6VojdRyW
FLhMt513MmzcfUAlC7Kfrn0Jao2UtNyGkpEC5W2YcUK8chlCnAqPwGsPcC6R4bHv
BqjHH620vBiV7EXB6i8u
=jB1I
-----END PGP SIGNATURE-----

--G4iJoqBmSsgzjUCe--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019