powa-team / powa

PostgreSQL Workload Analyzer
http://powa.readthedocs.io/
PostgreSQL License
768 stars 57 forks source link

No of concurrent session #121

Closed Ikrar-k closed 5 years ago

Ikrar-k commented 5 years ago

Hi,

I have few queries regarding PoWA

  1. How to find out no of concurrent user connection in PoWA.
  2. Is there a way to check like how much time a session was waiting on a particular wait event or Avg wait events?
  3. No of rollback session in PostgreSQL.
rjuju commented 5 years ago

Hello,

Unfortunately, most of this is more general monitoring and is out of scope for powa, as the tool is really intended for performance analysis. So 1 and 3 are not possible, but many tool offer such views.

For 2, that's something no possible to do with postgres infrastructure, as postgres only expose the current wait event if any, but no timing is done. That's why we chose to use pg_wait_sampling for wait event information, as a high frequency sampling should give a reasonable idea of what are the longest wait events, although of course it's just a statistic approach. You can see the latest discussion about it at https://www.postgresql.org/message-id/flat/2022793411.102298.1532329482584.JavaMail.jboss%40ep1ml402 for more details.

Ikrar-k commented 5 years ago

This is informative. Thank You!! You can close this.

rjuju commented 5 years ago

Thanks!