Why untouched Go slices can end up in physical memory more often with GOMEMLIMIT
Comments on “Why untouched Go slices can end up in physical memory more often with GOMEMLIMIT”
Claim-checked. Scored by all three judges, and its checkable claims were compared with the sources it cites. How far stories are checked
A post on peng.fyi traces why a Go program that allocates 400 MiB slices and never touches them still becomes resident. If a large allocation starts even slightly below an arena's zeroedBase mark, the runtime clears the whole span, and those writes fault in every page. In the author's demo, setting GOMEMLIMIT raised peak RSS from about 0.9 to 2.1 GiB, because constant GC opens more reused holes. Allocating with syscall.Mmap avoided it, but GOMEMLIMIT then ignores that memory. The figures come from one author's runs, unverified.
Why it ranked
No. 13 of 141 with a score of 0.66. The panel rated it highest on technical depth (0.94) and substantiated (0.93), lowest on audience breadth (0.49). Placed No. 13, No. 31 by score alone: the placement terms moved other stories past it.
- AI judgeJudge 2claude-haiku-5-5
- Detailed, well-evidenced engineering investigation of Go runtime zeroing and RSS behavior with reproducible experiments; useful to Go and infra builders, narrow audience, clear methodology.
- AI judgeJudge 3gpt-5.6-luna
- A highly reproducible Go/Linux runtime investigation with code, measurements, patched-runtime logs, and practical mitigations. It exposes a subtle memory-accounting and zeroing interaction relevant to performance-sensitive services, though mainly to Go and systems practitioners.
Each judge wrote its line after answering the rubric, with the site and the author still hidden. Every answer behind this is in the table under Score.
Score
0.66total under rubric v2.3
- Significance0.51
- Reader interest0.80
- Audience breadth0.49
- Practical relevance0.72
- Substantiated0.93
- Technical depth0.94
- New information0.87
- Counts against: Promotional0.06
- Counts against: Overclaim0.14
Each judge’s answer per question (0–1), their mean and spread, and what the question adds to the score (weight × mean).
| Question | Judge 1 | Judge 2 | Judge 3 | Mean | Spread | Weight | Contribution (weight times mean) |
|---|---|---|---|---|---|---|---|
| SignificanceHow much does this change what people in tech know or can do? | 0.51 | 0.35 | 0.68 | 0.51 | 0.33 | +0.24 | +0.123 |
| Reader interestWould a well-informed senior engineer or tech founder want to read this today, and likely pass it on? | 0.70 | 0.80 | 0.91 | 0.80 | 0.21 | +0.26 | +0.209 |
| Audience breadthHow many people who build technology does it concern? | 0.55 | 0.40 | 0.52 | 0.49 | 0.15 | +0.13 | +0.064 |
| Practical relevanceHow useful is it to someone who builds software or tech products? | 0.74 | 0.60 | 0.82 | 0.72 | 0.22 | +0.22 | +0.158 |
| SubstantiatedHow well is it backed? Consider whether it is the primary source, and whether its main claims come with data, code, a demo, a reproducible method or citations. | 0.99 | 0.85 | 0.94 | 0.93 | 0.14 | +0.05 | +0.046 |
| Technical depthHow technically substantive is it? | 1.00 | 0.90 | 0.91 | 0.94 | 0.10 | +0.05 | +0.047 |
| New informationDoes it contain information absent from the stories covered in the last 7 days (list provided)? | 0.83 | 0.85 | 0.94 | 0.87 | 0.11 | +0.05 | +0.044 |
| PromotionalIs it mainly marketing with little substance (a press release, ad or sponsored post with no real information)? A launch post that carries real news is not promotional. | 0.04 | 0.10 | 0.03 | 0.06 | 0.07 | −0.19 | −0.011 |
| OverclaimDo the headline or conclusions claim more than the body supports? | 0.21 | 0.15 | 0.06 | 0.14 | 0.15 | −0.11 | −0.015 |
| Sum of contributions | +0.664 | ||||||
| Claim-check penalty | 0.000 | ||||||
| Total, as published | 0.664 | ||||||
Spread is the highest minus the lowest judge answer. marks a spread above 0.40: the judges disagree, and the story is marked contested.
The badge for this ranking, for the author's page or anyone's: one line of HTML, and it links back here.
<a href="https://rubric.hrih.si/editions/2026-12-04/13/"><img src="https://rubric.hrih.si/badge/2026-12-04/13.svg" alt="Ranked #13 on Rubric, 4 Dec 2026" width="238" height="28"></a>Claim check
Claim check: 1 matches source · 3 no source given · 4 couldn’t check. Each claim is compared with the source the article itself cites; a flag is published only when both checkers agree.
No source givenNumber
A Go program that only allocates 400 MiB slices ends up with 0.9 GiB of RSS, and 2.1 GiB once GOMEMLIMIT is set.
The article gives no link or citation for it.
The article says “ends up with 0.9 GiB of RSS, and 2.1 GiB once GOMEMLIMIT is set”
The source says No source to compare with.
Couldn’t checkVersion
Since Go 1.26, on Linux a span whose pages were all returned to the OS with MADV_DONTNEED is not cleared, because it reads as zero.
The source was unreachable, paywalled or too long, or the two checkers disagreed.
The article says “Since Go 1.26 there is one exception, in allocSpan: on Linux, a span whose pages were all returned to the OS with MADV_DONTNEED reads as zero, so it is not…”
The source says No passage could be compared.
Source cited by the article: github.com/golang/go/blob/go1.27.4/src/runtime/mheap.go
Matches sourceGeneralization
The Go runtime tracks which pages are fresh from the kernel using one high-water mark per 64 MiB heap arena, zeroedBase, and allocNeedsZero returns a single bool for the whole allocation.
The cited source says the same thing.
The article says “It tracks that with one high-water mark per 64 MiB heap arena, zeroedBase, in allocNeedsZero”
The source says “zeroedBase := atomic.Loaduintptr(&ha.zeroedBase”
Source cited by the article: github.com/golang/go/blob/go1.27.4/src/runtime/mheap.go
Couldn’t checkCausal conclusion
mincore measurements show each slice is either not resident or fully resident (400 of 400 MiB) from the moment make returns, so the writes happen inside make.
The source was unreachable, paywalled or too long, or the two checkers disagreed.
The article says “A slice is either not resident at all or resident in full, 400 of 400 MiB, from the moment make returns. The writes happen inside make”
The source says No passage could be compared.
Source cited by the article: peng.fyi/post/unused-virtual-memory-can-use-physical-memory/lab/vm-demo-mincore.go
Couldn’t checkNumber
With the patched Go 1.27.4 runtime, large allocations started in a reused hole 9 to 16 times with GOMEMLIMIT=2048MiB instead of 2 without it, and 4 or 5 slices were zeroed versus 2.
The source was unreachable, paywalled or too long, or the two checkers disagreed.
The article says “Large allocations started in a reused hole 9 to 16 times instead of 2”
The source says No passage could be compared.
Source cited by the article: peng.fyi/post/unused-virtual-memory-can-use-physical-memory/lab/log-zeroing.patch
No source givenCausal conclusion
With GOMEMLIMIT set, the limit can never be met, so the GC runs on every allocation (about 200 times), freeing small garbage and opening holes that cause more zeroing.
The article gives no link or citation for it.
The article says “The limit can never be met, so the GC runs on every allocation, about 200 times over the run, and each cycle frees the latest small garbage”
The source says No source to compare with.
No source givenCausal conclusion
GODEBUG=disablethp=1 does not change the result; transparent huge pages are not involved, and AnonHugePages stays at 0 in every run.
The article gives no link or citation for it.
The article says “GODEBUG=disablethp=1 looks like a fix for this kind of bloat, and it changes nothing here”
The source says No source to compare with.
Couldn’t checkNumber
With syscall.Mmap instead of make and GOMEMLIMIT=2048MiB, the program reached 79 GiB of virtual memory with 3 MiB of RSS.
The source was unreachable, paywalled or too long, or the two checkers disagreed.
The article says “it reached 79 GiB of virtual memory with 3 MiB of RSS”
The source says No passage could be compared.
Source cited by the article: peng.fyi/post/unused-virtual-memory-can-use-physical-memory/lab/vm-demo-mmap.go
Also covered by
No other coverage was clustered with this story.
Elsewhere
Elsewhere: HN 1 pts, not on front page
Recorded for context only, checked 4 Dec 2026, 05:47 UTC. It played no part in the ranking.