powa-team / powa

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

CPU for query reported even when query wasn't run #67

Closed ribbles closed 8 years ago

ribbles commented 8 years ago

Postgres 9.4 pg_qualstats 0.0.7 pg_stat_kcache 2.0.2 pg_stat_statements 1.2 powa 3.0.0

On the query overview page, IO tab, the CPU usage always reports a very high number, i.e. 60% CPU for a query that runs once a second, completes in 80 microseconds, and reports zero read or write time.

Even on the demo site the CPU looks wrong, and shows no correlation with the "Physical block (in Bps)" or call count.

rjuju commented 8 years ago

Like this one? http://demo-powa.dalibo.com/database/pgbench/query/3795520516/overview/

The reported CPU is percentage of query execution time spent consuming either user cpu time or system cpu time, so it's not necessarily correlated with physical disk access.

ribbles commented 8 years ago

Thank you for this definition.