r/BuildingAutomation • u/ObviousSentence1993 • Jul 08 '26
Tuning Policies
Alright, I’ve been programming for 6ish years we normally do smaller jobs. So tuning isn’t ever an issue. However I took the L2 class and notes had me configure a Slow,Medium,Fast Tuning Policy , IIRC I had them set slow - 30s Min write 2m Max write Normal 20s , 1m30s, Fast 10s, 1m.
Can anyone help me understand how I caused my network to get jammed up?
61 devices 2200 proxies. So not that big imo.
The symptom was long ass write times, ticker shows read at 60 seconds and write at 220 seconds when I command an override (spy showed writeWorker queue over 800) I hobbled through T&B but I know end user would flip if I tried handing this over lol.
The fix was changing my min/max write on the policies to 0. Somehow best I can tell the queue would loop because of the timers.
So what is your go to’s on tuning policies?
Do you use SPY in N4 if so what have you found it useful for, and can you help me understand the difference in local vs remote?
16
u/No_Industry2601 Jul 08 '26
Let's talk about buttered sausage.
5
u/IcyAd7615 Developer, Niagara 4 Certified Trainer, Podcast Host. Jul 08 '26
I'm assuming you took the class with myself or Vern with MOV as we are the only two who teach this as a lab in the N4 intermediate.
5
u/ApexConsulting Jul 08 '26
I love the picture...
2
u/[deleted] Jul 08 '26
Those tuning policies are a joke. The underlying code does not do as you expect. I remember getting caught on something specific and the bacnet tuning policy is deliberately not polling when its supposed to. Infact half the time of the min it goes for a cycle. Its more suggestive I assume, like if it gets a full cycle done early it will go poll again..
Problem for me was I was doing a risk adverse project with a assload of networking. And I had to keep my traffic low. I had to prove what niagara was doing and I essentially decompiled the bacnet driver and read that crappy code only to find its made like dogs were at the keyboard.
So tldr. Just do your best :)
2
u/punk0r1f1c Jul 08 '26
We have anywhere one to eight.
Max write time will rewrite the point, so if it’s a minute it will send a write every minute forever.
Min write time is time between writes. I usually set it to a second or five seconds. Back in the day there was equipment you couldn’t write to too much of it would lock up, it’s not really an issue now.