Following are the useful commands on checking linux memory usage and freeing memory
cat /proc/meminfo
Display system memory statistics
free -m -t
Displays the memory usage statistics
echo 1 > /proc/sys/vm_drop_caches
Frees page caches
echo 2 > /proc/sys/vm_drop_caches
Frees dentires and inodes
echo 3 > /proc/sys/vm_drop_caches
Frees pageCaches,dentries,inodes