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

Add set mqd off heap #1392

Merged
merged 2 commits into from
Jun 19, 2018
Merged

Add set mqd off heap #1392

merged 2 commits into from
Jun 19, 2018

Conversation

davisp
Copy link
Member

@davisp davisp commented Jun 18, 2018

Overview

Use process_flag(message_queue_data, off_heap) on critical processes on Erlang VMs that support it.

Testing recommendations

make eunit

Checklist

  • Code is written and works correctly;
  • Changes are covered by tests;
  • No user observable difference in behavior;

In Erlang VMs starting with version 19.0 have a new process_flag to
store messages off the process heap. This is extremely useful for
processes that can have huge numbers of messages in their mailbox. For
CouchDB this is most usually observed when couch_server backs up with a
large message queue which wedges the entire node.

This utility function will set a process's message_queue_data flag to
off_heap in a way that doesn't break builds of CouchDB on older Erlang
VMs while automatically enabling the flag on VMs that do support it.
@chewbranca
Copy link
Contributor

+1 although it would be nice to see ddoc_cache in here as well.

This uses the new `couch_util:set_mqd_off_heap/0` function to set
message queues to off_heap for some of our critical processes that
receive a significant amount of load in terms of message volume.
@davisp
Copy link
Member Author

davisp commented Jun 18, 2018

@chewbranca Added to ddoc_cache_lru.

@davisp davisp merged commit a13efba into master Jun 19, 2018
@nickva nickva deleted the add-set-mqd-off-heap branch December 18, 2019 19:50
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