mochengqian commented on PR #915:
URL: https://github.com/apache/dubbo-go-pixiu/pull/915#issuecomment-4273232264

   Issue #905 benchmark baseline (Step 1 + Step 2)
   
   Environment:
   - `goos=darwin`
   - `goarch=arm64`
   - `cpu=Apple M5`
   
   Command:
   ```bash
   go test ./pkg/server -run '^$' -bench '^BenchmarkCluster' -benchmem -count=5
   ```
   
   Each `Mean` value below is the arithmetic mean across 5 runs. `Range` shows 
the min-max span across the same 5 runs.
   
   Raw output was captured locally for reference.
   
   ## PickEndpoint / Lookup
   
   | Benchmark | Mean ns/op | Range ns/op | B/op | allocs/op |
   |---|---:|---:|---:|---:|
   | PickEndpoint serial / Rand / `clusters=1` | 16.12 | 15.94-16.29 | 0 | 0 |
   | PickEndpoint serial / Rand / `clusters=32` | 33.09 | 32.98-33.32 | 0 | 0 |
   | PickEndpoint serial / Rand / `clusters=256` | 113.58 | 112.80-115.30 | 0 | 
0 |
   | PickEndpoint serial / Rand / `clusters=1024` | 685.30 | 669.10-692.30 | 0 
| 0 |
   | PickEndpoint serial / RoundRobin / `clusters=1` | 13.51 | 13.29-13.96 | 0 
| 0 |
   | PickEndpoint serial / RoundRobin / `clusters=32` | 29.59 | 29.48-29.82 | 0 
| 0 |
   | PickEndpoint serial / RoundRobin / `clusters=256` | 111.00 | 110.20-112.30 
| 0 | 0 |
   | PickEndpoint serial / RoundRobin / `clusters=1024` | 767.10 | 
675.90-1054.00 | 0 | 0 |
   | Lookup serial / `clusters=1` | 3.33 | 3.32-3.35 | 0 | 0 |
   | Lookup serial / `clusters=32` | 17.82 | 17.77-17.85 | 0 | 0 |
   | Lookup serial / `clusters=256` | 111.68 | 111.50-112.20 | 0 | 0 |
   | Lookup serial / `clusters=1024` | 744.18 | 738.00-749.60 | 0 | 0 |
   | PickEndpoint parallel / Rand | 100.42 | 98.42-101.30 | 0 | 0 |
   | PickEndpoint parallel / RoundRobin | 107.66 | 103.10-110.10 | 0 | 0 |
   
   ## LB Hot Path / Healthy Filter
   
   | Benchmark | Mean ns/op | Range ns/op | B/op | allocs/op |
   |---|---:|---:|---:|---:|
   | LB hot path / Rand / `endpoints=4` | 13.72 | 13.51-13.93 | 0 | 0 |
   | LB hot path / Rand / `endpoints=64` | 134.96 | 131.40-136.70 | 512 | 1 |
   | LB hot path / Rand / `endpoints=512` | 860.96 | 852.00-881.30 | 4864 | 1 |
   | LB hot path / RoundRobin / `endpoints=4` | 9.29 | 8.96-9.57 | 0 | 0 |
   | LB hot path / RoundRobin / `endpoints=64` | 125.40 | 124.60-128.10 | 512 | 
1 |
   | LB hot path / RoundRobin / `endpoints=512` | 858.72 | 851.60-868.40 | 4864 
| 1 |
   | Healthy filter / `endpoints=8, healthy=100%` | 20.02 | 19.92-20.11 | 64 | 
1 |
   | Healthy filter / `endpoints=8, healthy=50%` | 19.11 | 18.98-19.45 | 64 | 1 
|
   | Healthy filter / `endpoints=8, healthy=0%` | 16.78 | 16.70-16.91 | 64 | 1 |
   | Healthy filter / `endpoints=64, healthy=100%` | 120.60 | 120.30-121.70 | 
512 | 1 |
   | Healthy filter / `endpoints=64, healthy=50%` | 102.90 | 102.00-104.50 | 
512 | 1 |
   | Healthy filter / `endpoints=64, healthy=0%` | 87.86 | 87.38-88.61 | 512 | 
1 |
   | Healthy filter / `endpoints=512, healthy=100%` | 900.28 | 894.20-908.50 | 
4864 | 1 |
   | Healthy filter / `endpoints=512, healthy=50%` | 744.82 | 730.60-758.70 | 
4864 | 1 |
   | Healthy filter / `endpoints=512, healthy=0%` | 498.62 | 495.40-501.60 | 
4864 | 1 |
   
   ## CAS / Consistent Hash
   
   | Benchmark | Mean ns/op | Range ns/op | B/op | allocs/op |
   |---|---:|---:|---:|---:|
   | CompareAndSetStore mixed | 586839.40 | 573165.00-615044.00 | 1850084 | 
6417 |
   | Consistent hash / RingHash | 2644.00 | 2617.00-2690.00 | 2212 | 128 |
   | Consistent hash / Maglev | 1944.20 | 1921.00-1964.00 | 1828 | 99 |
   
   ## Notes
   
   - The split benchmarks are intended to make later step-by-step attribution 
clearer:
     - Step 4 should primarily move the lookup-only numbers.
     - Step 5/6 should primarily move the healthy-filter and simple LB hot-path 
numbers.
     - Step 7 should primarily move the consistent-hash numbers.
   - `PickEndpoint serial / RoundRobin / clusters=1024` showed one isolated 
high value in the `count=5` suite run. A dedicated rerun with:
     ```bash
     go test ./pkg/server -run '^$' -bench 
'^BenchmarkClusterPickEndpointSerial/RoundRobin/clusters=1024$' -benchmem 
-count=10
     ```
     was stable at:
     - mean: `687.15 ns/op`
     - median: `685.75 ns/op`
     - range: `673.60-712.40 ns/op`
   
     I am treating the earlier `1054.00 ns/op` sample as an outlier rather than 
a representative signal.


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to