From nobody@FreeBSD.org  Tue Jan  5 21:45:44 2010
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id BCC6B106566B
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  5 Jan 2010 21:45:44 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id ABC7C8FC0A
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  5 Jan 2010 21:45:44 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o05Ljihq077778
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 5 Jan 2010 21:45:44 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id o05Lji35077777;
	Tue, 5 Jan 2010 21:45:44 GMT
	(envelope-from nobody)
Message-Id: <201001052145.o05Lji35077777@www.freebsd.org>
Date: Tue, 5 Jan 2010 21:45:44 GMT
From: Marko <marko.krajnc@cursor.si>
To: freebsd-gnats-submit@FreeBSD.org
Subject: FreeBSD RAID1 (gmirror) is much slower than Linux RAID1!
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         142365
>Category:       kern
>Synopsis:       [geom] FreeBSD RAID1 (gmirror) is much slower than Linux RAID1!
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-geom
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jan 05 21:50:02 UTC 2010
>Closed-Date:    Fri Nov 26 10:28:17 UTC 2010
>Last-Modified:  Fri Nov 26 10:28:17 UTC 2010
>Originator:     Marko
>Release:        7.1
>Organization:
www.cursor.si
>Environment:
32bit and 64 bit
>Description:
I run many servers with double hard-disk for lowering the risk of data loss. I normally use software RAID1 on these systems (RAID1 is giving me very simple situation if one disk fails, software RAID1 is making my hardware cheaper).

After doing extensive performance testing in FreeBSD 7.1 I found out, that FreeBSD is much faster in arithmetic calculations than Linux. But when I tried to store data in the database (PostgreSQL) I was very dissapointed. The same hardware configuration is by factor 2 or 3 times slower than Linux, because of very slow gmirror.

Gmirror is even slower than disk access without RAID at all... (although 2 disks are available and therefore reads should be 2x faster).

I compared Scientific Linux 5.4 (based on Red Hat Enterprise 5.4) with FreeBSD 7.1.

I googled much on this topic, but there is no solution. One issue-ticked on this topic got very low priority. I had to decide to use Linux instead, because it was much faster for my servers.

Please make GMIRROR faster in the next releases.
>How-To-Repeat:
1) Install GMIRROR on FreeBSD according to the User Manual.
2) Do performance measurements (disk access).
3) Then install CentOS 5.4 or Scientific Linux 5.4 and make software RAID1 within the installation wizard.
4) Do performance measurements (disk access).
5) Compare performance measurements.

>Fix:
not known (at least for software RAID1)

>Release-Note:
>Audit-Trail:

From: Andrew Thompson <thompsa@FreeBSD.org>
To: Gnats <bug-followup@FreeBSD.org>
Cc:  
Subject: Re: misc/142365: FreeBSD RAID1 (gmirror) is much slower than Linux
	RAID1!
Date: Wed, 6 Jan 2010 11:08:41 +1300

 Hi,
 
 
 You may want to look at this change that will be in 7.3,
 http://svn.freebsd.org/viewvc/base?view=revision&revision=200286
 
 It should be easy to apply the changes to g_mirror.c and g_mirror.h in
 your 7.1 system and recompile.
 
 
 Andrew
Responsible-Changed-From-To: freebsd-bugs->freebsd-geom 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Tue Jan 5 23:51:53 UTC 2010 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=142365 
State-Changed-From-To: open->feedback 
State-Changed-By: delphij 
State-Changed-When: Wed Jan 6 00:01:54 UTC 2010 
State-Changed-Why:  
Dear submitter, 

There is an important performance improvement available in 
a newer -STABLE snapshot.  If you don't want to build a 
kernel yourself, you may try the snapshot build which 
can be found at: 

http://www.freebsd.org/snapshots/ 

(The 200912 build for 7.x and 8.x and 9.x included the 
enhancement) 

Please, let us know if that would help with your configuration. 
Note that for existing installation you will need to set the 
load balancing algorithm to 'load' on the gmirror device by 
doing something like: 

gmirror configure -b load gm0 

Before doing another set of benchmark. 

Thanks in advance! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=142365 
State-Changed-From-To: feedback->closed 
State-Changed-By: jh 
State-Changed-When: Fri Nov 26 10:28:17 UTC 2010 
State-Changed-Why:  
Feedback timeout. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=142365 
>Unformatted:
