Skip to contentSkip to conversation

invalidate/drop filesystem caches & io buffers

DISCUSSION Yakov Lerner 3 participants 3 messages Nov 8, 2006

lore
Share & tools
lore
#0 lore raw

I'd like to invalidate/free the filesystem caches and io buffer cache How can I do this when I can't unmount the filesystem (and w/o reboot) ?

(I run filesystem I/O test that needs to start from fresh cache & buffer state -- as emty as possible, like right after mount/boot).

I tried 'mount -o remount' but it didn't make any difference on the timing. Apparently 'mount -o remount' did not invalidate cases/buffers ? ( The difference between fresh run vs non-fresh run timing is x5 times ).

Thanks
Yakov

#1 lore raw
Quoted 2 lines · Yakov Lerner

I'd like to invalidate/free the filesystem caches and io buffer cache How can I do this when I can't unmount the filesystem (and w/o reboot) ?

echo 1 > /proc/sys/vm/drop_caches

Signature · 2 lines
if you want to mail me at work (you don't), use arjan (at) linux.intel.com
Test the interaction between Linux and your BIOS via http://www.linuxfirmwarekit.org
#2 lore raw
In reply to Yakov Lerner
Quoted 10 lines · Yakov Lerner

I'd like to invalidate/free the filesystem caches and io buffer cache How can I do this when I can't unmount the filesystem (and w/o reboot) ?

(I run filesystem I/O test that needs to start from fresh cache & buffer state -- as emty as possible, like right after mount/boot).

I tried 'mount -o remount' but it didn't make any difference on the timing. Apparently 'mount -o remount' did not invalidate cases/buffers ? ( The difference between fresh run vs non-fresh run timing is x5 times ).

You can do

echo 3 > /proc/sys/vm/drop_caches

Take a look at filesystems/proc.txt for details.

Signature · 2 lines
Regards,
Christian