Skip to content

Tune Redis Memory

Key idea:

Set maxmemory = 75 % of server RAM and maxmemory-policy = allkeys-lru (or volatile-lru if you rely on TTLs). Watch used_memory_rss / used_memory in INFO — a ratio > 1.5 = fragmentation, run MEMORY PURGE. MEMORY USAGE shows the size of a specific key. The biggest memory hogs are usually large hashes and sets without TTL.

Below: details, example, related terms, FAQ.

Try it now — free →

Details

  • maxmemory-policy: allkeys-lru (default for cache), volatile-lru (mixed cache+store)
  • MEMORY DOCTOR gives recommendations straight from Redis
  • Fragmentation: jemalloc usually copes, but after a mass DEL it can hit 2×
  • redis-cli --bigkeys scans and lists top keys by size
  • Active defragmentation: activedefrag yes in config

Example

# Quick memory audit
$ redis-cli --bigkeys

# top-10 keys by size
$ redis-cli --memkeys --memkeys-samples 100

# Check one key
$ redis-cli MEMORY USAGE sessions:user:1234
(integer) 2048

# Rebalance/defrag
$ redis-cli CONFIG SET activedefrag yes
$ redis-cli MEMORY PURGE

Related

Score 0–100Unified site health score
SSL + SecuritySecurity and certificate status
PerformanceResponse speed and caching
SEO Signalsrobots.txt, sitemap, canonicals

Why teams trust us

100
point scale
SSL
SSL + HTTP headers
10+
scoring criteria
Free
no signup

How it works

1

Enter site URL

2

Analyse 10+ factors

3

Get overall score

What is Health Score?

Health Score is a comprehensive assessment of site technical health across 20+ parameters: SSL, security headers, response speed, SEO technical factors, and availability.

Comprehensive Score

20+ parameters in one number: SSL, headers, speed, SEO technical factors.

Detailed Breakdown

Each parameter with explanation — what is checked, what was found, how to fix.

Score Trends

Compare Health Score at different dates — see progress or regression.

Health Monitoring

Set up automated Health Score checks and get notified when the score drops.

Who uses this

Developers

quick pre-release audit

SEO

technical baseline score

Marketers

client site check

Security

header security audit

Common Mistakes

Ignoring red parametersA red parameter is a critical issue. Start fixing those, not the yellow ones.
Only checking homepageIssues may exist on subpages. Check key sections and landing pages.
Not re-checking after fixAfter each fix, rerun the check and verify the score improved.
Treating 80+ as good enoughAim for 95+. Every red item is a risk to SEO or security.

Best Practices

Fix by priorityRed > yellow > blue. Critical issues first.
Check regularlyWeekly Health Score check helps catch degradation before it affects SEO.
Use monitoringConnect an automated HTTP monitor — it will be the first to notice downtime.
Compare with competitorsCheck the Health Score of your nearest competitor — a great benchmark for prioritization.

Get more with a free account

Health Score check history and real-time site health monitoring.

Sign up free

Learn more

Frequently Asked Questions

When switch allkeys-lru → allkeys-lfu?

When your workload has a clear hot/cold partition (some keys read forever, others rarely). LFU wins for classic skewed workload.

Redis in production without persistence?

Fine for pure cache (session, counter). If the data cannot be regenerated, enable AOF everysec.

Sharding or Cluster?

Redis Cluster — built-in sharding (up to 1000 nodes). For < 100 GB sentinel + application-level sharding is more common.