summaryrefslogtreecommitdiff
path: root/example
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2023-05-08 19:03:38 +0200
committerLibravatar GitHub <noreply@github.com>2023-05-08 18:03:38 +0100
commitcbb9e2d3f04e06365bfe42769f02c8b667ce531d (patch)
tree9de8a24096c352919232b1774d21e2440fdf3a7f /example
parent[bugfix] Punycode fixes (#1743) (diff)
downloadgotosocial-cbb9e2d3f04e06365bfe42769f02c8b667ce531d.tar.xz
[chore/performance] Make sender multiplier configurable (#1750)
Diffstat (limited to 'example')
-rw-r--r--example/config.yaml32
1 files changed, 32 insertions, 0 deletions
diff --git a/example/config.yaml b/example/config.yaml
index 1bba4dad4..598e29168 100644
--- a/example/config.yaml
+++ b/example/config.yaml
@@ -848,3 +848,35 @@ advanced-throttling-multiplier: 8
# Examples: [30s, 10s, 5s, 1m]
# Default: 30s
advanced-throttling-retry-after: "30s"
+
+# Int. CPU multiplier for the amount of goroutines to spawn in order to send messages via ActivityPub.
+# Messages will be batched so that at most multiplier * CPU count messages will be sent out at once.
+# This can be tuned to limit concurrent POSTing to remote inboxes, preventing your instance CPU
+# usage from skyrocketing when an account with many followers posts a new status.
+#
+# Messages are split among available senders, and each sender processes its assigned messages in serial.
+# For example, say a user with 1000 followers is on an instance with 2 CPUs. With the default multiplier
+# of 2, this means 4 senders would be in process at once on this instance. When the user creates a new post,
+# each sender would end up iterating through about 250 Create messages + delivering them to remote instances.
+#
+# If you set this to 0 or less, only 1 sender will be used regardless of CPU count. This may be
+# useful in cases where you are working with very tight network or CPU constraints.
+#
+# Example values for multiplier 2 (default):
+#
+# 1 cpu = 2 concurrent senders
+# 2 cpu = 4 concurrent senders
+# 4 cpu = 8 concurrent senders
+#
+# Example values for multiplier 4:
+#
+# 1 cpu = 4 concurrent senders
+# 2 cpu = 8 concurrent senders
+# 4 cpu = 16 concurrent senders
+#
+# Example values for multiplier <1:
+#
+# 1 cpu = 1 concurrent sender
+# 2 cpu = 1 concurrent sender
+# 4 cpu = 1 concurrent sender
+advanced-sender-multiplier: 2