Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make opt.lg_dirty_mult work as documented #192

Merged
merged 1 commit into from Feb 4, 2015

Conversation

Projects
None yet
3 participants
@glandium
Copy link
Contributor

glandium commented Feb 3, 2015

The documentation for opt.lg_dirty_mult says:
Per-arena minimum ratio (log base 2) of active to dirty
pages. Some dirty unused pages may be allowed to accumulate,
within the limit set by the ratio (or one chunk worth of dirty
pages, whichever is greater) (...)

The restriction in parentheses currently doesn't happen. This makes
jemalloc aggressively madvise(), which in turns increases the amount
of page faults significantly.

For instance, this resulted in several(!) hundred(!) milliseconds
startup regression on Firefox for Android.

This may require further tweaking, but starting with actually doing
what the documentation says is a good start.

Make opt.lg_dirty_mult work as documented
The documentation for opt.lg_dirty_mult says:
    Per-arena minimum ratio (log base 2) of active to dirty
    pages.  Some dirty unused pages may be allowed to accumulate,
    within the limit set by the ratio (or one chunk worth of dirty
    pages, whichever is greater) (...)

The restriction in parentheses currently doesn't happen. This makes
jemalloc aggressively madvise(), which in turns increases the amount
of page faults significantly.

For instance, this resulted in several(!) hundred(!) milliseconds
startup regression on Firefox for Android.

This may require further tweaking, but starting with actually doing
what the documentation says is a good start.
@jasone

This comment has been minimized.

Copy link
Member

jasone commented Feb 4, 2015

@jasone jasone merged commit 6505733 into jemalloc:dev Feb 4, 2015

@jasone

This comment has been minimized.

Copy link
Member

jasone commented Feb 4, 2015

Thanks!

@toddlipcon

This comment has been minimized.

Copy link

toddlipcon commented Mar 7, 2016

Was there ever any progress with a time-based hysteresis here? I'm trying out jemalloc and some of our micro-benchmarks have big regressions due to increased page faults. Seting lg_dirty_mult=-1 of course works around the issues in micro-benchmarks, but a time based heuristic would probably be more generally applicable.

@jasone

This comment has been minimized.

Copy link
Member

jasone commented Mar 7, 2016

@toddlipcon, yes, jemalloc 4.1.0 implements decay-based purging. It's currently opt-in, but you can universally enable it by specifying --with-malloc-conf=purge:decay during configuration. See the ChangeLog and manual for more information.

@toddlipcon

This comment has been minimized.

Copy link

toddlipcon commented Mar 7, 2016

Thanks, I'll give that a try. I am on the latest release but didn't opt-in. Will report back on the mailing list if the page fault rate doesn't improve.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.