Skip to content

Remove best fit - #1448

Closed
djwatson wants to merge 2 commits into
jemalloc:devfrom
djwatson:remove_best_fit
Closed

djwatson wants to merge 2 commits into
jemalloc:devfrom
djwatson:remove_best_fit

Conversation

@djwatson

@djwatson djwatson commented Mar 8, 2019

Copy link
Copy Markdown

This option saves a few CPU cycles, but potentially adds a lot of fragmentation - so much so that there are workarounds like max_active. Instead, let's just drop it entirely. It only made a difference in one service I tested (.3% cpu regression), while many services saw a memory win (also small, less than 1% mem P99)

@davidtgoldblatt

Copy link
Copy Markdown
Contributor

Love it. That being said, maybe let's wait until after we cut the release to merge, in case we want to get any last-minute fixes in cleanly?

@interwq

interwq commented Mar 8, 2019

Copy link
Copy Markdown
Contributor

Yeah let’s wait until we cut 5.2. I’m still curious about the effects of this on long running binaries.

This was referenced Mar 11, 2019
The max_active_fit check is currently only on the best_fit
path, add it to the first_fit path also.
@djwatson

djwatson commented Apr 8, 2019

Copy link
Copy Markdown
Author

kept the max_active_fit check in first_fit path instead of removing.

Comment thread src/extent.c Outdated
* In order to reduce fragmentation, avoid reusing and splitting
* large extents for much smaller sizes.
*/
if ((sz_pind2sz(i) >> opt_lg_extent_max_active_fit) > size) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The intention was to only apply this to dirty_extents, maybe add a new arg to extents_fit_locked and specify if max_active_fit should be checked?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, update with restriction to delay_coalesce (which is only set for dirty).

This option saves a few CPU cycles, but potentially adds a lot of
fragmentation - so much so that there are workarounds like
max_active.  Instead, let's just drop it entirely.  It only made
a difference in one service I tested (.3% cpu regression), while
many services saw a memory win (also small, less than 1% mem P99)
@interwq

interwq commented Apr 12, 2019

Copy link
Copy Markdown
Contributor

Should we land this and then #1455 next?

@djwatson djwatson closed this May 8, 2019
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.

3 participants