Search
English

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

startupxo Discuss

Writing language: KoreanRead in the original language

Plain summary

- 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.

Read source ↗

Found on

Hacker News ↗ / 64 votes / 28 comments

Have you run into something like this? Tell us in a line or two what you did. You do not need to know the product.

Sign in to comment

Keyboard shortcuts

Choose a post with J and K or the arrow keys, then press Enter.

K ↑ / J ↓
Previous post / next post
Enter C
Open summary and comments for the selected post
O
Open the original link of the selected post
/
Search
?
Show this help
Tab
Move to the submit or comment button, then press Enter

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