Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id B0EA71EB4C50 for ; Sat, 10 Mar 2012 11:12:54 -0400 (AST) Received: from [2001:1528:137::f1] (helo=mail.gransy.com) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1S6NyW-0005MU-T3 for pgsql-performance@postgresql.org; Sat, 10 Mar 2012 15:12:54 +0000 Received: from antispam.gransy.com (antispam.gransy.com [77.78.104.124]) by mail.gransy.com (Postfix) with ESMTP id 6F38E4A2099 for ; Sat, 10 Mar 2012 16:12:39 +0100 (CET) Received: from mail.gransy.com ([82.208.29.194]) by antispam.gransy.com (antispam.gransy.com [77.78.104.124]) (amavisd-new, port 10024) with ESMTP id JO2COR5BcXmK for ; Sat, 10 Mar 2012 16:12:39 +0100 (CET) Received: by mail.gransy.com (Postfix, from userid 5000) id 5D4764A20DD; Sat, 10 Mar 2012 16:12:39 +0100 (CET) Received: from [192.168.1.237] (ip-78-45-133-255.net.upcbroadband.cz [78.45.133.255]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.gransy.com (Postfix) with ESMTPSA id 3CE8F4A2099 for ; Sat, 10 Mar 2012 16:12:39 +0100 (CET) Message-ID: <4F5B6F67.1040300@fuzzy.cz> Date: Sat, 10 Mar 2012 16:12:39 +0100 From: Tomas Vondra User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Re: Comments requested on IO performance : new db server References: <20120309111558.GA22643@campbell-lange.net> <20120310105112.GB9760@campbell-lange.net> In-Reply-To: <20120310105112.GB9760@campbell-lange.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 2001:1528:137::f1 (failed) X-Pg-Spam-Score: -1.1 (-) X-Archive-Number: 201203/87 X-Sequence-Number: 46537 On 10.3.2012 11:51, Rory Campbell-Lange wrote: > Is a block size of 4096 a good idea both for the filesystem and > postgresql? The analysis here: > http://www.fuzzy.cz/en/articles/benchmark-results-hdd-read-write-pgbench/ > appears to suggest that at least for database block sizes of 4096 > read/write performance is much higher than for smaller block sizes. Hi, interpreting those results is a bit tricky for several reasons. First, those are 'average results' for all filesystems (and the behavior of filesystems may vary significantly). I'd recommend checking results for the filesystem you're going to use (http://www.fuzzy.cz/bench) Second, the article discusses just TPC-B (OLTP-like) workload results. It's quite probable your workload is going to mix that with other workload types (e.g. DSS/DWH). And that's exactly where larger block sizes are better. To me, 8kB seems like a good compromise. Don't use other block sizes unless you actually test the benefits for your workload. Tomas > > Rory > > On 09/03/12, Rory Campbell-Lange (rory@campbell-lange.net) wrote: >> ...An ancillary question is whether a 4096 block size is a good idea. >> I suppose we will be using XFS which I understand has a default block >> size of 4096 bytes. >> >> RAID 10 >> -------------------------------------- >> Read sequential >> >> BS MB/s IOPs >> 512 0129.26 264730.80 >> 1024 0229.75 235273.40 >> 4096 0363.14 092965.50 >> 16384 0475.02 030401.50 >> 65536 0472.79 007564.65 >> 131072 0428.15 003425.20 >> -------------------------------------- >> Write sequential >> >> BS MB/s IOPs >> 512 0036.08 073908.00 >> 1024 0065.61 067192.60 >> 4096 0170.15 043560.40 >> 16384 0219.80 014067.57 >> 65536 0240.05 003840.91 >> 131072 0243.96 001951.74 >> -------------------------------------- >> Random read >> >> BS MB/s IOPs >> 512 0001.50 003077.20 >> 1024 0002.91 002981.40 >> 4096 0011.59 002968.30 >> 16384 0044.50 002848.28 >> 65536 0156.96 002511.41 >> 131072 0170.65 001365.25 >> -------------------------------------- >> Random write >> >> BS MB/s IOPs >> 512 0000.53 001103.60 >> 1024 0001.15 001179.20 >> 4096 0004.43 001135.30 >> 16384 0017.61 001127.56 >> 65536 0061.39 000982.39 >> 131072 0079.27 000634.16 >> --------------------------------------