Description
A new goroutine is created with a 2KB stack. Unfortunately, cockroach often utilizes more stack space than that requiring a relatively expensive operation to create a larger stack and copy the existing stack contents to it. This issue has been filed upstream as golang/go#18138. One of the Go maintainers suggested a possible solution: make the initial stack size larger. This isn't problematic to large numbers of goroutines because the stacks would be shrunk by GC as necessary, but would help with performance for short-lived goroutines such as those created by gRPC for request processing. Micro-benchmarks suggest a modest improvement above and beyond our growStack
hack. See golang/go#18138 (comment).
There is evidence that the microbenchmark numbers do translate to a modest improvement in real cluster throughput. We should quantify this improvement by running the scalability tests both with and without the larger stack size.