From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id EE454138E66 for ; Mon, 24 Feb 2014 07:24:27 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0B0FCE0BA0; Mon, 24 Feb 2014 07:24:23 +0000 (UTC) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id F0C0CE0B96 for ; Mon, 24 Feb 2014 07:24:21 +0000 (UTC) Received: from compute4.internal (compute4.nyi.mail.srv.osa [10.202.2.44]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id 3A8DA20AA6 for ; Mon, 24 Feb 2014 02:24:20 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute4.internal (MEProxy); Mon, 24 Feb 2014 02:24:21 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.co.uk; h= message-id:date:from:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; s=mesmtp; bh=4fuiNBY/gDzAsZKGckfct4ZtwWI=; b=QWEarIhOXlvfVHB6jDvsAFZj5Rpj gV/EG1oH0JG/D2EH0iqK28Zi3r5DrGgS/O4IYJy7HoZLD2WzGGefuNyz3G9CQ7VJ NGuXqNPGAz0ThGmHcFPH/DAe6rRUvc3vvgOny9kADU6vCInc8v5jrnvGAxP/cCNk OenAXRMKopmplAk= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=message-id:date:from:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; s=smtpout; bh=4fuiNBY/gDzAsZKGckfct4 ZtwWI=; b=DnhIIC7rPpIOFPm3lftKL5NM9sQw9iwOjktLHkuIG7l1M+yuTeWx4y c1BEZK/zFzrMCpjMPubWF7XSVfs9QEdl2LYSDWB8QmX4eLqxNDSqWhqaB6h+GewO 1fGjdagznxINcafXTCMiUfAys8tIYvBNHylSnuPG9frSvPiJGvZAY= X-Sasl-enc: UzKJEbmfg9R7ssQNDRZcL1ZffKm367kG7S6u7n49sLGc 1393226660 Received: from [192.168.1.100] (unknown [77.101.146.254]) by mail.messagingengine.com (Postfix) with ESMTPA id 8351CC0000C for ; Mon, 24 Feb 2014 02:24:20 -0500 (EST) Message-ID: <530AF39F.2080101@fastmail.co.uk> Date: Mon, 24 Feb 2014 07:24:15 +0000 From: Kerin Millar User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] RAID 1 vs RAID 0 - Read perfonmance References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Archives-Salt: 15e4626f-736c-4626-a6a7-b348a252306c X-Archives-Hash: 0141f97f5941a55ed19edd7d03037807 On 24/02/2014 06:27, Facundo Curti wrote: > Hi. I am again, with a similar question to previous. > > I want to install RAID on SSD's. > > Comparing THEORETICALLY, RAID0 (stripe) vs RAID1 (mirrior). The > performance would be something like this: > > n= number of disks > > reads: > raid1: n*2 > raid0: n*2 > > writes: > raid1: n > raid0: n*2 > > But, in real life, the reads from raid 0 doesn't work at all, because if > you use "chunk size" from 4k, and you need to read just 2kb (most binary > files, txt files, etc..). the read speed should be just of n. While the workload does matter, that's not really how it works. Be aware that Linux implements read-ahead (defaulting to 128K):- # blockdev --getra /dev/sda 256 That's enough to populate 32 pages in pagecache, given that PAGESIZE is 4K on i386/am64. > > On the other side, I read over the net, that kernel don't support > multithread reads on raid1. So, the read speed will be just n. Always. > ¿It is true? No, it is not true. Read balancing is implemented in RAID-1. > > Anyway, my question is. ¿Who have the best read speed for the day to > day? I'm not asking about reads off large files. I'm just asking in the > "normal" use. Opening firefox, X, regular files, etc.. For casual usage, it shouldn't make any difference. > > I can't find the guide definitive. It allways are talking about > theoretically performance, or about "real life" but without benchmarks > or reliable data. > > Having a RAID0 with SSD, and following [2] on "SSD Stripe Optimization" > should I have the same speed as an RAID1? I would highly recommend conducting your own benchmarks. I find sysbench to be particularly useful. > > My question is because i'm between. 4 disks raid1, or RAID10 (I want > redundancy anyway..). And as "raid 10" = 1+ 0. I need to know raid0 > performance to take a choice... I don't need write speed, just read. In Linux, RAID-10 is not really nested because the mirroring and striping is fully integrated. If you want the best read performance with RAID-10 then the "far" layout is supposed to be the best [1]. Here is an example of how to choose this layout: # mdadm -C /dev/md0 -n 4 -l 10 -p f2 /dev/sda /dev/sdb /dev/sdc /dev/sdd Note, however, that the far layout will exhibit worse performance than the "near" layout if the array is in a degraded state. Also, it increases seek time in random/mixed workloads but this should not matter if you are using SSDs. --Kerin [1] http://neil.brown.name/blog/20040827225440