0

I am using a centos 5 (2.6.18-194.el5).

I need to be able to list files very quickly, in order for my rsync backup to be efficient.

I don't really need to cache file contents, because file access response time isn't that important.

I've got hundred million files and they keep being added and removed, and I got the feeling that my inode cache gets replaced by file content cache, which I don't want.

After some lookup I think that maybe /proc/sys/vm/vfs_cache_pressure could be helpful, but I am not sure how to use it and how to check it actually works.

Dear vfs guru, thank you for your help in advance

john.doe
  • 105
  • 1
  • 1
  • 3

1 Answers1

0

In one similar case I have a simple cronjob running every minute performing something like

find /some/mount/point 2&>1 >/dev/null

That way directory listing of 50 million files is forced to stay in cache.

Janne Pikkarainen
  • 31,454
  • 4
  • 56
  • 78
  • So assuming my backup tool is rsync, and given that it internally does something like a find, I suppose I just need to backup as frequently as possible? – john.doe Dec 08 '11 at 15:50
  • Maybe so. For me rsync every minute was not possible since it's more heavy operation than a simple find; I rsync couple of times a day but keep the directory cache hot with that cron job. – Janne Pikkarainen Dec 08 '11 at 15:57