Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#670 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
42/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
python

Direzione di ricerca

Inizia con l’inizializzazione del reader correlata e con il codice receive_batch nel report, quindi riproduci il carico di lavoro usando più di 2.000 partizioni, 24 processi reader in parallelo e scritture sostenute a più di 40k messaggi/sec. Confronta il throughput di Python e C++ e traccia il percorso del reader Python per identificare perché le letture scendono da circa 30k a 20k messaggi/sec; il lavoro è completato quando il throughput Python è stabile sotto il carico riportato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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,  
    )  
    ...  
Lingua principale
Python
Stelle
102
Fork
75
Merge medio
1g 23h
PR unite (30g)
13

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di ydb-platform/ydb-python-sdk

Tutte le issue di ydb-platform/ydb-python-sdk

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.