[Xapian-tickets] [Xapian] #222: omindex should make use of O_NOATIME where available

Xapian nobody at xapian.org
Wed Oct 27 14:35:24 BST 2010


#222: omindex should make use of O_NOATIME where available
-------------------------+--------------------------------------------------
 Reporter:  olly         |        Owner:  olly     
     Type:  enhancement  |       Status:  assigned 
 Priority:  normal       |    Milestone:  1.2.x    
Component:  Omega        |      Version:  SVN trunk
 Severity:  normal       |   Resolution:           
 Keywords:               |    Blockedby:           
 Platform:  All          |     Blocking:           
-------------------------+--------------------------------------------------

Comment(by olly):

 Ubuntu now defaults to mounting partitions relatime, which means the atime
 doesn't get updated in most cases.  I've not looked at what other distros
 do, but I suspect it's increasingly common as atime updates tend to kill
 I/O performance.

 We could just check the euid of the process, and see if it is 0 or equal
 to the owner of the file (in omindex we've already called stat() on the
 file at the point where we read it, so we can check the owner for free) -
 if either is true, then we try O_NOATIME.

 That seems simpler and more robust than caching failure per directory or
 FS.  It misses the case where the process has CAP_FOWNER but isn't root,
 and doesn't own the files being indexed, but we just fail to try O_NOATIME
 in this case which means it would be handled just as it is now.

-- 
Ticket URL: <http://trac.xapian.org/ticket/222#comment:10>
Xapian <http://xapian.org/>
Xapian



More information about the Xapian-tickets mailing list