Yummy incron
Martin Langhoff
martin at laptop.org
Tue Jun 24 20:54:30 EDT 2008
Looking for a (memory, cpu, power) efficient way to trigger
events/scripts on the XS, I came across incrond. It weights ~600KB
according to ps_mem.py, and it looks like the kind of tool we want to
be using. There are a few processes I have on the XS that signal
completion by touching a file in a tmpdir, so that a different process
(with different privileges) can perform other steps. Using incron
rather than poll frequently from an in-memory process or crond seems
much smarter.
<rant>
Yes, this a bit like DBus, but DBus was designed for a desktop with
Gobs Of Mighty RAM, and it requires that your process must be running
in memory, and that it'd be forking/threaded if you want to process
stuff in parallel. This means our (mostly python) processes are
sitting idly on memory we don't have the luxury to spare. And that
little or nothing happens in parallel.
(The above usage pattern of DBus is interesting in that it encourages
programmers of such services into building them even bigger, more
complex, and more powerful - as it's not feasible to have many small
processes that get spawned to do simple things well. Unless you build
your own incrond based on DBus I guess.)
</rant>
I'll be playing with this more, but if it works roughly as the doco
promises, the XS is going to get a whole lot of incron love :-) so I
thought I'd mention it.
cheers,
m
--
martin at laptop.org -- School Server Architect
- ask interesting questions
- don't get distracted with shiny stuff - working code first
- http://wiki.laptop.org/go/User:Martinlanghoff
More information about the Devel
mailing list