Re: Actual Cost

From: Justin Pryzby <pryzby(at)telsasoft(dot)com>
To: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
Cc: Donald Dong <xdong(at)csumb(dot)edu>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, David Fetter <david(at)fetter(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Actual Cost
Date: 2019-02-17 21:48:00
Message-ID: 20190217214759.GD28750@telsasoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Feb 17, 2019 at 11:29:56AM -0500, Jeff Janes wrote:
> What would I find very useful is [...] an rusage report rather than just
> wall-clock duration.

Most of that's available;

[pryzbyj(at)database ~]$ psql postgres -xtc "SET client_min_messages=log; SET log_statement_stats=on" -c 'SELECT max(i) FROM generate_series(1,999999)i'
SET
LOG: statement: SELECT max(i) FROM generate_series(1,999999)i
LOG: QUERY STATISTICS
DETAIL: ! system usage stats:
! 0.186643 s user, 0.033622 s system, 0.220780 s elapsed
! [0.187823 s user, 0.037162 s system total]
! 61580 kB max resident size
! 0/0 [0/0] filesystem blocks in/out
! 0/7918 [0/9042] page faults/reclaims, 0 [0] swaps
! 0 [0] signals rcvd, 0/0 [0/0] messages rcvd/sent
! 0/3 [2/3] voluntary/involuntary context switches
max | 999999

See also
https://commitfest.postgresql.org/20/1691/ => 88bdbd3f746049834ae3cc972e6e650586ec3c9d
https://www.postgresql.org/message-id/flat/7ffb9dbe-c76f-8ca3-12ee-7914ede872e6%40stormcloud9.net
https://www.postgresql.org/docs/current/runtime-config-statistics.html#RUNTIME-CONFIG-STATISTICS-MONITOR
max RSS added in commit c039ba0716383ccaf88c9be1a7f0803a77823de1

Justin

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2019-02-17 22:02:37 Re: CPU costs of random_zipfian in pgbench
Previous Message Tom Lane 2019-02-17 21:34:58 Re: Ryu floating point output patch