From 56eaa52d6a98f9e4b2070009977dcd0a8c22f5e6 Mon Sep 17 00:00:00 2001 From: Friedrich Gonzalez Date: Fri, 11 Apr 2025 11:33:20 +0200 Subject: [PATCH 1/2] Improve default tenant sizes Signed-off-by: Friedrich Gonzalez --- CHANGELOG.md | 3 +++ cortex/config.libsonnet | 56 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 528ab10..03e0f87 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +## master +* [ENHANCEMENT] Add bigger tenants and configure default compactor tenant shards + ## 1.17.1 / 2024-10-23 * [CHANGE] Use cortex v1.17.1 * [CHANGE] Enable shuffle sharding in compactors diff --git a/cortex/config.libsonnet b/cortex/config.libsonnet index 5311921..3f10300 100644 --- a/cortex/config.libsonnet +++ b/cortex/config.libsonnet @@ -340,6 +340,7 @@ }, super_user:: { + compactor_tenant_shard_size: 2, max_series_per_metric: 0, // Disabled in favour of the max global limit max_series_per_user: 0, // Disabled in favour of the max global limit @@ -358,6 +359,7 @@ // This user class has limits increased by +50% compared to the previous one. mega_user+:: { + compactor_tenant_shard_size: 2, max_series_per_metric: 0, // Disabled in favour of the max global limit max_series_per_user: 0, // Disabled in favour of the max global limit @@ -373,6 +375,60 @@ ingestion_tenant_shard_size: 180, }, + + user_24M:: { // 50% more than previous + compactor_tenant_shard_size: 4, + max_series_per_metric: 0, // Disabled in favour of the max global limit + max_series_per_user: 0, // Disabled in favour of the max global limit + + max_global_series_per_user: 24000000, // 24M + max_global_series_per_metric: 2400000, // 2.4M + + ingestion_rate: 3000000, // 3M + ingestion_burst_size: 30000000, // 30M + + // 3400 rules + ruler_max_rules_per_rule_group: 20, + ruler_max_rule_groups_per_tenant: 170, + + ingestion_tenant_shard_size: 270, + }, + + user_32M:: { // 33% more than previous + compactor_tenant_shard_size: 4, + max_series_per_metric: 0, // Disabled in favour of the max global limit + max_series_per_user: 0, // Disabled in favour of the max global limit + + max_global_series_per_user: 32000000, // 32M + max_global_series_per_metric: 3200000, // 3.2M + + ingestion_rate: 4500000, // 4.5M + ingestion_burst_size: 45000000, // 45M + + // 3800 rules + ruler_max_rules_per_rule_group: 20, + ruler_max_rule_groups_per_tenant: 190, + + ingestion_tenant_shard_size: 360, + }, + + user_48M:: { // 50% more than previous + compactor_tenant_shard_size: 8, + max_series_per_metric: 0, // Disabled in favour of the max global limit + max_series_per_user: 0, // Disabled in favour of the max global limit + + max_global_series_per_user: 48000000, // 48M + max_global_series_per_metric: 4800000, // 4.8M + + ingestion_rate: 6000000, // 6M + ingestion_burst_size: 60000000, // 60M + + // 4200 rules + ruler_max_rules_per_rule_group: 20, + ruler_max_rule_groups_per_tenant: 210, + + ingestion_tenant_shard_size: 540, + }, }, // if not empty, passed to overrides.yaml as another top-level field From f746823acd8b30ebbd4c022dad0876622e618a77 Mon Sep 17 00:00:00 2001 From: Friedrich Gonzalez Date: Fri, 11 Apr 2025 21:02:25 +0200 Subject: [PATCH 2/2] Increase default compactor to handle bigger tenants Signed-off-by: Friedrich Gonzalez --- cortex/tsdb-config.libsonnet | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cortex/tsdb-config.libsonnet b/cortex/tsdb-config.libsonnet index 3d2c5e4..365a9b5 100644 --- a/cortex/tsdb-config.libsonnet +++ b/cortex/tsdb-config.libsonnet @@ -13,7 +13,7 @@ cortex_store_gateway_data_disk_class: 'standard', // Allow to configure the compactor disk. - cortex_compactor_data_disk_size: '250Gi', + cortex_compactor_data_disk_size: '500Gi', cortex_compactor_data_disk_class: 'fast', // Allow to fine tune compactor.