Re: Script to compute random page cost

Поиск
Список
Период
Сортировка
От Curt Sampson
Тема Re: Script to compute random page cost
Дата
Msg-id Pine.NEB.4.44.0209111044501.23252-100000@angelic.cynic.net
обсуждение исходный текст
Ответ на Re: Script to compute random page cost  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Tue, 10 Sep 2002, Tom Lane wrote:

> 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.

Not only unportable: but false. :-) NetBSD, at least, does read-ahead
only through the buffer cache. Thinking about it, you *can't* do
read-ahead on a raw device, because you're not buffering. Doh!

> 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.

Right. Which is what randread does, if you give it a file rather
than a raw device. I'm actually just now working on some modifications
for it that will let you work against a bunch of files, rather than
just one, so it will very accurately emulate a postgres random read
of blocks from a table.

There are two other tricky things related to the behaviour, however:

1. The buffer cache. You really need to be working against your
entire database, not just a few gigabytes of its data, or sample
data.

2. Multiple users. You really want a mix of simultaneous accesses
going on, with as many processes as you normally have users querying
the database.

These can probably both be taken care of with shell scripts, though.

cjs
-- 
Curt Sampson  <cjs@cynic.net>   +81 90 7737 2974   http://www.netbsd.org   Don't you know, in this new Dark Age, we're
alllight.  --XTC
 



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Curt Sampson
Дата:
Сообщение: Re: problem with new autocommit config parameter and jdbc
Следующее
От: Curt Sampson
Дата:
Сообщение: Re: [JDBC] problem with new autocommit config parameter