Re: determining random_page_cost value

Поиск
Список
Период
Сортировка
От Yohanes Santoso
Тема Re: determining random_page_cost value
Дата
Msg-id 87d5ltcoz5.fsf@microjet.ath.cx
обсуждение исходный текст
Ответ на Re: determining random_page_cost value  (Josh Berkus <josh@agliodbs.com>)
Ответы Re: determining random_page_cost value  ("Jim C. Nasby" <jnasby@pervasive.com>)
Список pgsql-hackers
Josh Berkus <josh@agliodbs.com> writes:

>> I tested the db files residing on a software RAID-1 composed of 2 IDE
>> 7200rpm drives on linux 2.6.12.
>
> FWIW, most performance-conscious users will be using a SCSI RAID
> array.

No worry, I'm not out to squeeze every little juice from a particular
installation, which in this case is my home computer. I am interested
in automating estimation of a suitable RPC value for a given
installation.

> Well, it's actually calculating the cost ratio of pulling non-sequential 
> random *rows* from the db files against pulling sequential blocks.

Then running it against the db files should yield better estimation
than on sequential pages.

>> On dbases smaller (calculated from du <dbase_dir>)than 500M, I got a
>> ratio (random over sequential time) of 4.5:1. A 3.0GB dbase has a
>> ratio of 10:1. On a 3GB contiguous file, the ratio is about 4:1.
>
> All of this goes to uphold Tom's general assertion that the default of 4 is 
> more or less correct 

Doesn't this show that 4:1 is a pretty optimistic value considering
that no long-running db files are fragmentation-free?

>but the calculation in which we're using that number is 
> not.

The calculation inside the planner, IOW, how the planner uses the RPC
value?

Thanks,
YS.


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

Предыдущее
От: Robert Treat
Дата:
Сообщение: Re: expanded \df+ display broken in beta4
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: The use of (mb)print.c from psql in the scripts directory