File Read Cache - How to purge?

Nick Craig-Wood nick at craig-wood.com
Wed Aug 22 06:30:06 EDT 2007


Hrvoje Niksic <hniksic at xemacs.org> wrote:
>  Nick Craig-Wood <nick at craig-wood.com> writes:
> 
> > If you are running linux > 2.6.18 then you can use
> > /proc/sys/vm/drop_caches for exactly that purpose.
> >
> >   http://www.linuxinsight.com/proc_sys_vm_drop_caches.html
> 
>  That URL claims that you need to run "sync" before dropping the cache,
>  and so do other resources.  I wonder if that means that dropping the
>  cache is unsafe on a running system.

It isn't unsafe, the OS just can't drop pages which haven't been
synced to disk so you won't get all the pages dropped unless you sync
first.

-- 
Nick Craig-Wood <nick at craig-wood.com> -- http://www.craig-wood.com/nick



More information about the Python-list mailing list