39
My server is running slow. How do I check memory usage and free up RAM?
Loading...
Q&A · Answered
My server is running slow. How do I check memory usage and free up RAM?
Accepted answer
# Check memory usage
free -h
# Detailed view
cat /proc/meminfo
# Top memory consumers
ps aux --sort=-%mem | head
# Clear cache (use carefully)
sudo sync
sudo echo 3 > /proc/sys/vm/drop_cachesSay what you tried, not only what worked — the next person needs the reasoning. Code goes in a fenced block.