Disk polling: investigate repeated batch verification and record scanning

Aperta
#4,176 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
rust

Direzione di ricerca

Inizia con walk_disk_chunk in core/partitions/src/poll_plan.rs, select_batch_slice in core/partitions/src/journal.rs e verify_and_recompute_batch_checksum in core/binary_protocol/src/batch.rs. Misura i bytes sottoposti a hashing, i records visitati, i batches distinti, le visite ripetute e la posizione di selezione nei workload di #4174, condividendo i contatori con #4175. Il lavoro è completo quando i costi sono attribuiti, una modifica alla verifica o al parsing viene testata separatamente dalla variazione delle dimensioni di lettura e restano intatte le garanzie relative a checksum, validazione, rifiuto dei frame malformati, output, memoria, identità e invalidazione.

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

Descrizione

performance server

Part of #4174, which records the shared benchmark setup, revisions and evaluation criteria.

walk_disk_chunk decodes a complete batch and verifies checksums when enabled. select_batch_slice then walks records to locate the requested slice. Adjacent small polls can revisit the same batch, and selecting a late record can scan preceding records.

Historical profiles measured substantial CPU time in the inclusive checksum and hash category:

Workload Baseline sampled CPU, µs per poll Candidate sampled CPU, µs per poll
Explicit offset, without concurrent writes 100.474 101.810
Explicit offset, with concurrent writes 109.583 110.524

The category includes called functions and overlaps its callers, so it cannot be added to their CPU totals. These samples establish neither repeated verification nor avoidable work. The shared sampling method and workload limits are in #4174.

verify_and_recompute_batch_checksum already validates message bodies and recomputes the batch checksum in one frame walk. Investigate repeated visits and selection costs before assuming a duplicate pass exists.

  1. Count bytes hashed, records visited, distinct batches and repeat visits per returned message. Attribute current hash samples to callers and distinguish verification from record selection.
  2. Vary batch size, requested message count and position within a batch. Determine whether the cost comes from large batches, repeated visits, locating a late record or the hash implementation.
  3. Share counters with #4175, then test one verification or parsing change separately from read sizing. Confirm any component saving through polling, including larger requests and concurrent writes.

Preserve configured checksum and body validation, malformed frame rejection and the parent's output guarantees. A previously verified file range does not establish the integrity of newly read bytes: corruption and path reuse can occur later. Any retained verified buffer needs bounded memory, correct identity and explicit invalidation.

Lingua principale
Rust
Stelle
5.2k
Fork
502
Merge medio
3g 8h
PR unite (30g)
146

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

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 apache/iggy

Tutte le issue di apache/iggy

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.