On Fri, Jul 6, 2012 at 5:10 PM, Dave Keck <dave...@gmail.com> wrote:Not your process, but you can at the filesystem mount level:
>> Since this should be asynchronous, I'd be surprised if this is causing a significant performance degradation...
>
> Thanks Shantonu! -- it was indeed updating the access time.
>
> Is there a supported way to prevent my process from updating the
> access time? My initial benchmarks show a 28% performance increase in
> processing 4000 photos (82 seconds before, 64 seconds after).
http://oroyphoto.com/2010/11/12/mac-os-x-noatime-settings-for-10-6/
Per process or per thread, apparently. The usage is to call sysctl(3)
with KERN_RAGEVNODE and one of 4 magic values:
/* KERN_RAGEVNODE types */
#define KERN_RAGE_PROC 1
#define KERN_RAGE_THREAD 2
#define KERN_UNRAGE_PROC 3
#define KERN_UNRAGE_THREAD 4
The IOS documentation suggests that it's to be used only by background
tasks which request rapid aging, but other than that, I can find no
mention of the recommended way to ask for rapid aging. Comments in
the kernel also suggest that when an open vnode is accessed by a
"normal" process, rapid aging is turned off.