kern/110729: gmirror read speed is half of maximum
Mykola Zubach
zuborg at advancedhosters.com
Fri Mar 23 20:00:10 UTC 2007
>Number: 110729
>Category: kern
>Synopsis: gmirror read speed is half of maximum
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Fri Mar 23 20:00:09 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator: Mykola Zubach
>Release: FreeBSD 6.2
>Organization:
AdvancedHosters.com
>Environment:
FreeBSD A0022 6.2-RELEASE FreeBSD 6.2-RELEASE #2: Mon Jan 29 15:06:29 UTC 2007 root at A00014:/usr/src/sys/i386/compile/Z i386
>Description:
A0022# gmirror list
Geom name: gm0
State: COMPLETE
Components: 2
Balance: round-robin
Slice: 4096
Flags: NOAUTOSYNC
GenID: 0
SyncID: 1
ID: 2775573558
Providers:
1. Name: mirror/gm0
Mediasize: 250059349504 (233G)
Sectorsize: 512
Mode: r7w7e8
Consumers:
1. Name: ad4
Mediasize: 250059350016 (233G)
Sectorsize: 512
Mode: r1w1e1
State: ACTIVE
Priority: 0
Flags: DIRTY
GenID: 0
SyncID: 1
ID: 3586241583
2. Name: ad6
Mediasize: 250059350016 (233G)
Sectorsize: 512
Mode: r1w1e1
State: ACTIVE
Priority: 0
Flags: DIRTY
GenID: 0
SyncID: 1
ID: 787590598
I run gstat to see disk activity
dd if=/dev/mirror/gm0 of=/dev/null bs=64k
L(q) ops/s r/s kBps ms/r w/s kBps ms/w %busy Name
0 602 602 38557 0.6 0 0 0.0 34.2| ad4
1 601 601 38433 1.0 0 0 0.0 59.8| ad6
1 1203 1203 76990 0.8 0 0 0.0 96.2| mirror/gm0
read speed while doing such test is equal to read speed from single disk, like
dd if=/dev/ad4 of=/dev/null bs=64k
L(q) ops/s r/s kBps ms/r w/s kBps ms/w %busy Name
1 1302 1302 83321 0.7 0 0 0.0 95.7| ad4
But if I run two dd from both disks - both disks are readed on full speed, so total read speed is doubled, like it could be in correct RAID1 implementation
L(q) ops/s r/s kBps ms/r w/s kBps ms/w %busy Name
1 1270 1270 81274 0.8 0 0 0.0 96.1| ad4
1 1231 1231 78804 0.8 0 0 0.0 96.3| ad6
This behavior does not depends on what kind of disks are used (PATA, SATA, SCSI..), on what controllers resides these disks (ad0 on ata0 and ad4 on ata1), on balance method (round-robin, prefer, split etc)
I think it would be nice for gmirror to provide full doubled speed of reading data from disks, like in hardware raids
>How-To-Repeat:
setup gmirror on any system
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list