How to free kernel memory

From Wiki
Jump to navigation Jump to search

If memory seems to be consumed but you can't account for it all, check with atop. You may see that the kernel is holding a bunch of slab memory. If so, use the slabtop tool to see what it's being used for. If you need to free the slab memory, try this:

sync ; echo 2 > /proc/sys/vm/drop_caches