Re: Estimating seq_page_fetch and random_page_fetch - Mailing list pgsql-hackers

From Luke Lonergan
Subject Re: Estimating seq_page_fetch and random_page_fetch
Date
Msg-id C3E62232E3BCF24CBA20D72BFDCB6BF802AF2881@MI8NYCMAIL08.Mi8.com
Whole thread Raw
In response to Estimating seq_page_fetch and random_page_fetch  ("Umar Farooq Minhas" <umarfm13@hotmail.com>)
List pgsql-hackers
<p><font size="2">Adding to this:<br /><br /> Ayush recently wrote a C program that emulates PG IO to do this analysis,
andwe came out with (predictably) a ratio of sequential/random of 20-50 (for a single user).  This is predictable
becausethe random component is fixed at the access time of a single hard drive no matter how many disks are in an
array,while the sequential scales nearly linearly with the number of drives in the array.<br /><br /> So, you can
estimaterandom using 8-12ms per random access, and sequential as 1/(number of disks X 60-130MB/s).<br /><br /> Ayush,
canyou forward your C program?<br /><br /> - Luke<br /><br /> Msg is shrt cuz m on ma treo<br /><br />  -----Original
Message-----<br/> From:   Gregory Stark [<a href="mailto:stark@enterprisedb.com">mailto:stark@enterprisedb.com</a>]<br
/>Sent:   Thursday, March 08, 2007 12:37 PM Eastern Standard Time<br /> To:     Tom Lane<br /> Cc:     Umar Farooq
Minhas;pgsql-hackers@postgresql.org<br /> Subject:        Re: [HACKERS] Estimating seq_page_fetch and
random_page_fetch<br/><br /><br /> "Tom Lane" <tgl@sss.pgh.pa.us> writes:<br /><br /> > "Umar Farooq Minhas"
<umarfm13@hotmail.com>writes:<br /> >> How can we accrately estimate the "seq_page_fetch" and =<br />
>>"random_page_fetch" costs from outside the postgres using for example a =<br /> >> C routine.<br />
><br/> > Use a test case larger than memory.  Repeat many times to average out<br /> > noise.  IIRC, when I
didthe experiments that led to the current<br /> > random_page_cost of 4.0, it took about a week before I had
numbersI<br /> > trusted.<br /><br /> When I was running tests I did it on a filesystem where nothing else was<br />
running.Between tests I unmounted and remounted it. As I understand it Linux<br /> associates the cache with the
filesystemand not the block device and discards<br /> all pages from cache when the filesystem is unmounted.<br /><br
/>That doesn't contradict anything Tom said, it might be useful as an additional<br /> tool though.<br /><br /> --<br
/>  Gregory Stark<br />   EnterpriseDB          <a
href="http://www.enterprisedb.com">http://www.enterprisedb.com</a><br/><br /> ---------------------------(end of
broadcast)---------------------------<br/> TIP 3: Have you checked our extensive FAQ?<br /><br />                <a
href="http://www.postgresql.org/docs/faq">http://www.postgresql.org/docs/faq</a><br/><br /></font> 

pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Stream bitmaps
Next
From: Doug Knight
Date:
Subject: Re: [PATCHES] pg_standby