Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id D47ED6327EE for ; Tue, 25 May 2010 15:01:31 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 25934-06 for ; Tue, 25 May 2010 18:01:23 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from bay0-omc2-s19.bay0.hotmail.com (bay0-omc2-s19.bay0.hotmail.com [65.54.190.94]) by mail.postgresql.org (Postfix) with ESMTP id 2E052632514 for ; Tue, 25 May 2010 15:01:24 -0300 (ADT) Received: from BAY149-W37 ([65.54.190.125]) by bay0-omc2-s19.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675); Tue, 25 May 2010 11:01:22 -0700 Message-ID: Content-Type: multipart/alternative; boundary="_507e9662-eba1-450b-90a0-6714a9919032_" X-Originating-IP: [129.44.63.215] From: Balkrishna Sharma To: , Subject: Re: How to find if a SELECT is reading from buffer or disk ? Date: Tue, 25 May 2010 14:01:22 -0400 Importance: Normal In-Reply-To: <4BFBC9A40200002500031A64@gw.wicourts.gov> References: , <4BFBC9A40200002500031A64@gw.wicourts.gov> MIME-Version: 1.0 X-OriginalArrivalTime: 25 May 2010 18:01:22.0818 (UTC) FILETIME=[49165620:01CAFC34] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.909 tagged_above=-10 required=5 tests=BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201005/236 X-Sequence-Number: 34709 --_507e9662-eba1-450b-90a0-6714a9919032_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I am on Fedora 12 (x86_64). Will eventually be on RHE. > Date: Tue=2C 25 May 2010 12:59:16 -0500 > From: Kevin.Grittner@wicourts.gov > To: b_ki@hotmail.com=3B pgsql-admin@postgresql.org > Subject: Re: [ADMIN] How to find if a SELECT is reading from buffer or d= isk ? >=20 > Balkrishna Sharma wrote: > =20 > > 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. > =20 > There's a third option -- PostgreSQL reads and writes will normally > go through the OS cache. > =20 > > 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 ? > =20 > 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: > =20 > vmstat 1 > =20 > -Kevin >=20 > --=20 > Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-admin =20 _________________________________________________________________ The New Busy think 9 to 5 is a cute idea. Combine multiple calendars with H= otmail.=20 http://www.windowslive.com/campaign/thenewbusy?tile=3Dmulticalendar&ocid=3D= PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_5= --_507e9662-eba1-450b-90a0-6714a9919032_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I am on Fedora 12 (x86_64). Will eventually be on RHE.

>=3B Date: = Tue=2C 25 May 2010 12:59:16 -0500
>=3B From: Kevin.Grittner@wicourts.g= ov
>=3B To: b_ki@hotmail.com=3B pgsql-admin@postgresql.org
>=3B S= ubject: Re: [ADMIN] How to find if a SELECT is reading from buffer or disk= ?
>=3B
>=3B Balkrishna Sharma <=3Bb_ki@hotmail.com>=3B wrot= e:
>=3B
>=3B >=3B I am increasing the shared_buffer size in p= ostgresql.conf and want
>=3B >=3B to measure its effect on READ. In = essence I want to know if the
>=3B >=3B SELECT queries I am firing r= epeatedly is reading from the buffer
>=3B >=3B or going directly to = the disk.
>=3B
>=3B There's a third option -- PostgreSQL reads = and writes will normally
>=3B go through the OS cache.
>=3B
= >=3B >=3B Right now I am just looking at execution time of the SELECTs = and
>=3B >=3B trying to conclude. But there should be a direct way t= o see where
>=3B >=3B the SELECT reads from.
>=3B >=3B How ca= n I accomplish this ?
>=3B
>=3B You didn't mention your OS. Th= ere's usually a way to monitor disk
>=3B I/O built in to the OS. I us= ually start with:
>=3B
>=3B vmstat 1
>=3B
>=3B -Kev= in
>=3B
>=3B --
>=3B Sent via pgsql-admin mailing list (pg= sql-admin@postgresql.org)
>=3B To make changes to your subscription:>=3B http://www.postgresql.org/mailpref/pgsql-admin


The New Busy think 9 to 5 is a cute idea. Combine multiple calendar= s with Hotmail. Get busy. = --_507e9662-eba1-450b-90a0-6714a9919032_--