Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
up vote 0 down vote accepted

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.

share|improve this answer
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 8 '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 8 '11 at 15:57

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.