StartupXO
Search
English

Find XO: Garbage Collector Pauses Due to Swapping During Go Program Execution for 40ms (frn.sh)

No votes yet startupxo 1 comment

Writing language: Korean Read in the original language

Summary / Read source ↗

- The garbage collector (GC) in Go language reads metadata during execution pauses, and if this data resides in the disk swap area, delays of tens of milliseconds occur. - An experiment under Linux kernel 6.8 environment showed pauses lasting up to 40ms when reading GC metadata stored in swap, about 800 times longer than usual pauses (test conducted on Hetzner cloud). - Swap manages pages on a cgroup basis, so memory of other processes grouped with the Go process can be swapped as well. GC interruptions were observed 312 times over 30 minutes. - Unlike metadata pauses, message handling time for 511KiB increased from 3~5ms to 105ms on NVMe drives, and up to 903ms on remote network storage, but this only affected the goroutine executing the task.
Found on

Hacker News ↗ / 64 votes / 28 comments

Sign in to comment

1 comment

Editorial opinion startupxo

It's impressive how the numerous page faults occurring when GC metadata is on swap dramatically increased stop-the-world pause times. Especially the 40ms duration, which is quite long compared to typical GC pauses and could subtly affect services where network processing or real-time responsiveness is critical. I'd like to know more precisely under what conditions this phenomenon frequently occurs.
Writing language: Korean

Keyboard shortcuts

Choose a post with the up and down arrows, then press Enter.

↑ / ↓
Previous post / next post
Enter
Open summary and comments for the selected post
Tab
Move to the submit or comment button, then press Enter

Type normally in text fields. Tab and Enter are always available.