Skip to content

Instantly share code, notes, and snippets.

View lordloh's full-sized avatar

Bharath Bhushan Lohray lordloh

View GitHub Profile
@lordloh
lordloh / clearcache.sh
Last active August 22, 2018 00:02
This is a script I use to free up memory on my system. It syncs all IO buffers to disk, then instructs the kernel to drop all caches. However, caches exist for a reason. Manually clearing them will temporarily degrade application performance.
#! /bin/bash
free -m
sudo sh -c "sync; echo 3 > /proc/sys/vm/drop_caches"
free -m