Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

1 Answer 1

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

 
discard

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.