pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: Balkrishna Sharma <b_ki@hotmail.com>
To: pgsql-admin@postgresql.org
Subject: Re: How to find if a SELECT is reading from buffer or disk ?
Date: Tue, 25 May 2010 12:59:16 -0500
Message-ID: <4BFBC9A40200002500031A64@gw.wicourts.gov> (raw)
In-Reply-To: <BAY149-w19CB46743B9D1EC9D68760F0E80@phx.gbl>
References: <BAY149-w19CB46743B9D1EC9D68760F0E80@phx.gbl>

Balkrishna Sharma <b_ki@hotmail.com> wrote:
 
> I am increasing the shared_buffer size in postgresql.conf and want
> to measure its effect on READ. In essence I want to know if the
> SELECT queries I am firing repeatedly is reading from the buffer
> or going directly to the disk.
 
There's a third option -- PostgreSQL reads and writes will normally
go through the OS cache.
 
> Right now I am just looking at execution time of the SELECTs and
> trying to conclude. But there should be a direct way to see where
> the SELECT reads from.
> How can I accomplish this ?
 
You didn't mention your OS.  There's usually a way to monitor disk
I/O built in to the OS.  I usually start with:
 
vmstat 1
 
-Kevin



view thread (6+ messages)  latest in thread

Message-ID: <4BFBC9A40200002500031A64@gw.wicourts.gov>
Permalink:  ../4BFBC9A40200002500031A64@gw.wicourts.gov/
Also on:    postgresql.org/message-id/4BFBC9A40200002500031A64@gw.wicourts.gov

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: Kevin.Grittner@wicourts.gov, b_ki@hotmail.com
  Subject: Re: How to find if a SELECT is reading from buffer or disk ?
  In-Reply-To: <4BFBC9A40200002500031A64@gw.wicourts.gov>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox