From nobody@FreeBSD.org  Mon Mar 26 11:25:55 2007
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id DB91A16A402
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 26 Mar 2007 11:25:55 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [69.147.83.33])
	by mx1.freebsd.org (Postfix) with ESMTP id B415F13C469
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 26 Mar 2007 11:25:55 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id l2QBPtkx008533
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 26 Mar 2007 11:25:55 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id l2QBKsC0007564;
	Mon, 26 Mar 2007 11:20:54 GMT
	(envelope-from nobody)
Message-Id: <200703261120.l2QBKsC0007564@www.freebsd.org>
Date: Mon, 26 Mar 2007 11:20:54 GMT
From: Mykola Zubach<zuborg@advancedhosters.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: gmirror read speed is half of maximum
X-Send-Pr-Version: www-3.0

>Number:         110846
>Category:       kern
>Synopsis:       gmirror read speed is half of maximum
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Mar 26 11:30:04 GMT 2007
>Closed-Date:    Mon Mar 26 15:30:43 GMT 2007
>Last-Modified:  Fri Jul 13 02:10:06 GMT 2007
>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@A00014:/usr/src/sys/i386/compile/Z  i386

>Description:
Correct RAID1 (mirroring) implementation cause raw read speed to to be doubled compared to raw read speed from single drive. But gmirror doesn't:

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

Parralel read from HDDs test:

A0022# dd if=/dev/ad4 of=/dev/null bs=128k count=10000 & dd if=/dev/ad6 of=/dev/null bs=128k count=10000
[1] 58794
10000+0 records in
10000+0 records out
1310720000 bytes transferred in 15.590913 secs (84069483 bytes/sec)
10000+0 records in
10000+0 records out
1310720000 bytes transferred in 16.416866 secs (79839842 bytes/sec)

 L(q)  ops/s    r/s   kBps   ms/r    w/s   kBps   ms/w   %busy Name
    1    608    608  77873    1.6      0      0    0.0   97.4| ad4
    1    616    616  78862    1.6      0      0    0.0   97.0| ad6

Read from gmirror test:

A0022# dd if=/dev/mirror/gm0 of=/dev/null bs=128k count=10000 
10000+0 records in
10000+0 records out
1310720000 bytes transferred in 16.624842 secs (78841050 bytes/sec)

 L(q)  ops/s    r/s   kBps   ms/r    w/s   kBps   ms/w   %busy Name
    0    309    309  39553    1.1      0      0    0.0   33.0| ad4
    1    307    307  39306    2.0      0      0    0.0   62.8| ad6
    1    616    616  78859    1.6      0      0    0.0   96.9| mirror/gm0

>How-To-Repeat:
Setup gmirror on any harware components on any FreeBSD release
>Fix:

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: remko 
State-Changed-When: Mon Mar 26 15:30:41 UTC 2007 
State-Changed-Why:  
Duplicate of (dunno anymore, seen this ticket before. Please contact me 
if I am seeing double ;)) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=110846 

From: Maxim Konovalov <maxim@macomnet.ru>
To: Remko Lodder <remko@freebsd.org>
Cc: bug-followup@freebsd.org
Subject: Re: kern/110846: gmirror read speed is half of maximum
Date: Mon, 26 Mar 2007 21:51:35 +0400 (MSD)

 On Mon, 26 Mar 2007, 15:30-0000, Remko Lodder wrote:
 
 > Synopsis: gmirror read speed is half of maximum
 >
 > State-Changed-From-To: open->closed
 > State-Changed-By: remko
 > State-Changed-When: Mon Mar 26 15:30:41 UTC 2007
 > State-Changed-Why:
 > Duplicate of (dunno anymore, seen this ticket before. Please contact me
 > if I am seeing double ;))
 
 it was kern/110729, now it's bin/110729, dunno why.
 
 -- 
 Maxim Konovalov

From: Evren Yurtesen <yurtesen@ispro.net>
To: bug-followup@FreeBSD.org,  zuborg@advancedhosters.com
Cc:  
Subject: Re: kern/110846: gmirror read speed is half of maximum
Date: Fri, 13 Jul 2007 04:37:31 +0300

 I see the same problem on multiple servers. It seems like FreeBSD thinks 
 gm0 mirror device is 100% busy and reading from multiple drives doesnt 
 exceed 1 drive performance.
>Unformatted:
