Skip to content

Kafka BKM#21

Open
matt-welch wants to merge 5 commits intointel:mainfrom
matt-welch:kafka-bkm
Open

Kafka BKM#21
matt-welch wants to merge 5 commits intointel:mainfrom
matt-welch:kafka-bkm

Conversation

@matt-welch
Copy link

I'd like to submit this Kafka optimization guide to the optimization zone.

…ance

- Separate cloud-agnostic topology guidance from AWS-specific examples
- Add  "Data Movement in Kafka" section explaining producer write path,
  consumer read path, and partition leader/follower architecture
- Generalize cloud topology section to use vCPU counts instead of
  AWS-specific instance types
- Consolidate AWS deployment details into dedicated example section
- Update single-node topology with complete system specifications:
  * 2 sockets, 192 cores/socket (96 physical + HT)
  * 6 NUMA nodes (3 per socket, 32 cores/node, SNC enabled)
  * 3 brokers pinned to dedicated NUMA nodes with 16 logical CPUs each
- Add multi-cloud examples (AWS m8i, GCP C4) for Intel Xeon 6 guidance
- Remove confusing NUMA notation and provide clear CPU pinning examples
- Add disclaimer note about 4.2 RC testing
- Update all version references to specify "release candidate (RC)"
- Remove TODO placeholders and update docs URLs to Kafka 4.1
- Clarify vm.dirty_background_bytes applies system-wide
@rsiyer-intel
Copy link
Collaborator

Need to add a link in the main README under Software https://github.com/intel/optimization-zone/blob/main/README.md


## Single-node BIOS Configuration Recommendations
If the user has access to the BIOS for a system, here are some parameters that can be changed to improve Kafka performance.
- **Sub-NUMA CLustering (SNC)**: enabls multiple NUMA nodes so each broker can run on its own NUMA node
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo - enables

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also,
Sub-NUMA Clustering

net.ipv4.tcp_wmem='4096 65536 16777216'

################################################################
#setting the system to performance mode for best possible perf #
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment spacing

setting

- Example: Cloud instance with 16 vCPUs
- `num.network.threads=6`: should be less than or equal to half the CPU cores assigned to a broker
- `num.io.threads=8`: should be less than or equal to the count of CPU cores assigned to a broker
- `num.replica.fetchers=2`: increased beyond the default of 2 to improve replication latency
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It says increased beyond the default of 2, but it is set to 2.

Another potential resource bottleneck in a cloud deployment can be the storage bandwidth of volumes in their default configuration. It's usually possible to increase the I/O operations per second (IOPS) and bandwidth for a volume at creation time. It's recommended that these volumes be configured with high IOPS and throughput where possible. If storage performance of a single volume that's been configured for maximum throughput is still insufficient to meet an SLA, additional volumes may be attached to brokers or the brokers may be moved to instances with direct-attached NVMes.
As with other system resources, storage telemetry should be monitored to ensure individual devices are not operating beyond their allotted steady-state performance.
Scaling storage when hitting instance resource limits is somewhat more flexible than scaling the network because, in addition to the possibility of growing the cluster capacity with scale-out of additional brokers, additional storage volumes can usually be added to brokers to increase their storage capacity.
An alternative to adding volumes would be to scale up the brokers to systems with direct-attached NVMe's that enable high-performance storage.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor - NVMes

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.

2 participants