Skip to content

Avoid eager purging on the dedicated oversize arena when using bg thds. - #2466

Merged
interwq merged 1 commit into
jemalloc:devfrom
interwq:oversize
Jun 27, 2023
Merged

interwq merged 1 commit into
jemalloc:devfrom
interwq:oversize

Conversation

@interwq

@interwq interwq commented Jun 23, 2023

Copy link
Copy Markdown
Contributor

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.

@interwq

interwq commented Jun 23, 2023

Copy link
Copy Markdown
Contributor Author

@guangli-dai as we recently discussed.

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.
@interwq
interwq merged commit d131331 into jemalloc:dev Jun 27, 2023
@interwq
interwq deleted the oversize branch June 27, 2023 18:57
interwq added a commit to interwq/jemalloc that referenced this pull request May 2, 2024
Bypassing background thread creation for the oversize_arena used to be an
optimization since that arena had eager purging.  However jemalloc#2466 changed the
purging policy for the oversize_arena -- specifically it switched to the default
decay time when background_thread is enabled.

This issue is noticable when the number of arenas is low: whenever the total #
of arenas is <= 4 (which is the default max # of background threads), in which
case the purging will be stalled since no background thread is created for the
oversize_arena.
interwq added a commit to interwq/jemalloc that referenced this pull request May 2, 2024
Bypassing background thread creation for the oversize_arena used to be an
optimization since that arena had eager purging.  However jemalloc#2466 changed the
purging policy for the oversize_arena -- specifically it switched to the default
decay time when background_thread is enabled.

This issue is noticable when the number of arenas is low: whenever the total #
of arenas is <= 4 (which is the default max # of background threads), in which
case the purging will be stalled since no background thread is created for the
oversize_arena.
interwq added a commit to interwq/jemalloc that referenced this pull request May 2, 2024
Bypassing background thread creation for the oversize_arena used to be an
optimization since that arena had eager purging.  However jemalloc#2466 changed the
purging policy for the oversize_arena -- specifically it switched to the default
decay time when background_thread is enabled.

This issue is noticable when the number of arenas is low: whenever the total #
of arenas is <= 4 (which is the default max # of background threads), in which
case the purging will be stalled since no background thread is created for the
oversize_arena.
interwq added a commit that referenced this pull request May 2, 2024
Bypassing background thread creation for the oversize_arena used to be an
optimization since that arena had eager purging.  However #2466 changed the
purging policy for the oversize_arena -- specifically it switched to the default
decay time when background_thread is enabled.

This issue is noticable when the number of arenas is low: whenever the total #
of arenas is <= 4 (which is the default max # of background threads), in which
case the purging will be stalled since no background thread is created for the
oversize_arena.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants