Subject: Re: Efficiency of caller/toss

From: Sergey Matveev <[email-masked]>
Date: Fri, 20 Aug 2021 13:28:17 +0300

*** 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).

-- 
Sergey Matveev (http://www.stargrave.org/)
OpenPGP: CF60 E89A 5923 1E76 E263  6422 AE1A 8109 E498 57EF