Re: Efficiency of caller/toss

Sergey Matveev
2021-08-20T10:29:01Z

[-- Attachment #1: Type: text/plain, Size: 852 bytes --]

*** John Goerzen [2021-08-19 21:24]:
>I found nncp-caller was using about 3.5% of CPU while
>maintaining an otherwise-idle TCP connection, and less otherwise. I wonder
>if we could have a paremeter to decrease the rescan interval there?

Parametrizing those timeouts, sleep times of course can be done and
moved to configuration file. It will be tradeoff between even delays
(how fast we react on new packets appearance) and CPU time. But at first
I think I should look about possibly existing to use epoll/inotify/kqueue
solution for Go, that will eliminate expensive regular syscalling at all.
And of course leaving current while+sleep+dir-scan algorithm as a fallback
for unsupported systems (kqueue/epoll are OS-specific).