HotLoop Flow 2.16.2 release notes
HotLoop Flow 2.16.2 makes a big flow cheap to run. A plant running 12,000 nodes at about 3,000 messages a second, with nobody looking at a dashboard, was sitting at its CPU limit. The same flow now takes about a third of the CPU and less than half the memory. Nothing in your flows, settings or chart changes.
What changed
Section titled “What changed”- Function nodes stopped rebuilding their JavaScript runtime. Each function node kept its own small pool of runtimes, and Go’s garbage collector emptied every one of those pools each cycle. A flow with thousands of function nodes then built a new runtime for most messages, and the garbage from doing that set off the next collection. The profile of a 12,000 node flow put 41% of its CPU there. Runtimes now come from one shared list the collector cannot empty. A runtime whose global object a function changed is thrown away and never handed to another node.
- A queued message takes 24 bytes instead of 64. Every node’s inbox is allocated at its full 1,024 slots when the node starts, so in a 12,000 node flow the inboxes alone were about 800 MB of memory the collector had to scan on every cycle. They are now about 300 MB.
- The dashboard stops preparing updates nobody can see. With no page open, the dashboard built a JSON update of every changed widget ten times a second and threw it away. It now clears the changes and builds nothing. A page that opens later still starts from the full state, points included.
- The budget is scaled by a fixed spin loop, so a slower machine is not punished. It fails on 2.16.1.
- The Helm index keeps every published version. Publishing a chart used to rebuild
index.yamlfrom the new version alone, so a customer pinned to an older chart could not re-render once a newer one was out. It now keeps every version that Pages holds. - The browser tests wait up to 20 seconds per check. On a loaded runner the page took longer than the 5 second default to show a value the runtime had sent. This changes the tests only.
What it fixes, with numbers
Section titled “What it fixes, with numbers”Measured on one machine, the same synthetic flow, about 2,930 messages a second, no client connected:
| Details | 2.16.1 | 2.16.2 |
|---|---|---|
| CPU used | 0.79 cores | 0.29 cores |
| CPU per 1,000 messages | 268 ms | 99 ms |
| Memory held by the idle flow | 799 MB | 333 MB |
New settings
Section titled “New settings”None.
Upgrade
Section titled “Upgrade”A plain helm upgrade to the 2.16.2 image and chart, or the new tag in your Quadlet unit. Nothing happens on first start and nothing needs migrating. A flow file loads and saves byte for byte as before. This release builds the amd64 image. The 2.16 and 2 tags keep the arm64 image they already hold from 2.16.1, and arm64 comes back in 2.16.3. If you are on arm64, stay on 2.16.1 until then.
Image: ghcr.io/hotloop-io/hotloop-flow:2.16.2, linux/amd64. Chart: https://hotloop.io/hotloop-flow/. The README at this tag has the rest, with pictures: https://github.com/HotLoop-io/hotloop-flow/blob/v2.16.2/README.md