From 0b01b75498e81ebf698adf9eebc1351e6876a5dd Mon Sep 17 00:00:00 2001 From: Federico Valeri Date: Thu, 23 Dec 2021 09:55:09 +0100 Subject: [PATCH] Improve note about accurate RebalanceProposals Signed-off-by: Federico Valeri --- .../cruise-control/proc-generating-optimization-proposals.adoc | 2 +- .../cruise-control/ref-cruise-control-configuration.adoc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/documentation/modules/cruise-control/proc-generating-optimization-proposals.adoc b/documentation/modules/cruise-control/proc-generating-optimization-proposals.adoc index 1e8f5abcf9..4f14c03fb1 100644 --- a/documentation/modules/cruise-control/proc-generating-optimization-proposals.adoc +++ b/documentation/modules/cruise-control/proc-generating-optimization-proposals.adoc @@ -143,7 +143,7 @@ com.linkedin.kafka.cruisecontrol.exception.OptimizationFailureException: [NOTE] ==== -The error shows CPU capacity as a percentage rather than CPU cores. For that reason, it does not directly map to the number of CPUs configured in `Kafka.spec.kafka.resources`. It is like having a single _virtual_ CPU per broker, which has the cycles of one or more CPUs. This has no effect on the rebalance behavior, since the ratio between CPU utilization and capacity remains the same. +The error shows CPU capacity as a percentage rather than CPU cores. For that reason, it does not directly map to the number of CPUs configured in Kafka CR. It is like having a single _virtual_ CPU per broker, which has the cycles of `Kafka.spec.kafka.resources.limits.cpu` CPUs. This has no effect on the rebalance behavior, since the ratio between CPU utilization and capacity remains the same. ==== .What to do next diff --git a/documentation/modules/cruise-control/ref-cruise-control-configuration.adoc b/documentation/modules/cruise-control/ref-cruise-control-configuration.adoc index a27632a525..23cfc1a5bd 100644 --- a/documentation/modules/cruise-control/ref-cruise-control-configuration.adoc +++ b/documentation/modules/cruise-control/ref-cruise-control-configuration.adoc @@ -96,7 +96,7 @@ Because Strimzi Kafka brokers are homogeneous, Cruise Control applies the same c [NOTE] ==== -We recommend that the Java memory of the Kafka brokers fits into the `Kafka.spec.kafka.resources.requests.memory`, so that brokers will have roughly the same capacity. +In order to guarantee accurate RebalanceProposals when using CPU goals, you can set requests equal to limits in Kafka CR. That way, all CPU resources are reserved upfront and the broker's full capacity is always available, even when the Kubernetes node is under pressure. This is a tradeoff, as it comes at the cost of some unused CPU cycles. ==== .An example Cruise Control brokerCapacity configuration using bibyte units