Re: Performance Tuning and Disk Cache

От: Rangarajan Vasudevan
Тема: Re: Performance Tuning and Disk Cache
Дата: ,
Msg-id: 53280.75.37.29.21.1174242150.squirrel@webmail.asterdata.net
(см: обсуждение, исходный текст)
Ответ на: Re: Performance Tuning and Disk Cache  (David Boreham)
Список: pgsql-performance

Скрыть дерево обсуждения

Performance Tuning and Disk Cache  (Barry Moore, )
 Re: Performance Tuning and Disk Cache  ("hubert depesz lubaczewski", )
 Re: Performance Tuning and Disk Cache  (David Boreham, )
  Re: Performance Tuning and Disk Cache  ("Rangarajan Vasudevan", )
 Re: Performance Tuning and Disk Cache  (Michael Stone, )

If you are running on a Linux kernel, try /proc/sys/vm/drop_caches. I
believe the appropriate command is "echo 3 > /proc/sys/vm/drop_caches".
Since Postgres has its own cache of data, the above followed by a PG
restart should do what you are looking for.

Ranga


> Barry Moore wrote:
>
>> I have a very slow query that I'm trying to tune.  I think my
>> performance tuning is being complicated by the system's page cache.
>>
>> If a run the query after the system has been busy with other tasks
>> for quite a long time then the query can take up to 8-10 minutes to
>> complete.  If I then rerun the same query it will complete in a
>> couple of seconds.
>>
>> Does anyone know how I can repeatedly run the same query in the
>> "worst case scenario" of no postgres data in the disk cache (e.g.,
>> clear the page cache or force it to be ignored)?
>
> In my experience the only 100% reliable way to do this is to reboot the
> machine.
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
>                http://www.postgresql.org/docs/faq
>




В списке pgsql-performance по дате сообщения:

От: Michael Stone
Дата:
Сообщение: Re: Performance Tuning and Disk Cache
От: Tom Lane
Дата:
Сообщение: Re: function call vs staright query