Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WFx4e-0006BE-CR for pgsql-performance@arkaria.postgresql.org; Wed, 19 Feb 2014 02:39:48 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WFx4d-00039g-MH for pgsql-performance@arkaria.postgresql.org; Wed, 19 Feb 2014 02:39:47 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WFx4c-00039Z-Hh for pgsql-performance@postgresql.org; Wed, 19 Feb 2014 02:39:46 +0000 Received: from tama50.ecl.ntt.co.jp ([129.60.39.147]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WFx4X-0001TL-Vr for pgsql-performance@postgresql.org; Wed, 19 Feb 2014 02:39:45 +0000 Received: from mfs6.rdh.ecl.ntt.co.jp (mfs6.rdh.ecl.ntt.co.jp [129.60.39.149]) by tama50.ecl.ntt.co.jp (8.13.8/8.13.8) with ESMTP id s1J2dIhs023755; Wed, 19 Feb 2014 11:39:18 +0900 Received: from mfs6.rdh.ecl.ntt.co.jp (localhost.localdomain [127.0.0.1]) by mfs6.rdh.ecl.ntt.co.jp (Postfix) with ESMTP id 5C9A8E0166; Wed, 19 Feb 2014 11:39:18 +0900 (JST) Received: from imail3.m.ecl.ntt.co.jp (imail3.m.ecl.ntt.co.jp [129.60.5.248]) by mfs6.rdh.ecl.ntt.co.jp (Postfix) with ESMTP id 51161E0164; Wed, 19 Feb 2014 11:39:18 +0900 (JST) Received: from [129.60.241.67] ([129.60.241.67]) by imail3.m.ecl.ntt.co.jp (8.13.8/8.13.8) with ESMTP id s1J2dIXD000413; Wed, 19 Feb 2014 11:39:18 +0900 Message-ID: <53041ACC.9010208@lab.ntt.co.jp> Date: Wed, 19 Feb 2014 11:45:32 +0900 From: KONDO Mitsumasa User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: Tomas Vondra CC: DFE , =?UTF-8?B?TmllbHMgS3Jpc3RpYW4gU2NoasO4?= =?UTF-8?B?ZHQ=?= , "pgsql-performance@postgresql.org list" Subject: Re: Optimal settings for RAID controller - optimized for writes References: <5302B5FD.10204@lab.ntt.co.jp> <5303C573.8@fuzzy.cz> In-Reply-To: <5303C573.8@fuzzy.cz> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-TM-AS-MML: No X-Pg-Spam-Score: -2.5 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org (2014/02/19 5:41), Tomas Vondra wrote: > On 18.2.2014 02:23, KONDO Mitsumasa wrote: >> Hi, >> >> I don't have PERC H710 raid controller, but I think he would like to >> know raid striping/chunk size or read/write cache ratio in >> writeback-cache setting is the best. I'd like to know it, too:) > > The stripe size is actually a very good question. On spinning drives it > usually does not matter too much - unless you have a very specialized > workload, the 'medium size' is the right choice (AFAIK we're using 64kB > on H710, which is the default). I am interested that raid stripe size of PERC H710 is 64kB. In HP raid card, default chunk size is 256kB. If we use two disks with raid 0, stripe size will be 512kB. I think that it might too big, but it might be optimized in raid card... In actually, it isn't bad in that settings. I'm interested in raid card internal behavior. Fortunately, linux raid card driver is open souce, so we might good at looking the source code when we have time. > With SSDs this might actually matter much more, as the SSDs work with > "erase blocks" (mostly 512kB), and I suspect using small stripe might > result in repeated writes to the same block - overwriting one block > repeatedly and thus increased wearout. But maybe the controller will > handle that just fine, e.g. by coalescing the writes and sending them to > the drive as a single write. Or maybe the drive can do that in local > write cache (all SSDs have that). I have heard that genuine raid card with genuine ssds are optimized in these ssds. It is important that using compatible with ssd for performance. If the worst case, life time of ssd is be short, and will be bad performance. > But those are mostly speculations / curious questions I've been asking > myself recently, as we've been considering SSDs with H710/H710p too. > > As for the controller cache - my opinion is that using this for caching > writes is just plain wrong. If you need to cache reads, buy more RAM - > it's much cheaper, so you can buy more of it. Cache on controller (with > a BBU) is designed especially for caching writes safely. (And maybe it > could help with some of the erase-block issues too?) I'm wondering about effective of readahead in OS and raid card. In general, readahead data by raid card is stored in raid cache, and not stored in OS caches. Readahead data by OS is stored in OS cache. I'd like to use all raid cache for only write cache, because fsync() becomes faster. But then, it cannot use readahead very much by raid card.. If we hope to use more effectively, we have to clear it, but it seems difficult:( Regards, -- Mitsumasa KONDO NTT Open Source Software Center -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance