pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
To: Alexander Korotkov <aekorotkov@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: WIP: Fast GiST index build
Date: Thu, 16 Jun 2011 21:26:45 +0300
Message-ID: <4DFA4AE5.1010806@enterprisedb.com> (raw)
In-Reply-To: <BANLkTikP6RAYmUriquQEdKjEBviTH2vWRQ@mail.gmail.com>
References: <BANLkTikgOQ1+r=A9b08szNTeEWsk-cNMMg@mail.gmail.com>
	<4DEC84D7.7040602@enterprisedb.com>
	<4DECB141.2040707@enterprisedb.com>
	<BANLkTimDQewwaumOaDtFjSb+2edn-E_dNg@mail.gmail.com>
	<BANLkTimoH+8tsm6LG1jjFNY7xiFXHeNDDA@mail.gmail.com>
	<BANLkTinWE4DX41=eXnX+YWqFXZ_xJqOC8w@mail.gmail.com>
	<BANLkTinMB-GSjFDThc0o9hRWa+_dJJXPZg@mail.gmail.com>
	<4DF8676F.9040801@enterprisedb.com>
	<BANLkTimr___BFy+98t36tkbUvvavUzjV9A@mail.gmail.com>
	<BANLkTi=x0Ck1z_NbkqeqvuKXs9kHOR+5WQ@mail.gmail.com>
	<BANLkTikP6RAYmUriquQEdKjEBviTH2vWRQ@mail.gmail.com>

On 16.06.2011 21:13, Alexander Korotkov wrote:
> My current idea is to measure number of IO accesses by pg_stat_statements
> and measure CPU usage by /proc/PID/stat. Any thoughts?

Actually, you get both of those very easily with:

set log_statement_stats=on

LOG:  QUERY STATISTICS
DETAIL:  ! system usage stats:
	!	0.000990 elapsed 0.000000 user 0.000000 system sec
	!	[0.000000 user 0.008000 sys total]
	!	0/0 [32/0] filesystem blocks in/out
	!	0/0 [0/959] page faults/reclaims, 0 [0] swaps
	!	0 [0] signals rcvd, 0/0 [0/0] messages rcvd/sent
	!	0/0 [10/1] voluntary/involuntary context switches
STATEMENT:  SELECT generate_series(1,100);


-- 
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com



view thread (114+ messages)  latest in thread

Message-ID: <4DFA4AE5.1010806@enterprisedb.com>
Permalink:  ../4DFA4AE5.1010806@enterprisedb.com/
Also on:    postgresql.org/message-id/4DFA4AE5.1010806@enterprisedb.com

 · 

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-hackers@postgresql.org
  Cc: heikki.linnakangas@enterprisedb.com, aekorotkov@gmail.com
  Subject: Re: WIP: Fast GiST index build
  In-Reply-To: <4DFA4AE5.1010806@enterprisedb.com>

* 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