Skip to content

Commit 0731052

Browse files
committed
test(incremental): apply the ARM RSS budget by architecture, not page size
incr_full_index bumps the full-index RSS limit from 2048MB to 2816MB to absorb ARM's documented ~2385MB peak (vs x86's ~1870MB on the same index), but gated the bump on a 16KB page size. ARM Linux uses 4KB pages, so the bump never fired there even though glibc's per-CPU malloc arenas + allocation rounding still inflate RSS to ~2385MB — CI's ubuntu-22.04-arm measured 2386MB against the un-bumped 2048 limit and failed (the value is the documented ARM peak, i.e. not a regression: the page-size heuristic just missed 4KB-page ARM). Also apply the higher ARM budget on any ARM target (__aarch64__/__arm__/ _M_ARM64). The guard still catches a real leak (GBs over 2816) while no longer false-failing on 4KB-page ARM. x86 stays at the tight 2048 budget. Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
1 parent 81548d2 commit 0731052

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

‎tests/test_incremental.c‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,18 @@ TEST(incr_full_index) {
309309
if (sysconf(_SC_PAGESIZE) >= 16384) {
310310
rss_limit_mb = 2816;
311311
}
312+
#endif
313+
#if defined(__aarch64__) || defined(_M_ARM64) || defined(__arm__)
314+
/* ARM Linux uses 4KB pages, so the page-size bump above does NOT fire there,
315+
* yet glibc's per-CPU malloc arenas + allocation rounding still inflate RSS
316+
* to the documented ~2385MB for this index (the same inflation Apple silicon
317+
* shows, which the page-size check catches via its 16KB pages). Apply the
318+
* higher ARM budget on any ARM target so the guard still catches a real leak
319+
* (GBs over) without false-failing on 4KB-page ARM Linux (e.g. CI's
320+
* ubuntu-22.04-arm, which measured 2386MB against the un-bumped 2048 limit). */
321+
if (rss_limit_mb < 2816) {
322+
rss_limit_mb = 2816;
323+
}
312324
#endif
313325
ASSERT_LT((int)rss_delta_mb, rss_limit_mb);
314326

0 commit comments

Comments
 (0)