Skip to content

Q&A · Answered

How to check and free up RAM on Linux

asked 9 months, 1 week ago 765 views 1 answer
39

My server is running slow. How do I check memory usage and free up RAM?

1 Answer

One accepted
24

Accepted answer

Not confirmed since it was written, 9 months, 1 week ago
# 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_caches

Your answer

Say what you tried, not only what worked — the next person needs the reasoning. Code goes in a fenced block.

Shown beside your answer and never checked, so it cannot be a name someone already has here.

No account needed to answer. Sign in instead and it carries your name and earns reputation.