diff options
author | Björn Gustavsson <[email protected]> | 2017-02-06 13:05:56 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2017-02-06 13:05:56 +0100 |
commit | e6f84e033a6a809a68f188c306151567c9854050 (patch) | |
tree | a086e68347854d5781c9793f7d460e15e9f9b66f /lib/kernel/src/rpc.erl | |
parent | d2901a3e6826cfdc3eec47fc4786e7fcad2d42c5 (diff) | |
parent | 5f7f86be7bc7ec7a1c9b0042ff08254dca063d76 (diff) | |
download | otp-e6f84e033a6a809a68f188c306151567c9854050.tar.gz otp-e6f84e033a6a809a68f188c306151567c9854050.tar.bz2 otp-e6f84e033a6a809a68f188c306151567c9854050.zip |
Merge pull request #1328 from bjorng/bjorn/kernel/off-heap-message/OTP-14142
Store messages for 'rex' and 'error_logger' off heap
OTP-14192
Diffstat (limited to 'lib/kernel/src/rpc.erl')
-rw-r--r-- | lib/kernel/src/rpc.erl | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/kernel/src/rpc.erl b/lib/kernel/src/rpc.erl index 21bff02214..bd6ea26678 100644 --- a/lib/kernel/src/rpc.erl +++ b/lib/kernel/src/rpc.erl @@ -67,17 +67,27 @@ %%------------------------------------------------------------------------ + +%% The rex server may receive a huge amount of +%% messages. Make sure that they are stored off heap to +%% avoid exessive GCs. + +-define(SPAWN_OPTS, [{spawn_opt,[{message_queue_data,off_heap}]}]). + %% Remote execution and broadcasting facility -spec start() -> {'ok', pid()} | 'ignore' | {'error', term()}. start() -> - gen_server:start({local,?NAME}, ?MODULE, [], []). + gen_server:start({local,?NAME}, ?MODULE, [], ?SPAWN_OPTS). -spec start_link() -> {'ok', pid()} | 'ignore' | {'error', term()}. start_link() -> - gen_server:start_link({local,?NAME}, ?MODULE, [], []). + %% The rex server process may receive a huge amount of + %% messages. Make sure that they are stored off heap to + %% avoid exessive GCs. + gen_server:start_link({local,?NAME}, ?MODULE, [], ?SPAWN_OPTS). -spec stop() -> term(). |