From: | Scott Carey <scott(at)richrelevance(dot)com> |
---|---|
To: | Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>, waldomiro *EXTERN* <waldomiro(at)shx(dot)com(dot)br>, "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org> |
Subject: | Re: There is a statistic table? |
Date: | 2009-10-21 17:17:47 |
Message-ID: | C704904B.14BDB%scott@richrelevance.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
On 10/15/09 11:27 PM, "Albe Laurenz" <laurenz(dot)albe(at)wien(dot)gv(dot)at> wrote:
> waldomiro wrote:
>> I need to know how much the postgres is going to disk to get
>> blocks and how much it is going to cache? witch is the
>> statistic table and what is the field that indicates blocks
>> reads from the disk and the memory cache?
>
> The view pg_statio_all_tables will show you the number of
> disk reads and buffer hits per table.
My understanding is that it will not show that. Since postgres can't
distinguish between a read that comes from OS cache and one that goes to
disk, you're out of luck on knowing anything exact.
The above shows what comes from shared_buffers versus the OS, however. And
if reads are all buffered, they are not coming from disk. Only those that
come from the OS _may_ have come from disk.
>
> There are other statistics views, see
> http://www.postgresql.org/docs/8.4/static/monitoring-stats.html#MONITORING-STA
> TS-VIEWS
>
>> Another question is, what is the best memory configuration to
>> keep more data in cache?
>
> That's easy - the greater shared_buffers is, the more cache you have.
>
> Another option is to choose shared_buffers not too large and let
> the filesystem cache buffer the database for you.
>
> Yours,
> Laurenz Albe
>
> --
> Sent via pgsql-performance mailing list (pgsql-performance(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-performance
>
From | Date | Subject | |
---|---|---|---|
Next Message | William Blunn | 2009-10-21 17:26:16 | Are unreferenced TOASTed values retrieved? |
Previous Message | Tom Lane | 2009-10-21 15:13:57 | Re: Random penalties on GIN index updates? |