uid/gid lookups slower on 6.2 than 4.x?

Clayton Milos clay at milos.co.za
Tue Apr 10 23:38:55 UTC 2007


----- Original Message ----- 
From: "Scott Lambert" <lambert at lambertfam.org>
To: "FreeBSD STABLE" <freebsd-stable at freebsd.org>
Sent: Wednesday, April 11, 2007 1:19 AM
Subject: uid/gid lookups slower on 6.2 than 4.x?


> I've run into an interesting performance "issue" with ls on a 6.2-STABLE
> box, web1.  This box is going to replace my current 4.11 box, ns,
> and is not currently active.  It's running all the daemons it will be in
> production, but traffic is not pointed at it yet.
>
> I don't think the gmirror vs. adaptec RAID disk subsystem would explain
> the performance differences.  I could be wrong.  If I am, I'm going to
> have to get a RAID card for the new box.
>
> root at web1 /home
> 17:58:57 Tue Apr 10 # time ls -l | wc -l
>    3135
>
> real    0m35.224s
> user    0m6.748s
> sys     0m28.482s
>
> root at web1 /home
> 17:59:48 Tue Apr 10 # time ls -l | wc -l
>    3135
>
> real    0m35.279s
> user    0m6.939s
> sys     0m28.348s
>
> root at web1 /home
> 18:00:37 Tue Apr 10 # time ls -l | wc -l
>    3135
>
> real    0m35.203s
> user    0m6.640s
> sys     0m28.569s
>
> root at web1 /home
> 18:01:13 Tue Apr 10 #  uname -a
> FreeBSD web1.hosting.tcworks.net 6.2-STABLE-200702 FreeBSD 
> 6.2-STABLE-200702 #0: Sun Feb  4 13:35:09 UTC 2007 
> root at dessler.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP  i386
>
> root at web1 /home
> 18:03:38 Tue Apr 10 # time ls -ln | wc -l
>    3135
>
> real    0m0.054s
> user    0m0.030s
> sys     0m0.031s
>
> root at web1 /home
> 18:04:53 Tue Apr 10 # time ls -ln | wc -l
>    3135
>
> real    0m0.054s
> user    0m0.046s
> sys     0m0.014s
>
> root at web1 /home
> 18:04:54 Tue Apr 10 # time ls -ln | wc -l
>    3135
>
> real    0m0.054s
> user    0m0.037s
> sys     0m0.024s
>
> The difference in the number of home directories is due to my rsync
> script not using the --delete option, yet.
>
> Here are the same statistics from my 4.11 box.  This box is in
> production with the same daemons as the web1 box. :
>
> root at ns /home
> 18:04:38 Tue Apr 10 # time ls -l | wc -l
>    3070
>
> real    0m0.113s
> user    0m0.041s
> sys     0m0.050s
>
> root at ns /home
> 18:04:41 Tue Apr 10 # time ls -l | wc -l
>
>    3070
>
> real    0m0.096s
> user    0m0.037s
> sys     0m0.053s
>
> root at ns /home
> 18:04:41 Tue Apr 10 # time ls -l | wc -l
>    3070
>
> real    0m0.099s
> user    0m0.046s
> sys     0m0.046s
>
> root at ns /home
> 18:04:44 Tue Apr 10 # uname -a
> FreeBSD ns 4.11-RELEASE-p21 FreeBSD 4.11-RELEASE-p21 #2: Thu Sep 21 
> 00:53:20 CDT 2006     root at sysmon:/usr/obj/usr/src/sys/NS  i386
>
> root at ns /home
> 18:09:38 Tue Apr 10 # time ls -ln | wc -l
>    3070
>
> real    0m0.055s
> user    0m0.030s
> sys     0m0.023s
>
> root at ns /home
> 18:10:20 Tue Apr 10 # time ls -ln | wc -l
>    3070
>
> real    0m0.055s
> user    0m0.031s
> sys     0m0.022s
>
> root at ns /home
> 18:10:21 Tue Apr 10 # time ls -ln | wc -l
>    3070
>
> real    0m0.059s
> user    0m0.041s
> sys     0m0.012s
>
>
> -- 
> Scott Lambert                    KC5MLE                       Unix 
> SysAdmin
> lambert at lambertfam.org
>

First thing to check is if the RAID card has onboard cache. I've found RAID 
cards to cache things like this and make the array appear incredibly fast.
You haven't said which RAID card you are using but if it's an Adaptec I'm 
pretty sure it has some amount of onboard cache.

-Clay



More information about the freebsd-stable mailing list