Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Performance Degradation in Python SDK (v3.18.2) When Reading High-Load YDB Topic

オープン
#670 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
42/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
python

調査の方向性

まず、レポート内の関連する reader の初期化と receive_batch コードから始め、その後、2,000+ パーティション、24 個の並列 reader プロセス、40k+ messages/sec の持続的な書き込みを使用してワークロードを再現します。Python と C++ のスループットを比較し、読み取りが約 30k messages/sec から 20k messages/sec に低下する理由を特定するために Python reader のパスを追跡します。完了条件は、報告された負荷の下で Python のスループットが安定することです。

索引モデルが issue の本文から書いたものです。

説明

bug

Bug Report

YDB Python SDK version:
3.18.2

Environment:

  • 24 parallel reader processes.
  • Topic with 2000 partitions
  • High write load (spikes of 40k+ messages/sec).

Current behavior:

  • Read throughput drops by ~33% (from ~30k to ~20k messages/sec) during high write loads.
  • Performance degradation persists until write load stabilizes.
  • No issues observed with the C++ SDK under identical conditions.

Expected behavior:

  • Python SDK should maintain stable read throughput (~30k messages/sec) regardless of write load, matching the C++ SDK’s performance.

Steps to reproduce:

  1. Configure a YDB topic with 2000+ partitions.
  2. Use Python SDK (v3.18.2) to read the topic with 24 parallel processes.
  3. Generate a sustained high write load (e.g., 40k+ messages/sec).
  4. Observe read throughput degradation in Python SDK while the C++ SDK remains stable.

Related code:

# Reader initialization  
async def init_client(self):  
    reader = self._ydb_driver.topic_client.reader(  
        topic=ydb.TopicReaderSelector(path=self._topic, partitions=self._partition_groups),  
        consumer=self._consumer_id,  
    )  
    self._reader = reader  

# Batch processing  
async def read_topic_partition(self) -> typing.List[typing.Tuple[datatypes.PublicMessage, int]]:  
    ...  
    events_batch = await asyncio.wait_for(  
        self._reader.receive_batch(max_messages=self._max_messages),  
        timeout=_CLIENT_TIMEOUT,  
    )  
    ...  
主要言語
Python
スター
102
フォーク
80
平均マージ
1日 2時間
マージ済み PR(30日)
12

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

ydb-platform/ydb-python-sdk のほかの issue

ydb-platform/ydb-python-sdk の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。