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

if i play those command :

echo 3 > /proc/sys/vm/drop_caches

Will the server be force to read the correct file on disk until i put 0 again ?

Or this work only one time, and if i want to clear cache again, i've to put 0 and 3 again ?


share|improve this question
up vote 2 down vote accepted

No - that just drops the existing caches. As soon as you start reading files, linux will start caching them again.

There shouldn't be a scenario in which linux reads "old" data from a disk cache though, if that's what you are worried about.

share|improve this answer
ok, thank you ! – NicoMinsk Aug 23 '12 at 12:15

You don't need that kind of wizardy. Linux will cache files it reads, but a write operation invalidates the cache entry for that file and it will be read again from disk during next read access.

share|improve this answer
indeed, I am concerned about the Op's motive. I can see why you might want to do this (eg. performance testing assuming cold cache)... but these are few and far between – Tom Newton Aug 23 '12 at 12:35

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.