membphis commented on PR #14141: URL: https://github.com/apache/apisix/pull/14141#issuecomment-6628502076
@AlinsRan, I reran the before/after validation on the updated head `dc622939a04c453e7bd54d871a94fe53be8dd86b`. **The previously reported P2 high-cardinality regression is resolved for the tested workloads.** This is a fresh three-way comparison, using the same baseline and workload as the earlier report: - Baseline: `6205e4a568106eea8277f61ae6ef942bbff62d97` - Previous PR head: `1e8b72e1ae8cf63197ab45659137442925e077a8` - Updated PR head: `dc622939a04c453e7bd54d871a94fe53be8dd86b` | Scenario / metric | Baseline | Previous head | Updated head | Updated vs baseline | | --- | ---: | ---: | ---: | ---: | | Stable count, requests/sec | 13,691 | 16,787 | 17,346 | +26.7% | | Stable count, worker CPU per request | 72.81 us | 59.31 us | 57.44 us | -21.1% | | 4,096 rotating counts, requests/sec | 12,706 | 10,916 | 16,193 | +27.5% | | 4,096 rotating counts, worker CPU per request | 78.51 us | 91.34 us | 61.57 us | -21.6% | | Stable count, Lua allocation per request | 11,642 B | 2,197 B | 2,612 B | -77.6% | | 4,096 rotating counts, Lua allocation per request | 11,644 B | 2,818 B | 2,636 B | -77.4% | The previous head again lost throughput in all eight rotating-count comparisons against baseline. The updated head gained in all eight comparisons, by 16.3% to 34.5%, and was 48.3% faster than the previous head by median throughput. Removing the dynamic limiter-object cache retains the stable-count improvement while eliminating its above-capacity eviction cost. I also measured the actual `resolve_var` implementation with 4,096 prebuilt templates in rotation, 200,000 calls per sample, keeping the resolved results observable. Median time per call was 3.20 us on baseline, 15.66 us on the previous head, and 2.02 us on the updated head. The checksum and final resolved value agreed across all samples. This supports the switch to `resty.lrucache.pureffi` for template-cache eviction. ### Regression results Reran all 29 relevant files: `limit-count*.t`, `graphql-limit-count*.t`, `proxy-rewrite*.t`, and `t/core/utils.t`. - Baseline: 2,263 assertions; updated head: 2,324 assertions. - Both passed 28/29 files. There were no new functional failures. - The remaining five failed assertions are the same DNS checks in `utils.t` TEST 3, TEST 4, and TEST 8 on both revisions. These fresh runs used isolated containers without external networking, so the public DNS lookups cannot succeed. - All added template-resolution, cache-eviction, limiter, and proxy-rewrite cases passed. - The patch also applies cleanly to the currently fetched `master@79a87e559f6bec9a018ca4466e31b43ef9650e81`; the runtime results above are from the exact baseline and PR snapshots listed above. Method: CI-pinned APISIX runtime 1.4.2; eight interleaved runs per version and scenario, 48 gateway runs total; a fresh gateway for each run; one worker pinned to its own physical core; one-second warm-up and five-second measurement; wrk with one thread and 100 connections; load generator and mock upstream on separate physical cores. Every benchmark request returned 200. CPU comes from gateway-worker process counters. Allocation uses three 2,000-request samples per version and scenario, with GC paused only for allocation sampling. Please also sync the PR title/description: the limiter section still describes the dynamic local-limiter cache that the latest commit intentionally removes. -- 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]
