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 well aware on how to drop (e.g. /sbin/sysctl vm.drop_caches=3 ) caches in Linux, but for benchmarking I'd like to do the reverse, fill up the caches up to 100% RAM if possible. How would I do that pragmatically?

share|improve this question
Try just reading all the bits in the file system until cache usage seems to high water-mark: find / -type f -exec md5sum {} \; –  MadHatter Aug 29 '13 at 10:11
-exec cat {} >>/dev/null would use less CPU –  symcbean Aug 29 '13 at 10:17
Grumble. Not only are you a CPU cheapskate, you're right, as well. –  MadHatter Aug 29 '13 at 10:29
Why are you commenting instead of clicking answer button to give a proper answer I can mark up as the right one? =) –  Dima Aug 29 '13 at 11:49

Your Answer


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

Browse other questions tagged or ask your own question.