Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 72A356338A4 for ; Mon, 27 Apr 2009 00:45:18 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 40113-08 for ; Mon, 27 Apr 2009 00:44:53 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.29]) by mail.postgresql.org (Postfix) with ESMTP id 37CF9632AE5 for ; Mon, 27 Apr 2009 00:44:52 -0300 (ADT) Received: by yw-out-2324.google.com with SMTP id 3so1481877ywj.73 for ; Sun, 26 Apr 2009 20:44:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=7/8Kde+hkBCtfo0iLnAlrZIrC3gXJ3pAGg0/aoktFs8=; b=Dqlo3j0pRfYi04pPTqLYy8XLXfNYEAy2BjI1FMFzP71f4SyqW5Q5h2YRbcBu7U11S6 ZuHn8LC0fg4dtBMYZyudKT4iqepG+Orb3AkUWKCUCR0wjFWnjs6HxUyEIMgEVG1i0kq+ WuoGyIYcFYJvTKGkyuSse4z70LZgc1P1vrmks= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=cAYFEE62NOQpurwAOBNM/BoI2RIg1muEJ3FoLJJukBA3vid76L2+CbLWNBdgtdNQyL eJsWVq2YJzDOB+aY+EAsEIOMt1hJbGD4IOqyVVPgIwr3K/sEBiAZ68pFq7GnY8Td8G3p gAR/ZRhZs3BrSTxvj6KnXbZR0B1Dnx+YUWAwg= MIME-Version: 1.0 Received: by 10.100.6.13 with SMTP id 13mr7864264anf.98.1240803891675; Sun, 26 Apr 2009 20:44:51 -0700 (PDT) In-Reply-To: References: <70c01d1d0904111144m50c569bbh7dc32f2bce36195e@mail.gmail.com> Date: Sun, 26 Apr 2009 20:44:51 -0700 Message-ID: <70c01d1d0904262044x20b1d282sfbb16b250d26e722@mail.gmail.com> Subject: Re: Using IOZone to simulate DB access patterns From: Mark Wong To: Scott Carey Cc: Greg Smith , Josh Berkus , henk de wit , "jesper@krogh.cc" , "pgsql-performance@postgresql.org" , Selena Deckelmann , Gabrielle Roth Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=NORMAL_HTTP_TO_IP=0.001 X-Spam-Level: X-Archive-Number: 200904/380 X-Sequence-Number: 33747 On Sat, Apr 11, 2009 at 7:00 PM, Scott Carey wrot= e: > > > On 4/11/09 11:44 AM, "Mark Wong" wrote: > >> On Fri, Apr 10, 2009 at 11:01 AM, Greg Smith wrot= e: >>> On Fri, 10 Apr 2009, Scott Carey wrote: >>> >>>> FIO with profiles such as the below samples are easy to set up >>> >>> There are some more sample FIO profiles with results from various >>> filesystems at >>> http://wiki.postgresql.org/wiki/HP_ProLiant_DL380_G5_Tuning_Guide >> >> There's a couple of potential flaws I'm trying to characterize this >> weekend. =A0I'm having second thoughts about how I did the sequential >> read and write profiles. =A0Using multiple processes doesn't let it >> really do sequential i/o. =A0I've done one comparison so far resulting >> in about 50% more throughput using just one process to do sequential >> writes. =A0I just want to make sure there shouldn't be any concern for >> being processor bound on one core. > > FWIW, my raid array will do 1200MB/sec, and no tool I've used can saturat= e > it without at least two processes. =A0'dd' and fio can get close (1050MB/= sec), > if the block size is <=3D ~32k <=3D64k. =A0With a postgres sized 8k block= 'dd' > can't top 900MB/sec or so. FIO can saturate it only with two+ readers. > > I optimized my configuration for 4 concurrent sequential readers with 4 > concurrent random readers, and this helped the overall real world > performance a lot. =A0I would argue that on any system with concurrent > queries, concurrency of all types is important to measure. =A0Postgres is= n't > going to hold up one sequential scan to wait for another. =A0Postgres on = a > 3.16Ghz CPU is CPU bound on a sequential scan at between 250MB/sec and > 800MB/sec on the type of tables/queries I have. =A0Concurrent sequential > performance was affected by: > Xfs -- the gain over ext3 was large > Readahead tuning -- about 2MB per spindle was optimal (20MB for me, sw ra= id > 0 on 2x[10 drive hw raid 10]). > Deadline scheduler (big difference with concurrent sequential + random > mixed). > > One reason your tests write so much faster than they read was the linux > readahead value not being tuned as you later observed. =A0This helps ext3= a > lot, and xfs enough so that fio single threaded was faster than 'dd' to t= he > raw device. > >> >> The other flaw is having a minimum run time. =A0The max of 1 hour seems >> to be good to establishing steady system utilization, but letting some >> tests finish in less than 15 minutes doesn't provide "good" data. >> "Good" meaning looking at the time series of data and feeling >> confident it's a reliable result. =A0I think I'm describing that >> correctly... > > It really depends on the specific test though. =A0You can usually get ran= dom > iops numbers that are realistic in a fairly short time, and 1 minute long > tests for me vary by about 3% (which can be +-35MB/sec in my case). > > I ran my tests on a partition that was only 20% the size of the whole > volume, and at the front of it. =A0Sequential transfer varies by a factor= of 2 > across a SATA disk from start to end, so if you want to compare file syst= ems > fairly on sequential transfer rate you have to limit the partition to an > area with relatively constant STR or else one file system might win just > because it placed your file earlier on the drive. That's probably what is going with the 1 disk test: http://207.173.203.223/~markwkm/community10/fio/linux-2.6.28-gentoo/1-disk-= raid0/ext2/seq-read/io-charts/iostat-rMB.s.png versus the 4 disk test: http://207.173.203.223/~markwkm/community10/fio/linux-2.6.28-gentoo/4-disk-= raid0/ext2/seq-read/io-charts/iostat-rMB.s.png These are the throughput numbs but the iops are in the same directory. Regards, Mark