public inbox for nncp-devel@lists.cypherpunks.ru
Atom feed
From: Sergey Matveev <stargrave@stargrave•org>
To: nncp-devel@lists.cypherpunks.ru
Subject: Re: Efficiency of caller/toss
Date: Fri, 20 Aug 2021 13:28:17 +0300	[thread overview]
Message-ID: <YR+DwavuZHd7wF6R@stargrave.org> (raw)
In-Reply-To: <871r6og8ft.fsf@complete.org>

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

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2021-08-20 10:29 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-18 13:56 Efficiency of caller/toss John Goerzen
2021-08-18 18:14 ` Sergey Matveev
2021-08-18 19:20   ` John Goerzen
2021-08-18 19:29     ` Sergey Matveev
2021-08-20  2:24       ` John Goerzen
2021-08-20 10:28         ` Sergey Matveev [this message]
2021-08-20 19:19           ` John Goerzen
2021-08-21 18:38             ` Sergey Matveev
2021-08-23 14:10           ` Sergey Matveev
2021-09-02  9:06             ` Sergey Matveev
2021-09-02 13:07               ` John Goerzen
2021-09-02 13:34                 ` Sergey Matveev
2021-08-20 10:23     ` Sergey Matveev