Skip to main content
3 of 3
added 335 characters in body
Gilles 'SO- stop being evil'
  • 866.5k
  • 205
  • 1.8k
  • 2.3k

How do you empty the buffers and cache on a Linux system?

Prior to doing some benchmarking work how would one free up the memory (RAM) that the Linux Kernel is consuming for its buffers and cache?


Note that this is mostly useful for benchmarking. Emptying the buffers and cache reduces performance! If you're here because you thought that freeing buffers and cache was a positive thing, go and read Linux ate my RAM!. The short story: free memory is unused memory is wasted memory.

slm
  • 380.2k
  • 127
  • 793
  • 897