-
Notifications
You must be signed in to change notification settings - Fork 240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Long default network flush time #244
Comments
I'm not particularly attached to 500ms, but what's the use case you're looking at here that would need a lower value? The lower limit is going to depend on the main loop's sleep time, so ~50ms (if demodulating) or 100ms (if in net-only mode) minimum. The flush interval only kicks in if data has not been otherwise written due to the buffer filling, which happens at the ~1300 byte mark by default; so the effective interval is going to be <500ms anyway for data rates above about 2.6kB/s |
General timing precision consistency for aggregator programs for example. Doesn't hurt for mlat-client if you add if you add satellite internet or something to the latency (ok this is kinda far fetched).
So that means the latency behaviour changes unexpectedly when there is low traffic. I'm not saying i have a really good argument here, but i don't really see a downside of lowering that interval. |
I'd guess that 95% of installs are only transporting raw data locally (same host, or a host on the same local network) so maybe that's a good argument for pushing the latency right down, since lots of small writes doesn't matter so much there. |
The dump1090 network outputs don't offer timing guarantees or real-time timestamps, but it is still useful for aggregators to locally timestamp messages they receive from dump1090 on a best-effort basis. With lower message rates, 500 ms of flush interval can result in significant jitter for those timestamps. Most installs send data only on the local network or non-metered internet connections. If necessary this default can be adjusted via --net-ro-interval by users who require a longer flush interval for some reason. Reduce the default flush time to 90 ms to reliably flush every 2nd demodulation buffer when talking to an SDR (50 ms loop) and every loop iteration when running network-only (100 ms loop). fixes: flightaware#244
The only concern of going to 100 or 50 ms might be people on metered mobile data connections. DSL connections won't be affected by even 50 ms flush interval. On readsb i'm defaulting to 50 ms (with some extra special casing if it's set at 50 ms or lower and demodulating, then it flushes immediately after the demodulation buffer is processed). 100 ms will be a big improvement over 500 ms and good enough for almost all situations. Maybe go for 90 ms just to make sure the 100 ms timed net only loop more consistently flushes instead of comparing roughly 100 ms to 100 ms. I'll just make a PR for 90 ms, if you would rather go to straight to 45 ms i can easily amend the PR. |
dump1090/dump1090.c
Line 125 in a80ba8f
500 ms seems quite a long default.
50 or 100 ms might be a good choice and not too many packets still?
The text was updated successfully, but these errors were encountered: