BackupPC-users

Re: [BackupPC-users] Utilizing posix_fadvise to not cache file contents

2013-10-24 12:54:14
Subject: Re: [BackupPC-users] Utilizing posix_fadvise to not cache file contents
From: Marcel Meckel <mailinglist+backuppc-users AT foobar0815 DOT de>
To: backuppc-users AT lists.sourceforge DOT net
Date: Thu, 24 Oct 2013 18:52:45 +0200
Hi,

> has there been any thoughts on utilizing posix_fadvise* in BackupPC?

thanks to the #linux IRC channel it's now clear that the kernel can and
will evict cached dentries and inodes from RAM when files are read and
written without using posix_fadvise, thus caching these files in the
page cache.

But here comes /proc/sys/vm/vfs_cache_pressure to the rescue:

https://www.kernel.org/doc/Documentation/sysctl/vm.txt

  Controls the tendency of the kernel to reclaim the memory which is
  used for caching of directory and inode objects.

  At the default value of vfs_cache_pressure=100 the kernel will
  attempt to reclaim dentries and inodes at a "fair" rate with respect
  to pagecache and swapcache reclaim.  Decreasing vfs_cache_pressure
  causes the kernel to prefer to retain dentry and inode caches. When
  vfs_cache_pressure=0, the kernel will never reclaim dentries and
  inodes due to memory pressure and this can easily lead to
  out-of-memory conditions. Increasing vfs_cache_pressure beyond 100
  causes the kernel to prefer to reclaim dentries and inodes.

With my backuppc machine and its 96GB of RAM it's not usefull in my
opinion that the dentries and inode data from e.g. the pool directory
cached in RAM get's evicted because backuppc writes big files to disk
not using posix_fadvise.

So i will lower the value in /proc/sys/vm/vfs_cache_pressure from 100
to maybe 40 and see what happens.

Regards
Marcel

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/