From owner-freebsd-fs@FreeBSD.ORG Wed Mar 16 12:01:12 2011 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D81221065676 for ; Wed, 16 Mar 2011 12:01:12 +0000 (UTC) (envelope-from freebsd-fs@m.gmane.org) Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by mx1.freebsd.org (Postfix) with ESMTP id 91A7F8FC08 for ; Wed, 16 Mar 2011 12:01:12 +0000 (UTC) Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PzpPW-0004AF-1x for freebsd-fs@freebsd.org; Wed, 16 Mar 2011 13:01:06 +0100 Received: from lara.cc.fer.hr ([161.53.72.113]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 16 Mar 2011 13:01:06 +0100 Received: from ivoras by lara.cc.fer.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 16 Mar 2011 13:01:06 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-fs@freebsd.org From: Ivan Voras Date: Wed, 16 Mar 2011 13:00:52 +0100 Lines: 33 Message-ID: References: <4D7F7E33.7050103@yellowspace.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: lara.cc.fer.hr User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.12) Gecko/20101102 Thunderbird/3.1.6 In-Reply-To: <4D7F7E33.7050103@yellowspace.net> X-Enigmail-Version: 1.1.2 Subject: Re: gmirror performance X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Mar 2011 12:01:12 -0000 On 15/03/2011 15:56, Lorenzo Perone wrote: > > Hi @ list, Hi Pawel, > > just a question about gmirror performance. I have 2 15k SAS drives, > mirrored by gmirror. the mirror was setup like this (like manpage example): > > gmirror label -v -b split -s 2048 mirr0 da0 da1 > > on a partition of this drive, I make the following test: > > # dd if=/dev/zero bs=1m count=2000 of=/mnt/2gigfile.dat > 2000+0 records in > 2000+0 records out > 2097152000 bytes transferred in 11.203763 secs (187182824 bytes/sec) > > # umount /mnt > # mount /dev/mirror/mirr0p4 /mnt > > # dd if=/mnt/2gigfile.dat of=/dev/null bs=1m > 2000+0 records in > 2000+0 records out > 2097152000 bytes transferred in 12.061197 secs (173875942 bytes/sec) > > I'd expect read performance to be noticeably higher than write > performance. Why is it not the case? Wrong expectation? :/ Maybe. You can't expect that RAID-1 will have as good performance as RAID-0 but you might achieve better performance for sequential reads with long buffers. Try setting the vfs.read_max sysctl to 128 and see if it helps you. (you might want to leave the gmirror algorithm to the default "load" and increase the stripe size to something sane, like 16k).