Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

open files with O_NOATIME if possible #113

Merged
merged 1 commit into from
Dec 8, 2014
Merged

open files with O_NOATIME if possible #113

merged 1 commit into from
Dec 8, 2014

Conversation

c4rlo
Copy link
Contributor

@c4rlo c4rlo commented Sep 12, 2014

The Linux manpage for open(2) describes O_NOATIME thus:

   O_NOATIME (since Linux 2.6.8)
          Do  not  update the file last access time (st_atime in the inode) when the file is read(2).  This flag
          is intended for use by indexing or backup programs, where its use can significantly reduce the  amount
          of  disk  activity.  This flag may not be effective on all filesystems.  One example is NFS, where the
          server maintains the access time.

Change attic to provide this flag where possible.

Unrelatedly, fix a typo in a comment.

@skarekrow
Copy link

Does this impede usage on other systems? Solaris, *BSD's and such?
On 9/12/2014 4:33 PM, c4rlo wrote:

The Linux manpage for |open(2)| describes |O_NOATIME| thus:

| O_NOATIME (since Linux 2.6.8)
Do not update the file last access time (st_atime in the inode) when the file is read(2). This flag
is intended for use by indexing or backup programs, where its use can significantly reduce the amount
of disk activity. This flag may not be effective on all filesystems. One example is NFS, where the
server maintains the access time.
|

Change attic to provide this flag where possible.

Unrelatedly, fix a typo in a comment.


    You can merge this Pull Request by running

git pull https://github.com/c4rlo/attic noatime

Or view, comment on, or merge it at:

#113

    Commit Summary


Reply to this email directly or view it on GitHub
#113.

@c4rlo
Copy link
Contributor Author

c4rlo commented Sep 14, 2014

It should do. If os.O_NOATIME doesn't exist, I fall back to the old behaviour.

@c4rlo
Copy link
Contributor Author

c4rlo commented Sep 14, 2014

I've actually been trying to test this under FreeBSD. Unfortunately, building cython fails with a segfault.

But like I said, it should work under all systems.

@skarekrow
Copy link

Ok that's great to hear. Odd you're having segfaults building cython, but obviously that's not related to this change. If he merges it, I use FreeBSD as my home server, so I'll know if something doesn't function hopefully.

@anarcat
Copy link

anarcat commented Nov 18, 2014

this seems to be an important change that should be merged in...

@meskio
Copy link

meskio commented Dec 7, 2014

I agree this is an important change that should be merged. I test it and it works fine in my system and I'm using it.

@jborg can I do something to help on getting this pull-req merged?

jborg added a commit that referenced this pull request Dec 8, 2014
open files with O_NOATIME if possible
@jborg jborg merged commit 5d96434 into jborg:master Dec 8, 2014
@jborg
Copy link
Owner

jborg commented Dec 8, 2014

Looks good, thanks!

@anarcat
Copy link

anarcat commented Dec 9, 2014

awesome!!! thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants