mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-22 16:47:21 +03:00
Avoid eager purging on the dedicated oversize arena when using bg thds.
We have observed new workload patterns (namely ML training type) that cycle through oversized allocations frequently, because 1) the dataset might be sparse which is faster to go through, and 2) GPU accelerated. As a result, the eager purging from the oversize arena becomes a bottleneck. To offer an easy solution, allow normal purging of the oversized extents when background threads are enabled.
This commit is contained in:
parent
46e464a26b
commit
d131331310
3 changed files with 42 additions and 25 deletions
|
|
@ -120,7 +120,10 @@ TEST_BEGIN(test_oversize_threshold) {
|
|||
*/
|
||||
ptr = mallocx(2 * 1024 * 1024, MALLOCX_ARENA(arena));
|
||||
dallocx(ptr, MALLOCX_TCACHE_NONE);
|
||||
expect_zu_ge(max_purged, 2 * 1024 * 1024, "Expected a 2MB purge");
|
||||
if (!is_background_thread_enabled()) {
|
||||
expect_zu_ge(max_purged, 2 * 1024 * 1024,
|
||||
"Expected a 2MB purge");
|
||||
}
|
||||
}
|
||||
TEST_END
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue