Bug 240073

Summary: cron should use inotify instead of constantly stat'ing files.
Product: [Fedora] Fedora Reporter: Dave Jones <davej>
Component: cronieAssignee: Marcela Mašláňová <mmaslano>
Status: CLOSED RAWHIDE QA Contact: Brock Organ <borgan>
Severity: medium Docs Contact:
Priority: medium    
Version: 9CC: bnocera, mgarski, mozilla_bugs, pfrields
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-06-04 07:56:11 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 204948    

Description Dave Jones 2007-05-14 16:57:29 EDT
strace crond, and you'll see it wakes up once a minute to stat /etc/crontab,
/etc/cron.d and /var/spool/cron to look if anything changed.
This prevents the disk from ever spinning down when the system is otherwise idle.

If crond used inotify to find out that these files/dirs changed, it wouldn't
have to keep waking up at all.
Comment 1 Marcela Mašláňová 2007-07-24 03:51:01 EDT
Thanks for comment, I'm working on it in upstream and I'm planning after some
testing push it to rawhide.
Comment 2 Nick Lamb 2008-01-27 15:01:59 EST
How's this work coming? This is a very small contributor to unnecessary wakeups,
and with relatime it no longer keeps disks spun up either, but every little
helps, especially in core features like the cron daemon that can't really be
disabled.
Comment 3 Marcela Mašláňová 2008-01-31 06:47:22 EST
I agree with you that's important feature.
I rewrote the essential part of code, but there are still some features, options
which don't work yet. 
I'm not sure if I make it to F-9 release, because I definitely don't want push
untested package.
Comment 4 Bug Zapper 2008-05-13 22:54:17 EDT
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping