wu-sheng opened a new pull request, #13801:
URL: https://github.com/apache/skywalking/pull/13801

   ### Improve the performance of L1 BatchQueue partition scaling for MAL 
metrics
   
   - [x] The benchmark result.
   
   `PartitionPolicy.resolve()` now accepts a weighted handler count instead of 
raw handler count.
   `BatchQueue.addHandler(type, handler, weight)` overload allows callers to 
specify partition weight per handler type.
   
   **L1 (MetricsAggregateWorker):** MAL metrics use weight 0.05 (vs 1.0 for 
OAL). Rationale: MAL emits ~500 items/type per scrape interval. With 
20,000-slot buffers, ~40 MAL types can safely share one partition (20,000 / 500 
= 40). Weight 0.05 ≈ 1/20 gives 2x headroom.
   
   **L2 (MetricsPersistentMinWorker):** No weight differentiation. After L1 
pre-aggregation, both OAL and MAL have similar per-minute burst patterns.
   
   **Impact (8-core, 642 OAL + 1,247 MAL types):**
   
   | | L1 Before | L1 After | Reduction |
   |---|---|---|---|
   | Partitions | 1,045 | 452 | 57% |
   | Array overhead | 167 MB | 72 MB | 57% |
   
   - [ ] If this pull request closes/resolves/fixes an existing issue, replace 
the issue number. Closes #<issue number>.
   - [x] Update the [`CHANGES` 
log](https://github.com/apache/skywalking/blob/master/docs/en/changes/changes.md).


-- 
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