Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
runtime: futex contention caused by memory allocation in goroutines #34231
What version of Go are you using (
For what it's worth, I cannot recreate this on my 8 core laptop.
I guess you also do not see anything suspicious in your CPU profiles?
I ran the experiments again on my computer. This time with time and not /usr/bin/time. I get the same behavior:
Maybe it depends on the underlying Linux kernel. Here the information from my /proc/version:
Please let me know when you need more information about my setup or whether I should try something out on my computer.
@ALTree: Sorry, I missed this detail, Hyperthreading is enabled.
The following information from the CPU profile (with the flag -cpu 8) might be helpful:
(pprof) peek futex
(pprof) list futex
I find the 1.71s after the SYSCALL extremely high. But as I said, I have no knowledge about the internals of the Go scheduler. It is only an educated guess that this is related to the running times on my computer.