You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by da...@apache.org on 2018/06/18 17:41:26 UTC

[couchdb] 02/02: Call `set_mqd_off_heap` for critical processes

This is an automated email from the ASF dual-hosted git repository.

davisp pushed a commit to branch add-set-mqd-off-heap
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 8e6c8f7f948cb73a47fb2b30fbcdec27ed881593
Author: Paul J. Davis <pa...@gmail.com>
AuthorDate: Mon Jun 18 12:39:30 2018 -0500

    Call `set_mqd_off_heap` for critical processes
    
    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.
---
 src/couch/src/couch_server.erl         | 2 ++
 src/couch_log/src/couch_log_server.erl | 1 +
 src/mem3/src/mem3_shards.erl           | 1 +
 src/rexi/src/rexi_server.erl           | 1 +
 4 files changed, 5 insertions(+)

diff --git a/src/couch/src/couch_server.erl b/src/couch/src/couch_server.erl
index 05af0ed..903eb09 100644
--- a/src/couch/src/couch_server.erl
+++ b/src/couch/src/couch_server.erl
@@ -210,6 +210,8 @@ close_db_if_idle(DbName) ->
 
 
 init([]) ->
+    couch_util:set_mqd_off_heap(),
+
     % Mark pluggable storage engines as a supported feature
     config:enable_feature('pluggable-storage-engines'),
 
diff --git a/src/couch_log/src/couch_log_server.erl b/src/couch_log/src/couch_log_server.erl
index be44af8..ea5def8 100644
--- a/src/couch_log/src/couch_log_server.erl
+++ b/src/couch_log/src/couch_log_server.erl
@@ -58,6 +58,7 @@ log(Entry) ->
 
 
 init(_) ->
+    couch_util:set_mqd_off_heap(),
     process_flag(trap_exit, true),
     {ok, #st{
         writer = couch_log_writer:init()
diff --git a/src/mem3/src/mem3_shards.erl b/src/mem3/src/mem3_shards.erl
index c84b873..da3b69a 100644
--- a/src/mem3/src/mem3_shards.erl
+++ b/src/mem3/src/mem3_shards.erl
@@ -184,6 +184,7 @@ handle_config_terminate(_Server, _Reason, _State) ->
     erlang:send_after(?RELISTEN_DELAY, whereis(?MODULE), restart_config_listener).
 
 init([]) ->
+    couch_util:set_mqd_off_heap(),
     ets:new(?SHARDS, [
         bag,
         public,
diff --git a/src/rexi/src/rexi_server.erl b/src/rexi/src/rexi_server.erl
index 3d3f272..954ca88 100644
--- a/src/rexi/src/rexi_server.erl
+++ b/src/rexi/src/rexi_server.erl
@@ -39,6 +39,7 @@ start_link(ServerId) ->
     gen_server:start_link({local, ServerId}, ?MODULE, [], []).
 
 init([]) ->
+    couch_util:set_mqd_off_heap(),
     {ok, #st{}}.
 
 handle_call(get_errors, _From, #st{errors = Errors} = St) ->

-- 
To stop receiving notification emails like this one, please contact
davisp@apache.org.