Re: Cyrus, Solaris 10, ZFS? (and NIS?)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Oct 5, 2006, at 4:46 PM, Chaskiel M Grundman wrote:



--On Thursday, October 05, 2006 04:13:18 PM -0400 Elizabeth Schwartz <betsy.schwartz@xxxxxxxxx> wrote:

http://www.gsd.harvard.edu/users/betsys/dapptrace.timed

The interesting bit seems to be here:
     .      . -> mynewstate(0x165769, 0x40404040, 0x0)
     .      . -> mycanonifyid(0x165769, 0x0, 0x0)
     .      . -> libcyrus_config_getswitch(0x2, 0x11AF55, 0x5)
    43      5 <- libcyrus_config_getswitch = 84
   135     20 <- mycanonifyid = 292
     .      . -> xmalloc(0x5C, 0x11AF5D, 0x5)
    38     14 <- xmalloc = 28
     .      . -> libcyrus_config_getswitch(0x1, 0x0, 0x1647CB)
    40      3 <- libcyrus_config_getswitch = 84
     .      . -> xrealloc(0x0, 0x4, 0xE488)
    68     14 <- xrealloc = 64
     .      . -> xstrdup(0x16871C, 0x4, 0xE488)
     .      . -> xmalloc(0x9, 0x2A0031, 0x168724)
    30      7 <- xmalloc = 28
    94     16 <- xstrdup = 40
8235260 109820 <- mynewstate = 356

mynewstate is taking 8s to run, and very little of the time is taken up in local subroutines. auth_unix.c:mynewstate calls getpwnam, and then iterates over all the groups using getgrent(), checking to see what groups the user is in. The fact that imapd does this twice might be a bug, but even if it didn't do it twice, it would still be slow.

Is running "getent group" slow?

Oy yes.

The only "way" to find out what groups a user is in, of course, is to interate over the groups file (or map) and look at the whole list of users assigned to a group. Ugly.

Now, if you can't think of any reasons you'd actually care about someone's group membership, it wouldn't be out of the question to remove said junk out of the auth_state function in auth_unix.c. Sendmail contains a nice option to turn off initgroups() like functionality, perhaps Cyrus could use one as well?

-rob
----
Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html

[Index of Archives]     [Cyrus SASL]     [Squirrel Mail]     [Asterisk PBX]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [KDE]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux