Re: FreeBSD question.

Jon Lewis <[email protected]> Fri, 27 Jan 2012 21:57:02 -0500 (EST)
Newsgroups gmane.org.operators.internet-access
Message-ID <[email protected]>
On Fri, 27 Jan 2012, Keith wrote:

> I have come across something with FreeBSD I have never seen before and
> dont know what to make of it.
>
> We have an ancient FBSD 4.1 server, dual CPU 800mhz, an old Perc 3
> controller serving about 3700 accounts. It has served us well and
> done its time and now have a quad-core dual cpu box, with a Perc 5/i to
> replace the old one.
>
> I installed 7.4 on the new machine a while back copied over the mail spool
> and the password file (we still auth on this server via the passwd file)
> and home directories.
>
> Setting up this machine I noticed ls -l in /var/mail takes ~30 seconds
> to complete:
>
> real    0m29.277s
> user    0m6.394s
> sys     0m12.723s
>
> On the 4.1 machine it takes:
>
> real    0m0.639s
> user    0m0.041s
> sys     0m0.189s
>
> Both mail spools live in /var/mail on each machine and on a RAID5
> partition. Installed 8.1 on the machine and I have ls -l going about 20-25
> seconds to complete.
>
> One thing I noticed somewhat by accident is that when all the
> mailboxes in /var/mail are owned by root ls -l takes this long:
>
> real    0m0.043s
> user    0m0.009s
> sys     0m0.033s

I don't do BSD...but from what you've already discovered, I'd guess 
there's something misconfigured on the newer systems slowing down uid/gid 
lookups (or maybe something on the older system speeding them up).  BSD 
must have something like Linux's strace and ltrace.  I'd find and use the 
BSD equivalents to see whats going on when you run ls -l on both the old 
and new systems.

Back when we were running a large mail server authing from /etc/passwd / 
/etc/shadow, there was an option (not done by default), to build passwd, 
shadow, and maybe group file dbs (It's been a very long time).  Having the 
system getpw* functions use those dbs sped up lookups considerably.

----------------------------------------------------------------------
  Jon Lewis, MCP :)           |  I route
  Senior Network Engineer     |  therefore you are
  Atlantic Net                |
_________ http://www.lewis.org/~jlewis/pgp for PGP public key_________
-- 
Eat sushi frequently. - Avi
[email protected] is the human contact address.
[email protected] is the list posting address.
See below URL for subscribe/unsubscribe and list options:
http://inet-access.net/mailman/listinfo/list