From c524e35ac4900199d54dbbee3ac90e269be156cc Mon Sep 17 00:00:00 2001 From: James Mulcahy Date: Sat, 31 Oct 2026 12:30:34 -0700 Subject: [PATCH] Docs: recommend disabling Nagle's algorithm on the MQTT server Most MQTT messages between the manager and the panels are small, and with Nagle's algorithm on, the broker holds each one back until the data before it has been acknowledged. On a real panel this delayed the replies to the subscriptions made when switching rooms by up to ~240 ms. Add a tip to the pre-requisites page recommending turning it off, and how to do it in Mosquitto (set_tcp_nodelay, 2.0+). The panel side is handled in the firmware (NSPManager/NSPanelManager-firmware#59). Co-Authored-By: Claude Opus 5.5 --- docs/docs/getting-started/pre-requisites.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/docs/getting-started/pre-requisites.md b/docs/docs/getting-started/pre-requisites.md index 0d2e3d024..3b057ac68 100644 --- a/docs/docs/getting-started/pre-requisites.md +++ b/docs/docs/getting-started/pre-requisites.md @@ -18,6 +18,21 @@ In order to make valuable use of NSPanel Manager you must full-fill the followin * A linux machine having docker * ... +:::tip Disable Nagle's algorithm on your MQTT server +By default, TCP holds back a small packet until the data sent before it has been acknowledged +([Nagle's algorithm](https://en.wikipedia.org/wiki/Nagle%27s_algorithm)). Most MQTT messages between +NSPanel Manager and your panels are small, so this can delay them by up to a few hundred milliseconds, +for example when you switch rooms on a panel. We recommend disabling Nagle's algorithm on your MQTT server. + +If you use Mosquitto, add this line to your `mosquitto.conf` and restart the broker: + +``` +set_tcp_nodelay true +``` + +This option needs Mosquitto 2.0 or newer. Older versions refuse to start with it. +::: + When you match all the requirements, you are then ready for the first step: [Flash our custom firmware into your NSPanel](./flash-nspanel). :::info