Observability Uneven CPU Spikes

Hi Elasticsearch Team,

We currently have the following Elasticsearch cluster configuration:

  • 7 Hot Nodes

  • 3 Master Nodes

  • 5 Warm Nodes

  • 2 Coordinating Nodes

  • 4 Logstash Instances for data ingestion

We are observing uneven CPU utilization across the hot nodes. Some hot nodes experience significantly higher CPU utilization, while other hot nodes occasionally remain almost idle.

Could you help us understand the possible reasons behind this uneven distribution?

Specifically, we would like to understand:

  1. How does Elasticsearch distribute incoming indexing requests from multiple Logstash instances across hot nodes?

  2. Can shard allocation, primary shard distribution, or indexing workload concentration cause certain hot nodes to experience higher CPU utilization?

  3. Do coordinating nodes influence indexing and search workload distribution across the hot nodes?

  4. What is the recommended approach to achieve balanced CPU utilization and indexing load across all 7 hot nodes?

  5. Are there any specific Elasticsearch APIs or metrics we should monitor to identify the bottleneck?

We would appreciate your recommendations on identifying the root cause and optimizing workload distribution across the cluster.

Thanks!

What problems does that uneven CPU utilisation create, if any, in your solution?

Why is your cluster yellow and not green ?

Tell us broadly how your indices are laid out and accessed , eg number of shards/replicas? Any custom routing? Any heavy ingest pipelines? What type of disk is used by the hot nodes?

Is the cluster a set of physical servers, lots of virtual machines, within docker or similar, … ?

Sharing at least part of your logstash output configuration might help too.

@RainTown , Thanks for your response.

Please find some additional details about our production Elasticsearch environment:

Cluster Architecture:

  • Elasticsearch version: 8.13.4

  • 3 dedicated master nodes

  • 7 hot data nodes

  • 5 warm data nodes

  • 2 coordinating-only nodes (16 vCPU, 64 GB RAM each)

  • Deployment: On-premises physical servers

  • Storage: SSD

  • Total shards: Approximately 5,000

  • Replicas: 1

Transforms:

  • We have 16 Elasticsearch transforms running.

  • These transforms are configured on warm nodes using the roles data_warm and transform.

Logstash Configuration:

  • We have 4 Logstash instances.

  • All four Logstash nodes are manually configured to send data to the Elasticsearch hot nodes.

Current Issue:

During peak business hours, CPU utilization spikes on only 2 of our 7 hot data nodes, while the remaining 5 hot nodes show relatively low CPU utilization.

Initially, we observed this uneven CPU distribution even though all seven nodes were configured as hot data nodes. We also tried explicitly changing their roles to data_hot, but the uneven CPU utilization continued.

Regarding cluster health, it is now Green.

We would appreciate your suggestions on the following:

  1. Why is indexing or query workload concentrated on only 2 hot nodes instead of being distributed across all 7?

  2. Could shard allocation, shard distribution, or primary shard placement be responsible?

  3. Could our Logstash output configuration or Elasticsearch bulk indexing behavior contribute to this imbalance?

  4. Is there any recommended approach for distributing indexing traffic evenly across all hot nodes?

  5. Could our 16 transforms running on warm nodes have any indirect impact on hot-node performance?

Any recommendations for further investigation would be appreciated.

My main problem is the Kibana slowness issue in the peak hour, but there is frequent response in the night and early morning.

Try overriding this default setting for elasticsearch... i had the same issue.

Force Maximum fielddata cache size to use 20% rather than the default 40%

indices.fielddata.cache.size: 20%

You need describe your indices layout and workload pattern to know.

eg if you have a heavily loaded index with one shard and one replica, you’d have 2 hotter hot nodes, right?

Custom routing could end up same issue.

Incorrectly configured logstash might hit same issue.

You can also try to confirm what the heavily loaded nodes are actually doing. Looking at Stack Monitoring data, or via APIs like hot_threads

Your number of indices is 2428 in your screenshot, and shards are 4856. That's one primary shard and one replica shard per index. Based on this and the rest of your description, my first guess is you have one dominant "hot" index which is effectively keeping 2 nodes busy because that data is just on those 2 data nodes. Whether that load is from indexing, search, or aggregations I don't know.

If that some sort of time based index, then the "hot index" will itself change, but still with same 2-shards limitation. You'd see this with the specific 2 hot nodes with higher load changing over time, but it would always be just 2.,

Certainly possible. Depends on what specific indices the transforms operate, both source and destination, and how heavy that work is.

Yes, but ... would not be where I would start looking. Since you didn't share any logstash configuration it's difficult to be sure.