How to free kernel memory: Difference between revisions
Jump to navigation
Jump to search
Created page with 'If memory seems to be consumed but you can't account for it all, check with <code>atop</code>. You may see that '''slab memory''' is very high. If so, use the <code>slabtop</co…' |
No edit summary |
||
Line 1: | Line 1: | ||
If memory seems to be consumed but you can't account for it all, check with <code>atop</code>. You may see that '''slab memory''' | If memory seems to be consumed but you can't account for it all, check with <code>atop</code>. You may see that the kernel is holding a bunch of '''slab memory'''. If so, use the <code>slabtop</code> tool to see what it's being used for. If you need to free the slab memory, try this: | ||
<pre> | <pre> | ||
sync ; echo 2 > /proc/sys/vm/drop_caches | sync ; echo 2 > /proc/sys/vm/drop_caches | ||
</pre> | </pre> |
Latest revision as of 16:11, 13 September 2012
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