HomeEE · Operations › Performance tuning

Performance tuning

Purpose: The tuning knobs in the order that pays: cache, code, queries, JVM, then infrastructure.

Who this page is for

AudienceWhy it matters to you
Platform engineersTuners
Backend engineersUsually the actual fix

Tune in this order (each step is cheaper than the next)

1. CACHE      hit ratio up (rules, TTLs, query-string discipline, personalisation out of HTML)
2. CODE       render hotspots (models doing work per-request that belongs in @PostConstruct/jobs)
3. QUERIES    traversals, unbounded results, missing indexes
4. JVM        heap/GC from evidence (GC logs), not folklore
5. INFRA      more/bigger instances — LAST, after 1–4, or you scale the inefficiency

Most "AEM is slow" engagements end at steps 1–3. Measure before and after every change — one knob at a time.

Diagnosis toolbox

QuestionTool
What's slow at the edge?CDN/dispatcher logs: hit ratio, top MISS URLs (fix THOSE pages/rules)
Which requests are slow on publish?request.log analysis (built-in rlog/log platform percentile queries)
What is a slow request doing?Thread dumps ×3, 10s apart, during slowness — the stuck pattern is usually obvious
Slow queries?error.log traversal warnings + Explain Query (slow queries)
GC pain?GC logs → pause frequency/duration; heap histogram for the leak question (memory & CPU)
Repo-level costs?Oak JMX (cache hit rates — SegmentCache/observation queue), oak-run for offline analysis

Platform knobs that commonly matter (after code is clean)

Load-test any tuning claim before it reaches prod (load testing); prod is not the lab.

Quick navigation