Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Apr 2007 18:19:42 -0500
From:      Scott Lambert <lambert@lambertfam.org>
To:        FreeBSD STABLE <freebsd-stable@freebsd.org>
Subject:   uid/gid lookups slower on 6.2 than 4.x?
Message-ID:  <20070410231942.GB13500@sysmon.tcworks.net>

next in thread | raw e-mail | index | archive | help

--3MwIy2ne0vdjdPXF
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

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@web1 /home
17:58:57 Tue Apr 10 # time ls -l | wc -l 
    3135

real    0m35.224s
user    0m6.748s
sys     0m28.482s

root@web1 /home
17:59:48 Tue Apr 10 # time ls -l | wc -l
    3135

real    0m35.279s
user    0m6.939s
sys     0m28.348s

root@web1 /home
18:00:37 Tue Apr 10 # time ls -l | wc -l
    3135

real    0m35.203s
user    0m6.640s
sys     0m28.569s

root@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@dessler.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP  i386

root@web1 /home
18:03:38 Tue Apr 10 # time ls -ln | wc -l
    3135

real    0m0.054s
user    0m0.030s
sys     0m0.031s

root@web1 /home
18:04:53 Tue Apr 10 # time ls -ln | wc -l
    3135

real    0m0.054s
user    0m0.046s
sys     0m0.014s

root@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@ns /home
18:04:38 Tue Apr 10 # time ls -l | wc -l
    3070

real    0m0.113s
user    0m0.041s
sys     0m0.050s

root@ns /home
18:04:41 Tue Apr 10 # time ls -l | wc -l

    3070

real    0m0.096s
user    0m0.037s
sys     0m0.053s

root@ns /home
18:04:41 Tue Apr 10 # time ls -l | wc -l
    3070

real    0m0.099s
user    0m0.046s
sys     0m0.046s
 
root@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@sysmon:/usr/obj/usr/src/sys/NS  i386

root@ns /home
18:09:38 Tue Apr 10 # time ls -ln | wc -l
    3070

real    0m0.055s
user    0m0.030s
sys     0m0.023s

root@ns /home
18:10:20 Tue Apr 10 # time ls -ln | wc -l
    3070

real    0m0.055s
user    0m0.031s
sys     0m0.022s

root@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@lambertfam.org


--3MwIy2ne0vdjdPXF
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="web1.dmesg.boot"

Copyright (c) 1992-2007 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
	The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 6.2-STABLE-200702 #0: Sun Feb  4 13:35:09 UTC 2007
    root@dessler.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: Intel(R) Xeon(TM) CPU 2.40GHz (2392.29-MHz 686-class CPU)
  Origin = "GenuineIntel"  Id = 0xf27  Stepping = 7
  Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
  Features2=0x4400<CNTX-ID,<b14>>
  Logical CPUs per core: 2
real memory  = 1073676288 (1023 MB)
avail memory = 1041481728 (993 MB)
ACPI APIC Table: <INTEL  SWV25   >
FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
 cpu0 (BSP): APIC ID:  0
 cpu1 (AP): APIC ID:  1
    ACPI-0698: *** Warning: Type override - [DEB_] had invalid type (Integer) for Scope operator, changed to (Scope)
    ACPI-0698: *** Warning: Type override - [MLIB] had invalid type (Integer) for Scope operator, changed to (Scope)
    ACPI-0698: *** Warning: Type override - [DATA] had invalid type (String) for Scope operator, changed to (Scope)
    ACPI-0698: *** Warning: Type override - [SIO_] had invalid type (String) for Scope operator, changed to (Scope)
    ACPI-0698: *** Warning: Type override - [LEDP] had invalid type (String) for Scope operator, changed to (Scope)
    ACPI-0698: *** Warning: Type override - [GPEN] had invalid type (String) for Scope operator, changed to (Scope)
    ACPI-0698: *** Warning: Type override - [GPST] had invalid type (String) for Scope operator, changed to (Scope)
    ACPI-0698: *** Warning: Type override - [WUES] had invalid type (String) for Scope operator, changed to (Scope)
    ACPI-0698: *** Warning: Type override - [WUSE] had invalid type (String) for Scope operator, changed to (Scope)
    ACPI-0698: *** Warning: Type override - [SBID] had invalid type (String) for Scope operator, changed to (Scope)
    ACPI-0698: *** Warning: Type override - [SWCE] had invalid type (String) for Scope operator, changed to (Scope)
ioapic0 <Version 2.0> irqs 0-23 on motherboard
ioapic1 <Version 2.0> irqs 24-47 on motherboard
ioapic2 <Version 2.0> irqs 48-71 on motherboard
lapic0: Forcing LINT1 to edge trigger
kbd1 at kbdmux0
ath_hal: 0.9.20.3 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413, RF5413)
acpi0: <INTEL SWV25> on motherboard
acpi0: Power Button (fixed)
Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x408-0x40b on acpi0
acpi_ec0: <Embedded Controller: GPE 0x8> port 0xca6,0xca7 on acpi0
cpu0: <ACPI CPU> on acpi0
cpu1: <ACPI CPU> on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
pci0: <unknown> at device 0.1 (no driver attached)
pcib1: <ACPI PCI-PCI bridge> at device 3.0 on pci0
pci2: <ACPI PCI bus> on pcib1
pci2: <base peripheral, interrupt controller> at device 28.0 (no driver attached)
pcib2: <ACPI PCI-PCI bridge> at device 29.0 on pci2
pci4: <ACPI PCI bus> on pcib2
ahd0: <Adaptec AIC7902 Ultra320 SCSI adapter> port 0x3800-0x38ff,0x4000-0x40ff mem 0xfe9e0000-0xfe9e1fff irq 50 at device 7.0 on pci4
ahd0: [GIANT-LOCKED]
aic7902: Ultra320 Wide Channel A, SCSI Id=7, PCI-X 67-100Mhz, 512 SCBs
ahd1: <Adaptec AIC7902 Ultra320 SCSI adapter> port 0x3000-0x30ff,0x3400-0x34ff mem 0xfe9f0000-0xfe9f1fff irq 49 at device 7.1 on pci4
ahd1: [GIANT-LOCKED]
aic7902: Ultra320 Wide Channel B, SCSI Id=7, PCI-X 67-100Mhz, 512 SCBs
pci2: <base peripheral, interrupt controller> at device 30.0 (no driver attached)
pcib3: <ACPI PCI-PCI bridge> at device 31.0 on pci2
pci3: <ACPI PCI bus> on pcib3
em0: <Intel(R) PRO/1000 Network Connection Version - 6.2.9> port 0x2040-0x207f mem 0xfe6c0000-0xfe6dffff irq 30 at device 7.0 on pci3
em0: Ethernet address: 00:07:e9:05:61:0a
em1: <Intel(R) PRO/1000 Network Connection Version - 6.2.9> port 0x2000-0x203f mem 0xfe6e0000-0xfe6fffff irq 31 at device 7.1 on pci3
em1: Ethernet address: 00:07:e9:05:61:0b
pci0: <unknown> at device 3.1 (no driver attached)
uhci0: <Intel 82801CA/CAM (ICH3) USB controller USB-A> port 0x5020-0x503f irq 16 at device 29.0 on pci0
uhci0: [GIANT-LOCKED]
usb0: <Intel 82801CA/CAM (ICH3) USB controller USB-A> on uhci0
usb0: USB revision 1.0
uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
uhci1: <Intel 82801CA/CAM (ICH3) USB controller USB-B> port 0x5000-0x501f irq 19 at device 29.1 on pci0
uhci1: [GIANT-LOCKED]
usb1: <Intel 82801CA/CAM (ICH3) USB controller USB-B> on uhci1
usb1: USB revision 1.0
uhub1: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
pcib4: <ACPI PCI-PCI bridge> at device 30.0 on pci0
pci1: <ACPI PCI bus> on pcib4
pci1: <display, VGA> at device 12.0 (no driver attached)
isab0: <PCI-ISA bridge> at device 31.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <Intel ICH3 UDMA100 controller> port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0x3a0-0x3af at device 31.1 on pci0
ata0: <ATA channel 0> on atapci0
ata1: <ATA channel 1> on atapci0
pci0: <serial bus, SMBus> at device 31.3 (no driver attached)
atkbdc0: <Keyboard controller (i8042)> port 0x60,0x64 irq 1 on acpi0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
fdc0: <floppy drive controller (FDE)> port 0x3f2-0x3f3,0x3f4-0x3f5,0x3f7 irq 6 drq 2 on acpi0
fdc0: [FAST]
fd0: <1440-KB 3.5" drive> on fdc0 drive 0
sio0: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0
sio0: type 16550A
sio1: <16550A-compatible COM port> port 0x2f8-0x2ff irq 3 on acpi0
sio1: type 16550A
pmtimer0 on isa0
orm0: <ISA Option ROMs> at iomem 0xc0000-0xc7fff,0xc8000-0xc97ff,0xc9800-0xcafff on isa0
ppc0: parallel port not found.
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
Timecounters tick every 1.000 msec
Waiting 5 seconds for SCSI devices to settle
acd0: CDROM <SAMSUNG CD-ROM SN-124/N101> at ata1-master UDMA33
ses0 at ahd1 bus 0 target 6 lun 0
ses0: <ESG-SHV SCA HSBP M16 0.05> Fixed Processor SCSI-2 device 
ses0: 3.300MB/s transfers
ses0: SAF-TE Compliant Device
lapic1: Forcing LINT1 to edge trigger
SMP: AP CPU #1 Launched!
da0 at ahd1 bus 0 target 0 lun 0
da0: <SEAGATE ST3146707LC 0003> Fixed Direct Access SCSI-3 device 
da0: 320.000MB/s transfers (160.000MHz, offset 63, 16bit), Tagged Queueing Enabled
da0: 140014MB (286749488 512 byte sectors: 255H 63S/T 17849C)
da1 at ahd1 bus 0 target 3 lun 0
da1: <SEAGATE ST3146707LC 0003> Fixed Direct Access SCSI-3 device 
da1: 320.000MB/s transfers (160.000MHz, offset 63, 16bit), Tagged Queueing Enabled
da1: 140014MB (286749488 512 byte sectors: 255H 63S/T 17849C)
GEOM_MIRROR: Device gm0 created (id=149269652).
GEOM_MIRROR: Device gm0: provider da0 detected.
GEOM_MIRROR: Device gm0: provider da1 detected.
GEOM_MIRROR: Device gm0: provider da1 activated.
GEOM_MIRROR: Device gm0: provider da0 activated.
GEOM_MIRROR: Device gm0: provider mirror/gm0 launched.
Trying to mount root from ufs:/dev/mirror/gm0s1a

--3MwIy2ne0vdjdPXF
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="ns.dmesg.boot"

Copyright (c) 1992-2005 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
	The Regents of the University of California. All rights reserved.
FreeBSD 4.11-RELEASE-p21 #2: Thu Sep 21 00:53:20 CDT 2006
    root@sysmon:/usr/obj/usr/src/sys/NS
Timecounter "i8254"  frequency 1193182 Hz
CPU: Intel(R) Pentium(R) III CPU family      1400MHz (1393.31-MHz 686-class CPU)
  Origin = "GenuineIntel"  Id = 0x6b1  Stepping = 1
  Features=0x383fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE>
real memory  = 1610612736 (1572864K bytes)
avail memory = 1564065792 (1527408K bytes)
Preloaded elf kernel "kernel" at 0xc0305000.
Pentium Pro MTRR support enabled
md0: Malloc disk
Using $PIR table, 14 entries at 0xc00fdee0
npx0: <math processor> on motherboard
npx0: INT 16 interface
pcib1: <ServerWorks host to PCI bridge> on motherboard
pci1: <PCI bus> on pcib1
pcib0: <ServerWorks host to PCI bridge> on motherboard
pci0: <PCI bus> on pcib0
pci0: <ATI Mach64-GR graphics accelerator> at 2.0 irq 5
fxp0: <Intel 82550 Pro/100 Ethernet> port 0x2400-0x243f mem 0xf8000000-0xf801ffff,0xf8041000-0xf8041fff irq 9 at device 3.0 on pci0
fxp0: Ethernet address 00:02:b3:50:18:29
inphy0: <i82555 10/100 media interface> on miibus0
inphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
fxp1: <Intel 82550 Pro/100 Ethernet> port 0x2440-0x247f mem 0xf8020000-0xf803ffff,0xf8042000-0xf8042fff irq 10 at device 4.0 on pci0
fxp1: Ethernet address 00:02:b3:50:18:2a
inphy1: <i82555 10/100 media interface> on miibus1
inphy1:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
isab0: <PCI to ISA bridge (vendor=1166 device=0201)> at device 15.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <ServerWorks CSB5 ATA100 controller> port 0x2490-0x2493,0x2480-0x248f,0x374-0x377,0x170-0x177,0x3f4-0x3f7,0x1f0-0x1f7 at device 15.1 on pci0
ata0: at 0x1f0 irq 14 on atapci0
ata1: at 0x170 irq 15 on atapci0
ohci0: <OHCI (generic) USB controller> mem 0xf8043000-0xf8043fff irq 10 at device 15.2 on pci0
usb0: OHCI version 1.0, legacy support
usb0: <OHCI (generic) USB controller> on ohci0
usb0: USB revision 1.0
uhub0: (0x1166) OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 4 ports with 4 removable, self powered
pcib2: <ServerWorks host to PCI bridge> on motherboard
pci2: <PCI bus> on pcib2
asr0: <Adaptec Caching SCSI RAID> mem 0xfc000000-0xfdffffff,0xfb000000-0xfbffffff,0xfa000000-0xfa0fffff irq 9 at device 9.0 on pci2
asr0: major=154
asr0: ADAPTEC 2000S FW Rev. 380E, 2 channel, 256 CCBs, Protocol I2O
pcib3: <ServerWorks host to PCI bridge> on motherboard
pci3: <PCI bus> on pcib3
pcib4: <Host to PCI bridge> on motherboard
pci4: <PCI bus> on pcib4
orm0: <Option ROMs> at iomem 0xc0000-0xc7fff,0xc8000-0xc97ff,0xc9800-0xcafff,0xcb000-0xd0fff,0xde000-0xdffff on isa0
pmtimer0 on isa0
atkbdc0: <Keyboard controller (i8042)> at port 0x60,0x64 on isa0
atkbd0: <AT Keyboard> flags 0x1 irq 1 on atkbdc0
kbd0 at atkbd0
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0
sio0: type 16550A
sio1 at port 0x2f8-0x2ff irq 3 on isa0
sio1: type 16550A
ppc0: <Parallel port> at port 0x378-0x37f irq 7 on isa0
ppc0: SMC-like chipset (ECP/EPP/PS2/NIBBLE) in COMPATIBLE mode
ppc0: FIFO with 16/16/8 bytes threshold
lpt0: <Printer> on ppbus0
lpt0: Interrupt-driven port
acd0: CDROM <FX54++M> at ata0-master PIO4
pass1 at asr0 bus 0 target 6 lun 0
pass1: <ESG-SHV SCA HSBP M15 0.07> Fixed Processor SCSI-2 device 
da0 at asr0 bus 0 target 0 lun 0
da0: <ADAPTEC RAID-1 380E> Fixed Direct Access SCSI-2 device 
da0: Tagged Queueing Enabled
da0: 35003MB (71686144 512 byte sectors: 255H 63S/T 4462C)
Mounting root from ufs:/dev/da0s1a
WARNING: / was not properly dismounted

--3MwIy2ne0vdjdPXF--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070410231942.GB13500>