Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Oct 2004 11:05:25 +0200
From:      fandino <fandino@ng.fadesa.es>
To:        freebsd-geom@freebsd.org
Subject:   geom mirror -- bad read performance with BETA7 [long]
Message-ID:  <416E4155.2080302@ng.fadesa.es>

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

   I'm in the process of testing gmirror and during tests I get a very
poor read performance (about the 50%) and perhaps I'm missing
something but my idea of raid1 read performace is near to a single
disk throughput (or a bit  better).

first of all, I did tests over individual disks and they perform as 
expected:

-- disk description --

#  bsdlabel ad0s4
# /dev/ad0s4:
8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  c: 64709820        0    unused        0     0         # "raw" part, 
don't edit
  d:  6291456        0    4.2BSD        0     0     0

# bsdlabel ad0s2s4
# /dev/ad2s4:
8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  c: 64709820        0    unused        0     0         # "raw" part, 
don't edit
  d:  6291456        0    4.2BSD        0     0     0

-- format --

# newsfs -O2 -U ad0s4d
/dev/ad0s4d: 3072.0MB (6291456 sectors) block size 16384, fragment size 2048
    using 17 cylinder groups of 183.77MB, 11761 blks, 23552 inodes.
    with soft updates
super-block backups (for fsck -b #) at:
 160, 376512, 752864, 1129216, 1505568, 1881920, 2258272, 2634624, 3010976,
 3387328, 3763680, 4140032, 4516384, 4892736, 5269088, 5645440, 6021792
 

# newfs -O2 -U ad2s4d
/dev/ad2s4d: 3072.0MB (6291456 sectors) block size 16384, fragment size 2048
    using 17 cylinder groups of 183.77MB, 11761 blks, 23552 inodes.
    with soft updates
super-block backups (for fsck -b #) at:
 160, 376512, 752864, 1129216, 1505568, 1881920, 2258272, 2634624, 3010976,
 3387328, 3763680, 4140032, 4516384, 4892736, 5269088, 5645440, 6021792

-- mount  and create a gigabyte file --

# mkdir /mnt1 /mnt2
# mount /dev/ad0s4d /mnt1
 # mount /dev/ad2s4d /mnt2
# cd /mnt1/
# dd if=/dev/zero of=aa bs=1024k count=1024
1024+0 records in
1024+0 records out
1073741824 bytes transferred in 39.285669 secs (27331642 bytes/sec)
# cd /mnt2
# if=/dev/zero of=aa bs=1024k count=1024
1024+0 records in
1024+0 records out
1073741824 bytes transferred in 39.295175 secs (27325030 bytes/sec)

-- now read the newly created files --

# dd if=aa of=/dev/null bs=1024k
1024+0 records in
1024+0 records out
1073741824 bytes transferred in 36.291125 secs (29586898 bytes/sec)
# cd ../mnt2
# dd if=aa of=/dev/null bs=1024k
1024+0 records in
1024+0 records out
1073741824 bytes transferred in 38.807037 secs (27668740 bytes/sec)

-- ok it was good, now let me try to repeat all tests over a geom mirror --

# geom mirror label -v -b split -s 2048 probe /dev/ad0s4d /dev/ad2s4d
Metadata value stored on /dev/ad0s4d.
Metadata value stored on /dev/ad2s4d.
Done.

# gmirror list
Geom name: probe
State: COMPLETE
Components: 2
Balance: split
Slice: 2048
Flags: NONE
SyncID: 1
ID: 3225011317
Providers:
1. Name: mirror/probe
   Mediasize: 3221224960 (3.0G)
   Sectorsize: 512
   Mode: r0w0e0
Consumers:
1. Name: ad2s4d
   Mediasize: 3221225472 (3.0G)
   Sectorsize: 512
   Mode: r0w0e0
   State: ACTIVE
   Priority: 1
   Flags: NONE
   SyncID: 1
   ID: 1631357908
2. Name: ad0s4d
   Mediasize: 3221225472 (3.0G)
   Sectorsize: 512
   Mode: r0w0e0
   State: ACTIVE
   Priority: 0
   Flags: NONE
   SyncID: 1
   ID: 3998309608

Geom name: probe.sync


-- format --

# newfs -O2 -U /dev/mirror/probe
/dev/mirror/probe: 3072.0MB (6291452 sectors) block size 16384, fragment 
size 2048
    using 17 cylinder groups of 183.77MB, 11761 blks, 23552 inodes.
    with soft updates
super-block backups (for fsck -b #) at:
 160, 376512, 752864, 1129216, 1505568, 1881920, 2258272, 2634624, 3010976,
 3387328, 3763680, 4140032, 4516384, 4892736, 5269088, 5645440, 6021792
#  mount /dev/mirror/probe /mnt

-- write and read a gigabyte file --

#  dd if=/dev/zero of=aa bs=1024k count=1024
1024+0 records in
1024+0 records out
1073741824 bytes transferred in 47.281526 secs (22709542 bytes/sec)
# 
# 
# dd if=aa of=/dev/null bs=1024k
1024+0 records in
1024+0 records out
1073741824 bytes transferred in 100.970277 secs (10634237 bytes/sec)

-- opps!!!!! 10MB/second is very poor throughput.
   Any idea about this? I think there is something wrong.

  Thank you.

# dmesg     
Copyright (c) 1992-2004 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 5.3-BETA7 #0: Sat Oct  2 21:01:00 UTC 2004
    root@wv1u.samsco.home:/usr/obj/usr/src/sys/GENERIC
module_register: module uhub/umass already exists!
Module uhub/umass failed to register: 17
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: AMD Athlon(TM) XP 1600+ (1399.61-MHz 686-class CPU)
  Origin = "AuthenticAMD"  Id = 0x662  Stepping = 2
  
Features=0x383f9ff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE>
  AMD Features=0xc0400000<AMIE,DSP,3DNow!>
real memory  = 805224448 (767 MB)
avail memory = 778170368 (742 MB)
bktr_mem: memory holder loaded
npx0: [FAST]
npx0: <math processor> on motherboard
npx0: INT 16 interface
acpi0: <ASUS A7V133-C> on motherboard
acpi0: Power Button (fixed)
Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000
acpi_timer0: <24-bit timer at 3.579545MHz> port 0xe408-0xe40b on acpi0
cpu0: <ACPI CPU (3 Cx states)> on acpi0
acpi_button0: <Power Button> on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
agp0: <VIA 82C8363 (Apollo KT133A) host to PCI bridge> mem 
0xe6000000-0xe7ffffff at device 0.0 on pci0
pcib1: <PCI-PCI bridge> at device 1.0 on pci0
pci1: <PCI bus> on pcib1
drm0: <ATI Rage 128 Pro PF (AGP)> port 0xd800-0xd8ff mem 
0xdc800000-0xdc803fff,0xe0000000-0xe3ffffff irq 11 at device 0.0 on pci1
info: [drm] AGP at 0xe6000000 32MB
info: [drm] Initialized r128 2.5.0 20030725 on minor 0
isab0: <PCI-ISA bridge> at device 4.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <VIA 82C686B UDMA100 controller> port 
0xb800-0xb80f,0x376,0x170-0x177,0x3f6,0x1f0-0x1f7 at device 4.1 on pci0
ata0: channel #0 on atapci0
ata1: channel #1 on atapci0
uhci0: <VIA 83C572 USB controller> port 0xb400-0xb41f irq 9 at device 
4.2 on pci0
uhci0: [GIANT-LOCKED]
usb0: <VIA 83C572 USB controller> on uhci0
usb0: USB revision 1.0
uhub0: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
uhci1: <VIA 83C572 USB controller> port 0xb000-0xb01f irq 9 at device 
4.3 on pci0
uhci1: [GIANT-LOCKED]
usb1: <VIA 83C572 USB controller> on uhci1
usb1: USB revision 1.0
uhub1: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
pci0: <bridge, PCI-unknown> at device 4.4 (no driver attached)
pcm0: <VIA VT82C686A> port 0xa000-0xa003,0xa400-0xa403,0xa800-0xa8ff irq 
5 at device 4.5 on pci0
pcm0: [GIANT-LOCKED]
pcm0: <ICEnsemble ICE1232 AC97 Codec>
pci0: <display, VGA> at device 10.0 (no driver attached)
bktr0: <BrookTree 878> mem 0xde000000-0xde000fff irq 10 at device 11.0 
on pci0
bktr0: [GIANT-LOCKED]
bktr0: Card has no configuration EEPROM. Cannot determine card make.
bktr0: Pinnacle/Miro TV, Temic NTSC tuner.
pci0: <multimedia> at device 11.1 (no driver attached)
ed0: <NE2000 PCI Ethernet (RealTek 8029)> port 0x9400-0x941f irq 9 at 
device 13.0 on pci0
ed0: [GIANT-LOCKED]
ed0: Ethernet address: 00:02:44:17:3a:fa
ed0: if_start running deferred for Giant
type NE2000 (16 bit)
atapci1: <Promise PDC20265 UDMA100 controller> port 
0x7800-0x783f,0x8000-0x8003,0x8400-0x8407,0x8800-0x8803,0x9000-0x9007 
mem 0xdb800000-0xdb81ffff irq 10 at device 17.0 on pci0
ata2: channel #0 on atapci1
ata3: channel #1 on atapci1
fdc0: <floppy drive controller> port 0x3f7,0x3f2-0x3f5 irq 6 drq 2 on acpi0
fdc0: [FAST]
fd0: <1440-KB 3.5" drive> on fdc0 drive 0
ppc0 port 0x378-0x37f irq 7 on acpi0
ppc0: Generic chipset (EPP/NIBBLE) in COMPATIBLE mode
ppbus0: <Parallel port bus> on ppc0
plip0: <PLIP network interface> on ppbus0
lpt0: <Printer> on ppbus0
lpt0: Interrupt-driven port
ppi0: <Parallel I/O> on ppbus0
sio0 port 0x3f8-0x3ff irq 4 on acpi0
sio0: type 16550A
sio1 port 0x2f8-0x2ff irq 3 on acpi0
sio1: type 16550A
atkbdc0: <Keyboard controller (i8042)> port 0x64,0x60 irq 1 on acpi0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
psm0: <PS/2 Mouse> irq 12 on atkbdc0
psm0: [GIANT-LOCKED]
psm0: model Generic PS/2 mouse, device ID 0
orm0: <ISA Option ROM> at iomem 0xc0000-0xcbfff on isa0
pmtimer0 on isa0
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
Timecounter "TSC" frequency 1399614623 Hz quality 800
Timecounters tick every 10.000 msec
acpi_cpu: throttling enabled, 16 steps (100% to 6.2%), currently 100.0%
ad0: 38166MB <ST340823A/3.32> [77545/16/63] at ata0-master UDMA100
acd0: DVDR <HL-DT-ST DVDRAM GSA-4081B/A100> at ata0-slave UDMA33
ad2: 38166MB <ST340810A/5.33> [77545/16/63] at ata1-master UDMA100
acd1: DVDROM <TOSHIBA DVD-ROM SD-M1612/1004> at ata1-slave UDMA33
Mounting root from ufs:/dev/ad0s2a
GEOM_MIRROR: Device probe created (id=3225011317).
GEOM_MIRROR: Device probe: provider ad0s4d detected.
GEOM_MIRROR: Device probe: provider ad2s4d detected.
GEOM_MIRROR: Device probe: provider ad2s4d activated.
GEOM_MIRROR: Device probe: provider ad0s4d activated.
GEOM_MIRROR: Device probe: provider mirror/probe launched.
WARNING: Expected rawoffset 0, found 13446405
WARNING: Expected rawoffset 0, found 13446405
WARNING: Expected rawoffset 0, found 13446405
GEOM_MIRROR: Device probe: provider mirror/probe destroyed.
GEOM_MIRROR: Device probe destroyed.
GEOM_MIRROR: Device probe created (id=3225011317).
GEOM_MIRROR: Device probe: provider ad2s4d detected.
GEOM_MIRROR: Device probe: provider ad0s4d detected.
GEOM_MIRROR: Device probe: provider ad2s4d activated.
GEOM_MIRROR: Device probe: provider ad0s4d activated.
GEOM_MIRROR: Device probe: provider mirror/probe launched.
WARNING: Expected rawoffset 0, found 13446405
WARNING: Expected rawoffset 0, found 13446405
WARNING: Expected rawoffset 0, found 13446405
GEOM_MIRROR: Cannot add disk mirror/probed to probe (error=17).
WARNING: Expected rawoffset 0, found 13446405
WARNING: Expected rawoffset 0, found 13446405




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