]> arthur.barton.de Git - bup.git/commit
save-cmd: open files with O_NOATIME on OSes that support it.
authorAvery Pennarun <apenwarr@gmail.com>
Fri, 12 Mar 2010 21:49:32 +0000 (16:49 -0500)
committerAvery Pennarun <apenwarr@gmail.com>
Sat, 13 Mar 2010 02:17:50 +0000 (21:17 -0500)
commit49611a965cc436095e257d572d51528477bcf52d
tree73444759ee65c1ddfb00eda7da1e6f50c92c8959
parent7032577a64fae095c2e4e4ad5ec81b38b3f852ff
save-cmd: open files with O_NOATIME on OSes that support it.

Backing up files normally changes their atime, which is bad for two reasons.

First, the files haven't really been "accessed" in a useful sense; the fact
that we backed them up isn't an indication that, say, they're any more
frequently used than they were before.

Secondly, when reading a file updates its atime, the kernel has to enqueue
an atime update (disk write) for every file we back up.  For programs that
read the same files repeatedly, this is no big deal, since the atime just
gets flushed out occasionally (after a lot of updates).  But since bup
accesses *every* file only once, you end up with a huge atime backlog, and
this can wastefully bog down your disks during a big backup.

Of course, mounting your filesystem with noatime would work too, but not
everybody does that.  So let's help them out.
cmd/save-cmd.py
lib/bup/_hashsplit.c
lib/bup/hashsplit.py