Zsh Mailing List Archive
Messages sorted by:
Re: Multi-Minute Startup?
- X-seq: zsh-users 13130
- From: Dan Nelson <dnelson@xxxxxxxxxxxxxxx>
- To: Aaron Davies <aaron.davies@xxxxxxxxx>
- Subject: Re: Multi-Minute Startup?
- Date: Mon, 11 Aug 2008 10:29:10 -0500
- Cc: "Benjamin R. Haskell" <zsh@xxxxxxxxxx>, Zsh Users <zsh-users@xxxxxxxxxx>
- In-reply-to: <c4e763ac0808110248g7dedabb9kbe6af57fcb0b8d68@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <alpine.LNX.1.10.0808070254580.26055@xxxxxxxxxxxxxxxxxxxxx> <c4e763ac0808070020r595f3b64u38eeefbc37bc85b6@xxxxxxxxxxxxxx> <alpine.LNX.1.10.0808070327310.26055@xxxxxxxxxxxxxxxxxxxxx> <c4e763ac0808070152k2846913dn4b637fe9ea275ef2@xxxxxxxxxxxxxx> <alpine.LNX.1.10.0808070509320.26055@xxxxxxxxxxxxxxxxxxxxx> <c4e763ac0808071832j6f7393fay158c7a2485ca41c9@xxxxxxxxxxxxxx> <20080808025823.GB68181@xxxxxxxxxxxxxxxx> <c4e763ac0808072340l398c5209o1cd6ccd77ec08a7f@xxxxxxxxxxxxxx> <alpine.LNX.1.10.0808081201180.26055@xxxxxxxxxxxxxxxxxxxxx> <c4e763ac0808110248g7dedabb9kbe6af57fcb0b8d68@xxxxxxxxxxxxxx>
In the last episode (Aug 11), Aaron Davies said:
> On Sat, Aug 9, 2008 at 12:03 AM, Benjamin R. Haskell wrote:
> > On Fri, 8 Aug 2008, Aaron Davies wrote:
> >> On Fri, Aug 8, 2008 at 10:58 AM, Dan Nelson wrote:
> >>> In the last episode (Aug 08), Aaron Davies said:
> >>>> FWIW, "getent group" returns 773 lines and takes about 3.5
> >>>> minutes to run.
> >>> If it takes that long to return only 773 lines, you should
> >>> probably turn on nscd, or if it's already on, crank up the cache
> >>> size and TTL.
> ok, it is running, and it looks like it should be doing something.
> > egrep passwd\|group /etc/nscd.conf
> # Currently supported cache names (services): passwd, group, hosts
> enable-cache passwd yes
> positive-time-to-live passwd 600
> negative-time-to-live passwd 20
> suggested-size passwd 211
> check-files passwd yes
> persistent passwd yes
> shared passwd yes
> enable-cache group yes
> positive-time-to-live group 3600
> negative-time-to-live group 60
> suggested-size group 211
> check-files group yes
> persistent group yes
> shared group yes
> how would you suggest i modify these?
> there are about 700 users and 800 groups in the getent results.
Disable persistent; nscd will crash when its persistent cache fills up.
Raise suggested-size to 1601 (a prime number larger than your current
list size with some room to grow). Also, raise "positive-time-to-live
passwd" to 3600. Group membership changes a lot more often than passwd
data does, so you might as well make them the same. If you change
group memberships a lot, you might want to lower the group TTL (or
remember to bounce nscd whenever you make a change). Note that
passwords aren't managed by nsswitch/nscd, so don't worry about a high
value desynchronizing passwords.
You can verify that it's working by timing two consecutive "getent
group" runs; the 2nd should return the entire list immediately. "nscd
-g" also prints some stats, like hit and miss counts.
Messages sorted by: