<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/swiss-table-maps-eat-memory-and-swap-causes-a-40ms-gc-pause-8exrifw8j" -->

---
title: Swiss table maps eat memory, and swap causes a 40ms GC pause
description: This week's Go digest is dominated by memory internals: a deep-dive shows why map[int64]int64 costs 37.8 bytes per entry instead of 16, and a separate...
canonical: https://daily.dev/posts/swiss-table-maps-eat-memory-and-swap-causes-a-40ms-gc-pause-8exrifw8j
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Swiss table maps eat memory, and swap causes a 40ms GC pause | daily.dev
og:description: This week's Go digest is dominated by memory internals: a deep-dive shows why map[int64]int64 costs 37.8 bytes per entry instead of 16, and a separate...
og:url: https://daily.dev/posts/swiss-table-maps-eat-memory-and-swap-causes-a-40ms-gc-pause-8exrifw8j
og:image: https://api.daily.dev/og/posts/8EXrIFw8j.png
og:image:alt: Swiss table maps eat memory, and swap causes a 40ms GC pause
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Swiss table maps eat memory, and swap causes a 40ms GC pause

**[Go Digest](https://daily.dev/sources/golang_digest)** · 4 min read · 6 upvotes · 1 comments

## Summary

This week's Go digest is dominated by memory internals: a deep-dive shows why map[int64]int64 costs 37.8 bytes per entry instead of 16, and a separate investigation traces a 40ms GC pause to swapped-out metadata pages. Go 1.27 also ships a size-specialized allocator that speeds up small allocations by up to 30%. On the tooling side, CloudX's replacement for actions/setup-go cuts CI runtime by 69%, and Rune IDE goes fully open source under GPLv3 with revenue sharing for contributors.

## Content

**TLDR:** This week's Go digest is dominated by memory internals: a deep-dive shows why map[int64]int64 costs 37.8 bytes per entry instead of 16, and a separate investigation traces a 40ms GC pause to swapped-out metadata pages. Go 1.27 also ships a size-specialized allocator that speeds up small allocations by up to 30%. On the tooling side, CloudX's replacement for actions/setup-go cuts CI runtime by 69%, and Rune IDE goes fully open source under GPLv3 with revenue sharing for contributors.

---

## Go's Swiss table maps cost 37.8 bytes per int64 entry, not 16

A deep investigation traces the overhead to the Swiss Tables map implementation that replaced Go's bucket-based maps in 1.24: groups of 8 slots that are 50-56% empty by design, padding that makes struct{} and bool cost the same, and deletes that never shrink or return memory to the OS. A GOEXPERIMENT=mapsplitgroup fix is landing in Go 1.28, but for now the advice is to preallocate when size is known and prefer bitsets or slices for dense integer sets. [Read more](https://daily.dev/posts/LnQjIBqce)

## Swap under memory pressure caused a 40ms Go GC pause

An engineer traced a production stop-the-world GC pause to Go's garbage collector reading its own bookkeeping metadata during sweep and mark termination, only to find those pages had been evicted to swap by the kernel's per-cgroup eviction policy. Using bpf tracing, they isolated 228 major page faults responsible for 39 of the 40ms pause, and found the cost of building one message jumped from 3-5ms to as much as 903ms on a network volume. Go 1.26's Green Tea garbage collector doesn't help here since the cost comes from reading metadata, not the collector itself. [Read more](https://daily.dev/posts/RQw1rnFQm)

## Go 1.27 ships a size-specialized allocator for small heap allocations

The new allocator generates specialized mallocgc variants per span class, speeding up allocations under 80 bytes by 20-30% and yielding up to 1% overall speedup for allocation-heavy programs. No code changes are required, and the feature can be disabled with GOEXPERIMENT=nosizespecializedmalloc if it causes problems. [Read more](https://daily.dev/posts/8h3R9MRtg)

## CloudX cuts Go CI test time 69% by replacing actions/setup-go

The official action's cache-key design let parallel Go CI jobs overwrite each other's caches and load stale results. CloudX's drop-in replacement keys caches per-job and writes a fresh entry on every run, cutting median test job time from 76s (degrading to 180s under the race condition) to 41s across 4,000 real commits, while eliminating 86% of unnecessary test reruns. The trade-off is faster-growing cache blobs that need automatic pruning and more Actions cache capacity. [Read more](https://daily.dev/posts/WJKlDevJY)

---

## Also notable

- **Rune IDE goes open source under GPLv3:** The Go-based native IDE for Linux and macOS dropped its proprietary license, ditched the CLA requirement, and added an opt-in program that shares service revenue with contributors via a public ledger. [Read more](https://daily.dev/posts/0WoG85Q5H)
- **go fix can rewrite third-party dependency calls:** A //go:fix inline directive lets library authors mark deprecated functions so go fix machine-rewrites every call site across the dependency graph, as one developer discovered when it changed tint.NewHandler to tint.NewTextHandler in their own code. [Read more](https://daily.dev/posts/MJRzXible)
- **testing.T.Output() beats slog.DiscardHandler for silencing test logs:** Introduced in Go 1.25, t.Output() routes log output to the test's own stream so nothing prints on a passing test but logs appear automatically on failure, and it works with any logger, not just slog. [Read more](https://daily.dev/posts/n8XgWlUNi)
- **objgit rewrites packfiles to make Git usable on object storage:** Standard Git packfiles fail against S3-style storage because you can't build an HTTP Range request without knowing an object's compressed size ahead of time, so the project splits objects into a .bin data file plus a separate .cue index, cutting some push and clone operations from minutes to seconds in benchmarks against three real repos. [Read more](https://daily.dev/posts/1mkVF6p5b)
- **VortexKV claims 6.87M ops/sec as a pure-Go, CGO-free Redis alternative:** The key-value store uses a pinned multi-reactor design with epoll/kqueue, zero-allocation ring buffers, and 64 mutex-striped shards to claim sub-120µs p50 latency without CGO. [Read more](https://daily.dev/posts/NzhDTuz6m)

## Community discussion

Top comments from developers on daily.dev.

**@svenmueller** · 1 upvotes

> One thing I'd add: this is fixable at the cgroup level rather than in Go. Set `memory.swap.max=0` on the service that cares about latency and leave swap enabled everywhere else, so you still get the spike absorption without letting the GC metadata ever go to disk. Touching GOGC or GOMEMLIMIT just lowers the pressure, the kernel can still evict a cold page whenever it wants.

## Similar posts on daily.dev

- [A Million Go Map Entries Take 38MB, Not 16MB](https://daily.dev/posts/a-million-go-map-entries-take-38mb-not-16mb-lnqjibqce) · Awesome Go · 30 upvotes · 1 comments
- [Hash tables in Go and advantage of self-hosted compilers](https://daily.dev/posts/hash-tables-in-go-and-advantage-of-self-hosted-compilers-tkdlr8n5e) · Lobsters · 4 upvotes · 0 comments
- [Go 1.26 turned on a new garbage collector. Whether it helps you depends on how your heap is shaped.](https://daily.dev/posts/go-1-26-turned-on-a-new-garbage-collector-whether-it-helps-you-depends-on-how-your-heap-is-shaped--4agvnc3q3) · Medium · 8 upvotes · 0 comments

---

Tags: [#golang](https://daily.dev/tags/golang), [#cicd](https://daily.dev/tags/cicd)

[View this post on daily.dev](https://daily.dev/posts/swiss-table-maps-eat-memory-and-swap-causes-a-40ms-gc-pause-8exrifw8j)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"DiscussionForumPosting","mainEntityOfPage":"https://daily.dev/posts/swiss-table-maps-eat-memory-and-swap-causes-a-40ms-gc-pause-8exrifw8j","headline":"Swiss table maps eat memory, and swap causes a 40ms GC pause","text":"This week's Go digest is dominated by memory internals: a deep-dive shows why map[int64]int64 costs 37.8 bytes per entry instead of 16, and a separate investigation traces a 40ms GC pause to swapped-out metadata pages. Go 1.27 also ships a size-specialized allocator that speeds up small allocations by up to 30%. On the tooling side, CloudX's replacement for actions/setup-go cuts CI runtime by 69%, and Rune IDE goes fully open source under GPLv3 with revenue sharing for contributors.","url":"https://daily.dev/posts/swiss-table-maps-eat-memory-and-swap-causes-a-40ms-gc-pause-8exrifw8j","datePublished":"2026-09-21T04:18:05.410Z","dateModified":"2026-09-21T04:18:26.735Z","author":{"@type":"Organization","name":"Go Digest","logo":"https://media.daily.dev/image/upload/s--8Aro536C--/f_auto,q_auto/v1773839403/logos/golang_digest?_a=BAMAMiiu0","url":"https://daily.dev/sources/golang_digest"},"interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":6},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":1}],"comment":[{"@type":"Comment","text":"One thing I’d add: this is fixable at the cgroup level rather than in Go. Set memory.swap.max=0 on the service that cares about latency and leave swap enabled everywhere else, so you still get the spike absorption without letting the GC metadata ever go to disk. Touching GOGC or GOMEMLIMIT just lowers the pressure, the kernel can still evict a cold page whenever it wants.","datePublished":"2026-09-21T12:34:56.902Z","url":"https://daily.dev/posts/8EXrIFw8j#c-v0UfRUSZU","author":{"@type":"Person","name":"Sven Müller","url":"https://daily.dev/svenmueller","image":"https://media.daily.dev/image/upload/s--Lxo_RYD9--/f_auto/v1789037218/avatars/avatar_wOCfKSaj8KbWxt3BWg54g?_a=BAMAMicg0"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1}}],"isPartOf":{"@type":"WebPage","url":"https://daily.dev/sources/golang_digest","name":"Go Digest"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Go Digest","item":"https://daily.dev/sources/golang_digest"},{"@type":"ListItem","position":3,"name":"Swiss table maps eat memory, and swap causes a 40ms GC pause"}]}
```

