Re: Estimating seq_page_fetch and random_page_fetch

From: "Luke Lonergan" <LLonergan(at)greenplum(dot)com>
To: "Gregory Stark" <stark(at)enterprisedb(dot)com>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Ayush Parashar" <aparashar(at)greenplum(dot)com>
Cc: "Umar Farooq Minhas" <umarfm13(at)hotmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Estimating seq_page_fetch and random_page_fetch
Date: 2007-03-08 19:16:51
Message-ID: C3E62232E3BCF24CBA20D72BFDCB6BF802AF2881@MI8NYCMAIL08.Mi8.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Adding to this:

Ayush recently wrote a C program that emulates PG IO to do this analysis, and we came out with (predictably) a ratio of sequential/random of 20-50 (for a single user). This is predictable because the 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.

So, you can estimate random using 8-12ms per random access, and sequential as 1/(number of disks X 60-130MB/s).

Ayush, can you forward your C program?

- Luke

Msg is shrt cuz m on ma treo

-----Original Message-----
From: Gregory Stark [mailto:stark(at)enterprisedb(dot)com]
Sent: Thursday, March 08, 2007 12:37 PM Eastern Standard Time
To: Tom Lane
Cc: Umar Farooq Minhas; pgsql-hackers(at)postgresql(dot)org
Subject: Re: [HACKERS] Estimating seq_page_fetch and random_page_fetch

"Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:

> "Umar Farooq Minhas" <umarfm13(at)hotmail(dot)com> writes:
>> How can we accrately estimate the "seq_page_fetch" and =
>> "random_page_fetch" costs from outside the postgres using for example a =
>> C routine.
>
> Use a test case larger than memory. Repeat many times to average out
> noise. IIRC, when I did the experiments that led to the current
> random_page_cost of 4.0, it took about a week before I had numbers I
> trusted.

When I was running tests I did it on a filesystem where nothing else was
running. Between tests I unmounted and remounted it. As I understand it Linux
associates the cache with the filesystem and not the block device and discards
all pages from cache when the filesystem is unmounted.

That doesn't contradict anything Tom said, it might be useful as an additional
tool though.

--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Doug Knight 2007-03-08 19:33:46 Re: [PATCHES] pg_standby
Previous Message Heikki Linnakangas 2007-03-08 19:16:36 Re: Stream bitmaps