user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
From: Jan Kiszka <jan.kiszka@web.de>
To: Eric Wong <e@80x24.org>
Cc: meta@public-inbox.org
Subject: Re: High polling frequency of public-inbox-watch
Date: Sun, 11 Aug 2019 19:01:46 +0200	[thread overview]
Message-ID: <e746364e-fad8-96f4-9a58-fea37c423ad5@web.de> (raw)
In-Reply-To: <20190811165136.py6bfldsg6tz4wak@dcvr>

On 11.08.19 18:51, Eric Wong wrote:
> Jan Kiszka <jan.kiszka@web.de> wrote:
>> Hi,
>>
>> I'm running public-inbox for some months very successfully on my server. Great work!
>
> Good to know :>
>
>> On thing though: I realized that the public-inbox-watch service is scanning the
>> configured maildirs with a sleep delay of just 2 seconds, and that causes a CPU
>> load of 20-30% on my box. Can this be configured to a more moderate rate? I
>> would have patched this already, but I'm not seeing in the code where these 2
>> seconds may come from.
>
> I guess it's from Filesys::Notify::Simple.  Which OS are you using?
>

Debian Linux, Stretch.

> It should be able to use inotify / kqueue depending on whether
> you're on Linux or FreeBSD (I haven't tested other BSDs).  It
> uses Linux::Inotify2 on Linux which AFAIK all deb-based distros
> will pull in, and Filesys::Notify::KQueue on KQueue-supported
> systems.
>

I was expecting inotify usage as well, but I'm not seeing that in strace, rather
a long *stat series, and then nanosleep(2)... Hah!

     apt install liblinux-inotify2-perl

solved it. Did I miss a note in the readme?

Jan

  reply	other threads:[~2019-08-11 17:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-11 16:43 High polling frequency of public-inbox-watch Jan Kiszka
2019-08-11 16:51 ` Eric Wong
2019-08-11 17:01   ` Jan Kiszka [this message]
2019-08-11 17:33     ` Eric Wong
2019-10-15  3:59       ` [PATCH] INSTALL: recommend inotify|kqueue modules for -watch Eric Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://public-inbox.org/README

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e746364e-fad8-96f4-9a58-fea37c423ad5@web.de \
    --to=jan.kiszka@web.de \
    --cc=e@80x24.org \
    --cc=meta@public-inbox.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).