Skip to content

Document datapoint chunk interval and compression metrics - #214

Open
richturner wants to merge 1 commit into
mainfrom
docs/datapoint-chunk-interval
Open

richturner wants to merge 1 commit into
mainfrom
docs/datapoint-chunk-interval

Conversation

@richturner

Copy link
Copy Markdown
Member

Documents the changes in openremote/core#3620. Merge this after that PR.

Changes

Developer guide: System administration, Database

  • New "Chunk interval" section
    • How the asset_datapoint chunks work: the chunk being written stays uncompressed, and each chunk is compressed 1 day after it ends.
    • Why a large uncompressed chunk makes recent-data queries slow.
    • The new OR_DATA_POINTS_CHUNK_INTERVAL_DAYS setting, applied at startup to new chunks only.
    • Sizing guidelines: the chunk being written should fit in shared_buffers; every chunk adds planning and lock cost; small chunks compress less well.
    • A note about the one-off compression of the previous chunk after upgrading.
  • Datapoint retention: the purge now runs daily, and the chunk interval is configurable.
  • Memory sizing guidelines: step 1 and the 25% rule now use the projected size of the chunk being written instead of the largest uncompressed chunk. To reduce the chunk interval, set OR_DATA_POINTS_CHUNK_INTERVAL_DAYS rather than calling set_chunk_time_interval() by hand.
  • Monitoring metrics table: added pg_datapoint_chunk_memory_ratio, pg_datapoint_chunks_needing_compression, pg_datapoint_uncompressed_chunk_count and pg_datapoint_chunk_count, and updated the note on pg_datapoint_largest_uncompressed_chunk.

User guide: Metrics

  • Added pg_datapoint_chunk_interval_days, pg_datapoint_write_rate_per_day, pg_datapoint_projected_chunk_size and pg_datapoint_chunk_memory_ratio.
  • Updated the pg_datapoint_chunks_needing_compression description.

Versioned docs are unchanged because they describe released versions.

Document OR_DATA_POINTS_CHUNK_INTERVAL_DAYS with chunk sizing guidelines,
the 1 day columnstore compress_after, the daily purge and the new chunk
sizing query-exporter metrics (openremote/core#3620).
@richturner richturner self-assigned this Nov 25, 2026
@richturner
richturner requested a review from a team November 25, 2026 16:59

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant