You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 2, 2024. It is now read-only.
Fix double counting while populating promscale_sql_database_chunks_count metric
Problem statment:
`PromscaleCompressionLow` alert fires regardless of a good compression ratio.
Root cause:
SQL query which populates `promscale_sql_database_chunks_count` is a sum of the below metrics,
1) Uncompressed Chunks
2) Proxy Chunks which points to Compressed Chunks
3) Compressed Chunks
However the total chunk count should be just (1) + (3), because (2) is already pointing to (3) and which leads to double counting.
Solution:
Fix the SQL query to consider entries which has `compressed_chunk_id` as null and this will be true for both (1) and (3).
Signed-off-by: Arunprasad Rajkumar <[email protected]>
Copy file name to clipboardExpand all lines: docs/runbooks/PromscaleCompressionLow.md
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,9 +12,10 @@ High disk usage by Promscale database
12
12
1. Open Grafana and navigate to Promscale dashboard
13
13
2. Go to Database section and see `Compressesd chunks ratio`. If you see a ratio of < 10% then compression is not adequate in your system
14
14
3. Open psql
15
-
4. Check number of uncompressed chunks: `select count(*)::bigint from _timescaledb_catalog.chunk where dropped=false and compressed_chunk_id=null;`
16
-
5. Check number of maintenancec jobs: `select count(*) from timescaledb_information.jobs where proc_name = 'execute_maintenance_job'`
17
-
6. Run the following debugging query:
15
+
4. Check total number of chunks: `select count(*)::bigint from _timescaledb_catalog.chunk where dropped=false and compressed_chunk_id is null;`
16
+
5. Check total number of compressed chunks: `select count(*)::bigint from _timescaledb_catalog.chunk where dropped=false and compressed_chunk_id is not null;`
17
+
6. Check number of maintenancec jobs: `select count(*) from timescaledb_information.jobs where proc_name = 'execute_maintenance_job'`
0 commit comments