~/talk

Soft Memory Limit in Go 1.19

Talkat GopherCon 2022 · 2022-09-26..09-28· [linux-and-operating-systems]
slides:none on file

Go 1.19 adds a soft memory limit via GOMEMLIMIT that caps when GC runs by taking the min(gomemlimit−nonheap, GOGC target) rather than letting GOGC alone grow the heap. GOGC=100 makes the next GC target roughly double current live heap so an app at 30 MB live would get a 60 MB target; if a container limit is 60 MB the GC would otherwise arrive too late and OOM. gomemlimit is compared after subtracting non‑heap runtime overhead so GC triggers earlier to respect container limits.

AI-written summary · about

  1. 0:00Introduction
  2. 0:41Disclaimer
  3. 0:54Garbage Collector
  4. 1:26GC Cycle
  5. 2:13Graph
  6. 5:29Government Limit
~/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.