Enlarge performance args for internal zone (#3154)

This commit is contained in:
JianBo He 2020-01-06 09:51:55 +08:00 committed by GitHub
parent 7d3a08dc13
commit 0c3e863ac1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 16 deletions

View File

@ -603,9 +603,9 @@ zone.external.force_gc_policy = 1000|1MB
## Numbers delimited by `|'. Zero or negative is to disable.
##
## Default:
## - 8000|800MB on ARCH_64 system
## - 1000|100MB on ARCH_32 sytem
## zone.external.force_shutdown_policy = 8000|800MB
## - 10000|32MB on ARCH_64 system
## - 10000|16MB on ARCH_32 sytem
## zone.external.force_shutdown_policy = 10000|32MB
## Maximum MQTT packet size allowed.
##
@ -798,17 +798,17 @@ zone.internal.max_subscriptions = 0
## See zone.$name.max_inflight
##
## Value: Number
zone.internal.max_inflight = 32
zone.internal.max_inflight = 128
## See zone.$name.max_awaiting_rel
##
## Value: Number
zone.internal.max_awaiting_rel = 100
zone.internal.max_awaiting_rel = 1000
## See zone.$name.max_mqueue_len
##
## Value: Number >= 0
zone.internal.max_mqueue_len = 1000
zone.internal.max_mqueue_len = 10000
## Whether to enqueue Qos0 messages.
##
@ -820,6 +820,13 @@ zone.internal.mqueue_store_qos0 = true
## Value: on | off
zone.internal.enable_flapping_detect = off
## See zone.$name.force_shutdown_policy
##
## Default:
## - 10000|32MB on ARCH_64 system
## - 10000|16MB on ARCH_32 sytem
zone.internal.force_shutdown_policy = 100000|256MB
## All the topics will be prefixed with the mountpoint path if this option is enabled.
##
## Variables in mountpoint path:
@ -829,12 +836,6 @@ zone.internal.enable_flapping_detect = off
## Value: String
## zone.internal.mountpoint = cloudbound/
## Whether use username replace client id
##
## Value: boolean
## Default: false
zone.internal.use_username_as_clientid = false
## Whether to ignore loop delivery of messages.(for mqtt v3.1.1)
##
## Value: true | false
@ -1050,14 +1051,14 @@ listener.tcp.internal.send_timeout_close = on
## See: listener.tcp.$name.recbuf
##
## Value: Bytes
## listener.tcp.internal.recbuf = 16KB
listener.tcp.internal.recbuf = 64KB
## The TCP send buffer(os kernel) for internal MQTT connections.
##
## See: http://erlang.org/doc/man/inet.html
##
## Value: Bytes
## listener.tcp.internal.sndbuf = 16KB
listener.tcp.internal.sndbuf = 64KB
## The size of the user-level software buffer used by the driver.
##

View File

@ -967,9 +967,9 @@ end}.
{DefaultLen, DefaultSize} =
case WordSize = erlang:system_info(wordsize) of
8 -> % arch_64
{8000, cuttlefish_bytesize:parse("800MB")};
{10000, cuttlefish_bytesize:parse("32MB")};
4 -> % arch_32
{1000, cuttlefish_bytesize:parse("100MB")}
{10000, cuttlefish_bytesize:parse("16MB")}
end,
{force_shutdown_policy, #{message_queue_len => DefaultLen,
max_heap_size => DefaultSize div WordSize