Re: Script to compute random page cost - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Script to compute random page cost
Date
Msg-id 19140.1031666449@sss.pgh.pa.us
Whole thread Raw
In response to Re: Script to compute random page cost  (Curt Sampson <cjs@cynic.net>)
Responses Re: Script to compute random page cost  (Curt Sampson <cjs@cynic.net>)
List pgsql-hackers
Curt Sampson <cjs@cynic.net> writes:
> Well, for the sequential reads, the readahead should be trigerred
> even when reading from a raw device.

That strikes me as an unportable assumption.

Even if true, we can't provide a test mechanism that requires root
access to run it --- raw-device testing is out of the question just on
that basis, never mind that it is not measuring what we want to measure.

Perhaps it's time to remind people that what we want to measure
is the performance seen by a C program issuing write() and read()
commands, transferring 8K at a time, on a regular Unix filesystem.
A shell script invoking dd is by definition going to see a very
different performance ratio, even if what dd does under the hood
is 8K read() and write() (another not-well-supported assumption,
IMHO).  If you try to "improve" the results by using a raw device,
you're merely moving even further away from the scenario of interest.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: problem with new autocommit config parameter and jdbc
Next
From: Tom Lane
Date:
Subject: Re: Optimization levels when compiling PostgreSQL...