Kafka용 Openflow Connector의 성능 조정

참고

이 커넥터에는 `Snowflake Connector 약관<https://www.snowflake.com/legal/snowflake-connector-terms/>`_이 적용됩니다.

이 항목에서는 Snowflake로 데이터를 수집할 때 최적의 처리량을 달성하고 지연 시간을 최소화하기 위해 Snowflake Openflow Connector for Kafka 의 성능을 최적화하기 위한 지침을 제공합니다.

성능 고려 사항

최적의 성능을 위해 Kafka용 Openflow Connector를 구성할 때는 수집 처리량과 지연 시간에 영향을 미치는 다음과 같은 주요 요소를 고려하십시오.

Kafka 구성

파티션 수

More partitions allow for higher parallelism but require careful coordination with consumer configuration. Excessive partitions can cause several issues: increased memory usage, slower leader elections during failures, and significant metadata management overhead on brokers.

압축

메시지 압축은 네트워크 대역폭을 줄일 수 있지만, CPU 오버헤드가 증가합니다.

flowfile 최적화

flowfile 크기

성능을 최적화하려면 flowfile은 개별 작은 메시지를 포함하지 않고 1~10 MB 범위여야 합니다. flowfile이 클수록 개별 파일 작업 횟수를 최소화하여 처리 오버헤드를 줄이고 처리량을 개선할 수 있습니다. 기본 설정은 허용 가능한 크기 범위의 flowfile을 생성합니다. 처리량이 적을 때는 작은 flowfile이 예상됩니다.

If you observe small flowfiles with high throughput, contact Snowflake Support for assistance.

네트워크 및 인프라

네트워크 지연 시간

Lower latency between Kafka brokers and Openflow improves overall performance. Snowflake recommends deploying Kafka brokers and Openflow in the same CSP region.

노드 크기 권장 사항

The following table provides configuration recommendations based on expected workload characteristics:

노드 크기

추천 대상

메시지 전송률 용량

Small (S)

낮은 처리량에서 중간 정도의 처리량 시나리오

Up to 18 MB/s per node

Medium (M)

보통에서 높은 처리량 시나리오

Up to 145 MB/s per node

Large (L)

높은 처리량 시나리오

Up to 250 MB/s per node

성능 최적화 모범 사례

프로세서 동시 작업 조정하기

To optimize processor performance, you can adjust the number of concurrent tasks for both ConsumeKafka and PublishSnowpipeStreaming processors. Concurrent tasks allow processors to run multiple threads simultaneously, improving throughput for high-volume scenarios.

프로세서의 동시 작업을 조정하려면 다음 작업을 수행하십시오.

  1. Openflow 캔버스에서 프로세서를 마우스 오른쪽 버튼으로 클릭합니다.

  2. Select Configure from the context menu.

  3. Navigate to the Scheduling tab.

  4. In the Concurrent tasks field, enter the preferred number of concurrent tasks.

  5. Select Apply to save the configuration.

중요 고려 사항

메모리 사용량

각 동시 작업은 추가 메모리를 소비합니다. 동시 작업 증가 시 JVM 힙 사용량을 모니터링하십시오.

Kafka 파티션

For ConsumeKafka, the number of concurrent tasks multiplied by the number of runtime nodes should not exceed the number of total Kafka partitions from all topics.

보수적으로 시작하기

낮은 값으로 시작하여 성능 메트릭을 모니터링하면서 점차적으로 값을 높이십시오.

Troubleshooting performance issues: Common performance bottlenecks

높은 컨슈머 지연 또는 Snowflake Ingest 병목 현상

Kafka 컨슈머 지연이 증가하거나 Snowflake Ingest이 느린 경우 다음 작업을 수행하십시오.

  1. Openflow와 Kafka 브로커 사이의 네트워크 연결 및 대역폭을 확인합니다.

  2. Observe if the queue in front of the PublishSnowpipeStreaming processor increases.

    1. If yes, consider adding more concurrent tasks for the PublishSnowpipeStreaming processor in the range limitations provided in 권장 동시 작업 설정.

    2. If not, consider adding more concurrent tasks for the ConsumeKafka processor in the range limitations provided in 권장 동시 작업 설정.

  3. 더 큰 노드 유형을 사용하는 것이 좋습니다.

  4. 런타임의 최대 노드 수를 늘리는 것을 고려하십시오.

메모리 압력

메모리 관련 문제가 발생하는 경우:

  1. Reduce the batch sizes to lower the memory footprint.

  2. ConsumeKafka 프로세서의 동시 작업 수를 줄입니다.

  3. 더 큰 노드 유형으로 업그레이드하는 것을 고려하십시오.

네트워크 지연 문제

지연 시간이 긴 경우:

  1. Openflow와 외부 시스템 간의 네트워크 구성을 확인합니다.

  2. Kafka 클러스터에 더 가까운 곳에 Openflow를 배포하는 것을 고려하십시오.

  3. If working with low throughput, consider lowering the Client Lag settings in the PublishSnowpipeStreaming processor and Max Uncommitted Time in the ConsumeKafka processor.