~/talk

Java Memory Management Best Practices

Talkat JavaOne 2026 · 2026-03-17..03-19· [java]
slides:none on file

Java defaults give a max heap of a quarter of physical RAM and often surprise; set -Xmx explicitly, use jcmd to take heap dumps (beware health checks and storage), analyze dumps with Eclipse Memory Analyzer or Microsoft GC Toolkit, and profile native allocations with async-profiler or JNM tracking. Recent JDKs (24/25) add compact object headers; metaspace should be bounded to catch leaks; direct buffers count against native memory; string deduplication has a default threshold of three; GC overhead limit triggers at 98%.

AI-written summary · about

  1. 0:00Introduction
  2. 1:20Memory basics and constraints
  3. 4:49JVM memory configuration
  4. 11:26Optimizing JVM environment
  5. 18:01Heap dump analysis
  6. 23:56Advanced memory optimizations
  7. 28:46Native memory and code cache
  8. 34:06GC throughput and logging
  9. 38:54Strings, collections, and closing
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.