3 ms·
I've been wondering about this as well. Goroutines start with an 8KB stack size now; native threads seem to use an 8MB _virtual_ stack size of which often only
by justinsb 12y ago
I've been wondering about this as well. Goroutines start with an 8KB stack size now; native threads seem to use an 8MB _virtual_ stack size of which often only one or two pages (of 4KB) will be used. So is the primary remaining advantage of goroutines vs threads the efficiency of the go scheduler?
- mwcampbell 12y agoFWIW, musl libc uses a much smaller default thread stack size (80KB). But apparently, Rich Felker wasn't able to find any good data on how big thread stacks actually need to be (see http://git.musl-libc.org/cgit/musl/commit/?id=13b3645c46518e0e2fb91f0d665e60f7a8a44b2b http://git.musl-libc.org/cgit/musl/commit/?id=13b3645c46518e...). EDIT: So I guess we should run more big multi-threaded server apps with musl and see what breaks.