From: Thomas Rast <trast@student.ethz.ch>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Karsten Blees" <karsten.blees@gmail.com>,
"Duy Nguyen" <pclouds@gmail.com>,
"Ramkumar Ramachandra" <artagnon@gmail.com>,
"Git List" <git@vger.kernel.org>,
"Torsten Bögershausen" <tboegi@web.de>,
"Robert Zeh" <robert.allan.zeh@gmail.com>,
"Jeff King" <peff@peff.net>,
"Erik Faye-Lund" <kusmabite@gmail.com>,
"Drew Northup" <n1xim.email@gmail.com>
Subject: Re: [RFC/PATCH] Documentation/technical/api-fswatch.txt: start with outline
Date: Sat, 16 Mar 2013 15:21:52 +0100 [thread overview]
Message-ID: <87ehffv30f.fsf@pctrast.inf.ethz.ch> (raw)
In-Reply-To: <7vtxof146d.fsf@alter.siamese.dyndns.org> (Junio C. Hamano's message of "Wed, 13 Mar 2013 12:38:02 -0700")
Junio C Hamano <gitster@pobox.com> writes:
> Karsten Blees <karsten.blees@gmail.com> writes:
>
>> However, AFAIK inotify doesn't work recursively, so the daemon
>> would at least have to track the directory structure to be able to
>> register / unregister inotify handlers as directories come and go.
>
> Yes, and you would need one inotify per directory but you do not
> have an infinite supply of outstanding inotify watch (wasn't the
> limit like 8k per a single uid or something?), so the daemon must be
> prepared to say "I'll watch this, that and that directories, but the
> consumers should check other directories themselves."
Those are tunable limits though. For example I run this silly hack
https://github.com/trast/watch
with the shell snippets to be able to quickly cd a shell to where
something recently happened. I am able to watch most of my "working
set" even under default limits, which here (opensuse tumbleweed, kernel
3.8.x, x86_64) are
$ cat /proc/sys/fs/inotify/max_user_watches
65536
$ cat /proc/sys/fs/inotify/max_user_instances
128
I'm not sure if other distros impose tighter limits by default, but as
it stands you're not very likely to hit the 65k watches limit in any
given repo. It seems more likely that you might hit the 128 instances
limit if we go with a design that uses one daemon per repo, if you run a
script that accesses many repos. For example, in an android tree I have
lying around,
$ repo list | wc -l
297
That alone might indicate it would be a good idea to have one "global"
git-agent that starts on demand, rather than a per-repo daemon.
Otherwise we'd have to find a way to discover "old" daemons and tell
them to quit when we hit max_user_instances.
--
Thomas Rast
trast@{inf,student}.ethz.ch
next prev parent reply other threads:[~2013-03-16 14:23 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-10 20:17 [RFC/PATCH] Documentation/technical/api-fswatch.txt: start with outline Ramkumar Ramachandra
2013-03-11 17:05 ` Heiko Voigt
2013-03-12 9:43 ` Ramkumar Ramachandra
2013-03-12 9:50 ` Erik Faye-Lund
2013-03-12 9:55 ` Jeff King
2013-03-12 23:21 ` Karsten Blees
2013-03-13 1:03 ` Duy Nguyen
2013-03-13 17:50 ` Karsten Blees
2013-03-13 19:38 ` Junio C Hamano
2013-03-14 10:58 ` Duy Nguyen
2013-03-15 16:27 ` Pete Wyckoff
2013-03-16 14:21 ` Thomas Rast [this message]
2013-03-18 8:24 ` Ramkumar Ramachandra
2013-03-18 10:07 ` Thomas Rast
2013-03-25 10:44 ` Ramkumar Ramachandra
2013-03-25 10:59 ` Duy Nguyen
2013-03-25 11:13 ` Ramkumar Ramachandra
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ehffv30f.fsf@pctrast.inf.ethz.ch \
--to=trast@student.ethz.ch \
--cc=artagnon@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=karsten.blees@gmail.com \
--cc=kusmabite@gmail.com \
--cc=n1xim.email@gmail.com \
--cc=pclouds@gmail.com \
--cc=peff@peff.net \
--cc=robert.allan.zeh@gmail.com \
--cc=tboegi@web.de \
/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.
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 NNTP newsgroup(s).