Обсуждение: building a performance test suite

Поиск
Список
Период
Сортировка

building a performance test suite

От
Kevin Kempter
Дата:
Hi List;

I'm preparing to create a test suite of very complex queries that can be
profiled in terms of load and performance. The ultimate goal is to define a
load/performance profile during a run of the old application code base and
then again with changes to the application code base.

I suspect I should look at grabbing these things for load:
# of queries running
# of IDLE  connections

and these things for performance
how long the queries run
difference between the runs for # of queries running

What do you'all think? are these valid metrics? should I be looking at others
like pg_statio or pg_stat_all_tables ? If so, what should I look for in these
(or other) tables?

Thanks in advance...

/Kevin

Re: building a performance test suite

От
Greg Smith
Дата:
On Wed, 10 Oct 2007, Kevin Kempter wrote:

> should I be looking at others like pg_statio or pg_stat_all_tables ? If
> so, what should I look for in these (or other) tables?

There are a good set of monitoring scripts for performance-oriented things
included with the dbt2 benchmarking package,
http://sourceforge.net/projects/osdldbt

You can just use the SVN browse to take a look at the data collected by
that; see /trunk/dbt2/bin/pgsql/dbt2-pgsql-db-stat.in for some good things
to get started with.  For example, here's the pg_statio info they save:

SELECT relid, relname, heap_blks_read, heap_blks_hit, idx_blks_read,
idx_blks_hit FROM pg_statio_user_tables ORDER BY relname;

SELECT relid, indexrelid, relname, indexrelname, idx_blks_read,
idx_blks_hit FROM pg_statio_user_indexes ORDER BY indexrelname;

Pretty much everything in pg_stat_user_tables is worth collecting.  And
you probably want to use the user oriented views rather than the all ones
(pg_stat_user_tables instead of pg_stat_all_tables) so you don't clutter
your results with what's going on in the system tables--unless your test
incudes lots of table modifications that is.  Look at both of them and
you'll see what I mean.

--
* Greg Smith gsmith@gregsmith.com http://www.gregsmith.com Baltimore, MD

Re: building a performance test suite

От
Dimitri Fontaine
Дата:
Hi,

Le jeudi 11 octobre 2007, Kevin Kempter a écrit :
> I'm preparing to create a test suite of very complex queries that can be
> profiled in terms of load and performance. The ultimate goal is to define a
> load/performance profile during a run of the old application code base and
> then again with changes to the application code base.

You may want to consider using pgfouine and Tsung, the former to create tsung
sessions from PostgreSQL logs and the latter to replay them simulating any
number of concurrent users.

Tsung can also operate as PostgreSQL proxy recorder, you point your
application to it, it forwards the queries and record a session file for you.

The replay process can mix several sessions and use several phases of
different load behaviours.

Then a little helper named tsung-plotter could be useful to draw several Tsung
results on the same charts for comparing.

Some links:
  http://pgfouine.projects.postgresql.org/tsung.html
  http://tsung.erlang-projects.org/
  http://debian.dalibo.org/sid/tsung-ploter_0.1-1_all.deb
  http://debian.dalibo.org/sid/tsung-ploter_0.1-1.tar.gz

Hope this helps, regards,
--
dim

Вложения