From 156d2a6d436817699ddcce1590fd1a4647de0d8a Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 28 Aug 2026 10:53:42 +1000 Subject: [PATCH] Refresh pre-aggregations daily, not every ten minutes lin001 is 2 vCPU with 3.8 GiB and no swap, shared with 27 other containers. Cube was rebuilding three pre-aggregations over static fixture data on 10, 10 and 30 minute keys, and its own log shows what that cost: "Previous interval #19593 was not finished with 30000 interval" "Interval #19594 finished after 00:02:50" A refresh taking 2m50s scheduled every 30 seconds, at interval #19594 - overlapping and never catching up, for days. Every rebuild produced a byte-identical result, because the fixtures do not change. 24 hours until imh makes the data genuinely live, at which point these get tuned deliberately rather than left at a number that was never chosen. Cube also suggests fewer partitions via rollup_lambda; that is a modelling change, not a demo-day one. Co-Authored-By: Claude Opus 5 --- cube/model/alarms.yml | 6 +++++- cube/model/operations.yml | 6 +++++- cube/model/process_values.yml | 6 +++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/cube/model/alarms.yml b/cube/model/alarms.yml index b11de65..d83a7c0 100644 --- a/cube/model/alarms.yml +++ b/cube/model/alarms.yml @@ -157,7 +157,11 @@ cubes: granularity: hour partition_granularity: month refresh_key: - every: 10 minutes + # 24h, not minutes: the fixtures are static, so a shorter + # interval rebuilds a byte-identical result on a 2-vCPU host + # and was a standing CPU load for no gain. Tune this back + # deliberately when imh makes the data genuinely live. + every: 24 hours build_range_start: sql: "SELECT now() - interval '180 days'" build_range_end: diff --git a/cube/model/operations.yml b/cube/model/operations.yml index 65fd621..99f2989 100644 --- a/cube/model/operations.yml +++ b/cube/model/operations.yml @@ -165,7 +165,11 @@ cubes: granularity: day partition_granularity: month refresh_key: - every: 30 minutes + # 24h, not minutes: the fixtures are static, so a shorter + # interval rebuilds a byte-identical result on a 2-vCPU host + # and was a standing CPU load for no gain. Tune this back + # deliberately when imh makes the data genuinely live. + every: 24 hours build_range_start: sql: "SELECT now() - interval '365 days'" build_range_end: diff --git a/cube/model/process_values.yml b/cube/model/process_values.yml index 456aa24..e474915 100644 --- a/cube/model/process_values.yml +++ b/cube/model/process_values.yml @@ -201,7 +201,11 @@ cubes: granularity: hour partition_granularity: month refresh_key: - every: 10 minutes + # 24h, not minutes: the fixtures are static, so a shorter + # interval rebuilds a byte-identical result on a 2-vCPU host + # and was a standing CPU load for no gain. Tune this back + # deliberately when imh makes the data genuinely live. + every: 24 hours build_range_start: sql: "SELECT now() - interval '180 days'" build_range_end: