Subject: Re: File system performance on i386
To: Charles M. Hannum <root@ihack.net>
From: Bharani Chadalavada <bharani.chadalavada@nexsi.com>
List: tech-perform
Date: 02/23/2001 16:09:55
This is a multi-part message in MIME format.
--------------67ADE9FEF5F496875592B90E
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

OK.

Thank you everyone for all your inputs.  I did really get some insight into
how things work/supposed to work.

I recompiled my sources again with some modifications based on your
suggestions.

Here are the latest results :-

Linux - 5 minutes.
NetBSD (softdep, BUFCACHE - 5%) 9 minutes
NetBSD(softdep, BUFCACHE - 10%) 8 minutes
NetBSD(async, BUFCACHE) - 10%) 7 min 40 secs

I tries higher values for BUFCACHE and could not get better performance
than this.

I am attaching the dmesg output. I am using pciide and not wdc. This brings
to my original question. Can something be done to make the performance
equal to/better than Linux??

Thank you,
Bharani.

"Charles M. Hannum" wrote:

> I don't know where you got this silly idea you're arguing so vehemently,
> but I really suggest that you read even a little bit of the 30+ years of
> file system research that's readily available.
>
> In ANY SYSTEM WITH ASYNCHRONOUS I/O -- which includes both Linux ext2fs
> and NetBSD's ffs (unless you use MNT_SYNC) -- there is a possibility
> that file data will not have been synced when the machine goes down.
> There is NO way to avoid this unless you write everything synchronously
> (i.e. MNT_SYNC) or use a hardware backup mechanism (e.g. PrestoServe).
>
> The problem with a fully asynchronous file system is that you can lose a
> lot of information about *which file* a piece of data belongs to.  E.g.,
> if one file is deleted and another created, a particular block may be
> reused.  With asynchronous I/O, it's possible to have enough information
> on disk to see that there is a new file with that block, but the block
> itself was never written.  This is actually a serious SECURITY problem,
> as it can give private data away.  A system with ordered writes (either
> softdep or the old ffs synchronous metadata mechanism) NEVER has this
> type of problem.
>
> But it's worse than that.  With a long chain of removal and creation
> (say, deleting your Linux kernel source tree and unpacking a new one),
> it's possible to make so much hash of your file system metadata that
> e2fsck(8) just loses its lunch.  Since I've personally had this happen,
> I can vouch that it's nowhere near as `reliable' as you claim.

--------------67ADE9FEF5F496875592B90E
Content-Type: text/plain; charset=us-ascii;
 name="dmsg"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="dmsg"

NetBSD 1.5 (joe) #0: Fri Feb 23 15:15:59 PST 2001
    bharani@bharani-image:/home/bharani/src/sys/arch/i386/compile/joe
cpu0: Intel Pentium III (E) (686-class)
total memory = 126 MB
avail memory = 114 MB
using 1642 buffers containing 6568 KB of memory
BIOS32 rev. 0 found at 0xffe90
mainbus0 (root)
pci0 at mainbus0 bus 0: configuration mode 1
pci0: i/o space, memory space enabled
pchb0 at pci0 dev 0 function 0
pchb0: Intel 82810-DC100 Memory Controller Hub (rev. 0x03)
Intel 82810-DC100 Graphics Controller (VGA display, revision 0x03) at pci0 dev 1 function 0 not configured
ppb0 at pci0 dev 30 function 0: Intel 82801AA Hub-to-PCI Bridge (rev. 0x02)
pci1 at ppb0 bus 1
pci1: i/o space, memory space enabled
vga1 at pci1 dev 7 function 0: Silicon Integrated System 6326 AGP VGA (rev. 0x0b)
wsdisplay0 at vga1: console (80x25, vt100 emulation)
fxp0 at pci1 dev 8 function 0: Intel i82557 Ethernet, rev 8
fxp0: interrupting at irq 10
fxp0: Ethernet address 00:02:b3:1f:f9:ea, 10/100 Mb/s
inphy0 at fxp0 phy 1: i82555 10/100 media interface, rev. 4
inphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
fxp1 at pci1 dev 9 function 0: Intel i82557 Ethernet, rev 8
fxp1: interrupting at irq 5
fxp1: Ethernet address 00:02:b3:1f:f9:ce, 10/100 Mb/s
inphy1 at fxp1 phy 1: i82555 10/100 media interface, rev. 4
inphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
ex0 at pci1 dev 12 function 0: 3Com 3c905C-TX 10/100 Ethernet with mngmt (rev. 0x78)
ex0: interrupting at irq 5
ex0: MAC address 00:b0:d0:16:7e:4b
ukphy0 at ex0 phy 24: Generic IEEE 802.3u media interface
ukphy0: OUI 0x001018, model 0x0017, rev. 7
ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
pcib0 at pci0 dev 31 function 0
pcib0: Intel 82801AA LPC Interface Bridge (rev. 0x02)
pciide0 at pci0 dev 31 function 1: Intel 82801AA IDE Controller (ICH) (rev. 0x02)
pciide0: bus-master DMA support present
pciide0: primary channel wired to compatibility mode
wd0 at pciide0 channel 0 drive 0: <ST310211A>
wd0: drive supports 16-sector pio transfers, lba addressing
wd0: 9541 MB, 16383 cyl, 16 head, 63 sec, 512 bytes/sect x 19541088 sectors
wd0: 32-bit data port
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 5
pciide0: primary channel interrupting at irq 14
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 4 (using DMA data transfers)
pciide0: secondary channel wired to compatibility mode
atapibus0 at pciide0 channel 1
cd0 at atapibus0 drive 0: <CRD-8482B, , 1.05> type 5 cdrom removable
cd0: 32-bit data port
cd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 2
pciide0: secondary channel interrupting at irq 15
cd0(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 2 (using DMA data transfers)
uhci0 at pci0 dev 31 function 2: Intel 82801AA USB Controller (rev. 0x02)
uhci0: interrupting at irq 11
usb0 at uhci0: USB revision 1.0
uhub0 at usb0
uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
Intel 82801AA SMBus Controller (SMBus serial bus, revision 0x02) at pci0 dev 31 function 3 not configured
isa0 at pcib0
com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
com1 at isa0 port 0x2f8-0x2ff irq 3: ns16550a, working fifo
pckbc0 at isa0 port 0x60-0x64
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pms0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
lpt0 at isa0 port 0x378-0x37b irq 7
pcppi0 at isa0 port 0x61
sysbeep0 at pcppi0
isapnp0 at isa0 port 0x279: ISA Plug 'n Play device support
npx0 at isa0 port 0xf0-0xff: using exception 16
fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2
fd0 at fdc0 drive 0: 1.44MB, 80 cyl, 2 head, 18 sec
isapnp0: no ISA Plug 'n Play devices found
biomask eb45 netmask ef65 ttymask ffe7
boot device: wd0
root on wd0a dumps on wd0b
root file system type: ffs
wsdisplay0: screen 1 added (80x25, vt100 emulation)
wsdisplay0: screen 2 added (80x25, vt100 emulation)
wsdisplay0: screen 3 added (80x25, vt100 emulation)
wsdisplay0: screen 4 added (80x25, vt100 emulation)
wsmux1: connecting to wsdisplay0

--------------67ADE9FEF5F496875592B90E--