From 124aa454fbd5bfb6610bcfd51e4ea59aba6889d0 Mon Sep 17 00:00:00 2001 From: Feng Lee Date: Thu, 23 Feb 2017 16:53:47 +0800 Subject: [PATCH] Add 'mqtt.conn.force_gc_count' config to tune GC of MQTT connection --- etc/emq.conf | 7 +++++++ priv/emq.schema | 9 +++++++++ 2 files changed, 16 insertions(+) diff --git a/etc/emq.conf b/etc/emq.conf index f042bd279..4c3ab73c9 100644 --- a/etc/emq.conf +++ b/etc/emq.conf @@ -106,6 +106,13 @@ mqtt.max_clientid_len = 1024 ## Max Packet Size Allowed, 64K by default. mqtt.max_packet_size = 64KB +##-------------------------------------------------------------------- +## MQTT Connection +##-------------------------------------------------------------------- + +## Force GC: pos_integer +mqtt.conn.force_gc_count = 100 + ##-------------------------------------------------------------------- ## MQTT Client ##-------------------------------------------------------------------- diff --git a/priv/emq.schema b/priv/emq.schema index 1e3ba1778..92ca118d2 100644 --- a/priv/emq.schema +++ b/priv/emq.schema @@ -316,6 +316,15 @@ end}. {max_packet_size, cuttlefish:conf_get("mqtt.max_packet_size", Conf)}] end}. +%%-------------------------------------------------------------------- +%% MQTT Connection +%%-------------------------------------------------------------------- + +%% @doc Force the client to GC: integer +{mapping, "mqtt.conn.force_gc_count", "emqttd.conn_force_gc_count", [ + {datatype, integer} +]}. + %%-------------------------------------------------------------------- %% MQTT Client %%--------------------------------------------------------------------