lukaszzborek commented on PR #3471:
URL: https://github.com/apache/iggy/pull/3471#issuecomment-4702574664

   ## Benchmark: 0.8.0 vs Current
   
   Allocation + GC pressure on the send path. Batch methods shown below.
   
   > **Single-message methods omitted.** They allocate too little per op to 
trigger a measurable Gen0 collection — BenchmarkDotNet reports GC counts per 
1,000 ops, and single-send allocations round to <0.5/1,000 (blank). Their 
allocations still dropped **~49% on average** (e.g. `TypedSendSingle` 3.39 KB → 
1.08 KB, −68%).
   
   | Method | 0.8.0 Gen0 | Current Gen0 | 0.8.0 Gen1 | Current Gen1 | 0.8.0 
Gen2 | Current Gen2 | 0.8.0 Allocated | Current Allocated | Δ Allocated |
   |---|---:|---:|---:|---:|---:|---:|---:|---:|---:|
   | RawSendBatch | 33.2031 | 5.8594 | 33.2031 | - | 33.2031 | - | 223.51 KB | 
115.37 KB | -48.38% |
   | PublisherSendBatch | 33.2031 | 5.8594 | 33.2031 | - | 33.2031 | - | 223.66 
KB | 115.61 KB | -48.31% |
   | TypedSendBatch | 33.2031 | - | 33.2031 | - | 33.2031 | - | 220.76 KB | 
26.05 KB | -88.20% |
   | RawSendBatchWithHeaders | 35.1563 | 5.8594 | 35.1563 | - | 35.1563 | - | 
258.09 KB | 115.37 KB | -55.30% |
   | PublisherSendBatchWithHeaders | 35.1563 | 5.8594 | 35.1563 | - | 35.1563 | 
- | 258.23 KB | 115.63 KB | -55.22% |
   | TypedSendBatchWithHeaders | 35.1563 | - | 35.1563 | - | 35.1563 | - | 
255.33 KB | 26.05 KB | -89.80% |
   | RawRentedSendBatch | 33.2031* | 0.9766 | 33.2031* | - | 33.2031* | - | 
223.51 KB* | 25.77 KB | -88.47%* |
   | PublisherRentedSendBatch | 33.2031* | 0.9766 | 33.2031* | - | 33.2031* | - 
| 223.66 KB* | 26.02 KB | -88.37%* |
   | BackgroundPublisherSendBatch | 31.2500 | - | 31.2500 | - | 31.2500 | - | 
224.92 KB | 116.66 KB | -48.13% |
   | BackgroundTypedSendBatch | 31.2500 | - | 31.2500 | - | 31.2500 | - | 
221.90 KB | 20.05 KB | -90.96% |
   | BackgroundPublisherRentedSendBatch | 31.2500* | - | 31.2500* | - | 
31.2500* | - | 224.92 KB* | 26.24 KB | -88.33%* |
   
   `*` = Rented method compared against the 0.8.0 non-rented equivalent 
(`RawSendBatch` / `PublisherSendBatch` / `BackgroundPublisherSendBatch`).
   
   ```
   // * Legends *
     Gen0        : GC Generation 0 collects per 1000 operations
     Gen1        : GC Generation 1 collects per 1000 operations
     Gen2        : GC Generation 2 collects per 1000 operations
     Allocated   : Allocated memory per single operation (managed only, 
inclusive, 1KB = 1024B)
     Δ Allocated : Relative change in allocated memory (Current vs 0.8.0)
   ```
   
   **Highlights:** 0.8.0 batches triggered full Gen0+Gen1+Gen2 collections on 
every batch; Current eliminates Gen1/Gen2 churn entirely and cuts Gen0 by ~6× 
(Rented: ~34×). Typed and Rented paths are now near-allocation-free (−88% to 
−91%).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to