On 08/17/2010 11:58 AM, Arjan van de Ven wrote:
On 8/17/2010 11:53 AM, Auke Kok wrote:
On 08/17/2010 11:51 AM, Arjan van de Ven wrote:
On 8/17/2010 11:27 AM, Michael Leibowitz wrote:
On Tue, 2010-08-17 at 11:15 -0700, Auke Kok wrote:

I did a quick strace scan on a crond install and didn't see anything
shocking, it's actually rather clean - only does reads and stats
once a
minute, which shouldn't dirty anything.

Would patching to use (http://lwn.net/Articles/296578/) range_timers
make it better?

we have an application level heartbeat service in our OS that is more
suitable for such use than
range timers... (the heartbeat service internally will use range timers
of course)

also, crond quickly scans /etc/crontab, so range timers would not
detect changes to this file...

that's what inotify is for.


I realize that (and it does that), but it's still doing a stat on those files as well...:


11:51:01.948360 stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2819, ...}) = 0
11:51:01.949099 stat64("cron", {st_mode=S_IFDIR|0700, st_size=0, ...}) = 0
11:51:01.949783 open("cron", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 6
11:51:01.950214 getdents(6, /* 2 entries */, 32768) = 32
11:51:01.950678 getdents(6, /* 0 entries */, 32768) = 0
11:51:01.950966 close(6)                = 0
11:51:01.951288 stat64("/etc/cron.d", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0 11:51:01.951931 open("/etc/cron.d", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 6
11:51:01.952483 getdents(6, /* 2 entries */, 32768) = 32
11:51:01.952895 getdents(6, /* 0 entries */, 32768) = 0
11:51:01.953192 close(6)                = 0
11:51:01.953484 stat64("/etc/crontab", 0xbfd69b7c) = -1 ENOENT (No such file or directory) 11:51:01.953837 inotify_add_watch(5, "cron", IN_ATTRIB|IN_CLOSE_WRITE|IN_MOVED_FROM|IN_MOVED_TO|IN_DELETE|IN_MOVE_SELF) = 1 11:51:01.954262 inotify_add_watch(5, "/etc/cron.d", IN_ATTRIB|IN_CLOSE_WRITE|IN_MOVED_FROM|IN_MOVED_TO|IN_DELETE|IN_MOVE_SELF) = 2 11:51:01.954625 inotify_add_watch(5, "/etc/crontab", IN_ATTRIB|IN_CLOSE_WRITE|IN_MOVED_FROM|IN_MOVED_TO|IN_DELETE|IN_MOVE_SELF) = -1 ENOENT (No such file or directory)
11:51:01.954973 inotify_rm_watch(5, -1) = -1 EINVAL (Invalid argument)

_______________________________________________
MeeGo-dev mailing list
MeeGo-dev@meego.com
http://lists.meego.com/listinfo/meego-dev

Reply via email to