|
| 1 | +# Grafana Dashboards Naming Conventions |
| 2 | + |
| 3 | +This document outlines the naming principles used in PostgresAI Grafana dashboards. |
| 4 | + |
| 5 | +## Terminology Rules |
| 6 | + |
| 7 | +### Bloat Metrics |
| 8 | +Always use **"Estimated bloat"** when referring to bloat metrics. The bloat |
| 9 | +values shown in these dashboards are based on estimation queries that use |
| 10 | +pg_stat_user_tables statistics - they are not precise measurements like |
| 11 | +pgstattuple would provide. |
| 12 | + |
| 13 | +**Correct:** |
| 14 | +- "Estimated bloat %" |
| 15 | +- "Estimated bloat size" |
| 16 | +- "Top $top_n tables by estimated bloat %" |
| 17 | + |
| 18 | +**Incorrect:** |
| 19 | +- "Bloat %" |
| 20 | +- "Bloat size" |
| 21 | + |
| 22 | +### Shared Block I/O |
| 23 | +Use **"Shared block reads"** and **"Shared block hits"** - these are the correct |
| 24 | +PostgreSQL terminology. |
| 25 | + |
| 26 | +- **Shared block hits**: Data was found in PostgreSQL's shared buffer pool |
| 27 | +- **Shared block reads**: Data was read into the shared buffer pool from the OS |
| 28 | + page cache. Note: This does NOT necessarily mean a disk read occurred - the data |
| 29 | + may have been served from the OS file system cache. |
| 30 | + |
| 31 | +**Correct:** |
| 32 | +- "Shared block reads" |
| 33 | +- "Shared block hits" |
| 34 | +- "Shared block hit ratio" |
| 35 | + |
| 36 | +**Incorrect:** |
| 37 | +- "Block disk reads" (we don't know if actual disk I/O occurred) |
| 38 | +- "Block cache hits" (ambiguous - could mean OS cache or PG buffer pool) |
| 39 | + |
| 40 | +### Rate Metrics |
| 41 | +For rate-based panels (showing per-second values), append `/s` to the title: |
| 42 | + |
| 43 | +**Examples:** |
| 44 | +- "Tuple operations /s" |
| 45 | +- "Size growth /s" |
| 46 | +- "Shared block hits /s" |
| 47 | + |
| 48 | +### Section (Row) Naming |
| 49 | +- **"Activity stats"**: For table dashboards showing tuple operations |
| 50 | +- **"Index usage stats"**: For index dashboards showing scan/fetch metrics |
| 51 | +- **"Estimated bloat stats"**: For bloat-related metrics (always include "Estimated") |
| 52 | +- **"IO stats"**: For shared buffer pool I/O metrics |
| 53 | +- **"Size stats"**: For size-related metrics |
| 54 | + |
| 55 | +## Units |
| 56 | + |
| 57 | +- **binBps**: Use binary bytes per second (KiB/s, MiB/s, GiB/s) for PostgreSQL |
| 58 | + block I/O rates, as PostgreSQL uses binary block sizes (typically 8 KiB) |
| 59 | +- **bytes**: Use for absolute size measurements |
| 60 | +- **percent**: Use for percentage values (0-100 scale) |
| 61 | +- **ops**: Use for operations per second |
0 commit comments