From owner-freebsd-stable@FreeBSD.ORG Thu Nov 28 20:47:20 2013 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4E14EB20 for ; Thu, 28 Nov 2013 20:47:20 +0000 (UTC) Received: from mail-bk0-x22b.google.com (mail-bk0-x22b.google.com [IPv6:2a00:1450:4008:c01::22b]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D540B13D5 for ; Thu, 28 Nov 2013 20:47:19 +0000 (UTC) Received: by mail-bk0-f43.google.com with SMTP id mz12so4024916bkb.30 for ; Thu, 28 Nov 2013 12:47:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=zlUld1rQItUKS+j9EO0w58gMWrSkiNmrUjK54OFKI8g=; b=exRoT7tz97kMIHh48M/M3cpdDPATeDIuHBALQkC4Xe+gu1SuP/wPTShIGgoqVpQDBl lGei7bOfNq0ayiICrHCNi+LJEg5iDHN9qLawyW4kBKTQwFAf5ivHnHFYt6SWpw2/xMB3 5QiemjV5RQD43nvnqEaY72IWFVJfm5fI3XjrDw1QcWCk5VenHTOaUeeyGSxAnQLGciaG erSHA0Nl/lff82eRorIhyc+TzPr8KIqceRxWNro44dCQJz/o7O0nPsYlXmvIsqXZeWxw JTQJpoq9X+e/Y3RKOFOsLW4ES1gdwquuk8ZbdDUv+YI1Pw3z4LkvUL8uCA57v3Ya7Dz+ 7dhQ== X-Received: by 10.205.10.200 with SMTP id pb8mr36019431bkb.16.1385671638251; Thu, 28 Nov 2013 12:47:18 -0800 (PST) Received: from [192.168.1.103] ([212.96.32.60]) by mx.google.com with ESMTPSA id pu8sm60973044bkb.9.2013.11.28.12.47.17 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 28 Nov 2013 12:47:17 -0800 (PST) Message-ID: <5297ABD5.5060504@gmail.com> Date: Thu, 28 Nov 2013 21:47:17 +0100 From: =?ISO-8859-1?Q?Szalai_Andr=E1s?= User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.1.1 MIME-Version: 1.0 To: freebsd-stable@freebsd.org Subject: gmirror: writes are faster than reads Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Nov 2013 20:47:20 -0000 Hi Guys, Has somebody encountered (significantly) different read/write speeds when using gmirror? I have 2xWD WD30EFRX RED drives which are configured as follows: $ gmirror status Name Status Components mirror/root COMPLETE ada0p2 (ACTIVE) ada1p2 (ACTIVE) mirror/data COMPLETE ada0p4 (ACTIVE) ada1p4 (ACTIVE) mirror/root is mounted as the root fs (UFS2). Doing write: $ time dd if=/dev/zero of=/IMAGE bs=1024k count=`expr 4 \* 1024` 4096+0 records in 4096+0 records out 4294967296 bytes transferred in 29.326044 secs (146455733 bytes/sec) Doing read: $ time dd if=/IMAGE of=/dev/null bs=1024k count=`expr 4 \* 1024` 4096+0 records in 4096+0 records out 4294967296 bytes transferred in 48.821649 secs (87972598 bytes/sec) As you can see, read is much slower than write (87 vs 146 MB/s). Why? Any help would be appreciated. Best regards, Andrew PS: Partition layout (partitions are 4k aligned): $ gpart show ada0 ada1 => 34 5860533101 ada0 GPT (2.7T) 34 6 - free - (3.0k) 40 1024 1 freebsd-boot (512k) 1064 16777216 2 freebsd-ufs (8.0G) 16778280 16777216 3 freebsd-swap (8.0G) 33555496 5826977632 4 freebsd-ufs (2.7T) 5860533128 7 - free - (3.5k) => 34 5860533101 ada1 GPT (2.7T) 34 6 - free - (3.0k) 40 1024 1 freebsd-boot (512k) 1064 16777216 2 freebsd-ufs (8.0G) 16778280 16777216 3 freebsd-swap (8.0G) 33555496 5826977632 4 freebsd-ufs (2.7T) 5860533128 7 - free - (3.5k)