FAQ

On 2012/12/30 18:08:27, dvyukov wrote:
On 2012/12/29 20:40:03, dvyukov wrote:
On Sun, Dec 30, 2012 at 12:34 AM, Rémy Oudompheng
wrote:
On 2012/12/29 wrote:
I've added the benchmark, BenchmarkStackGrowthDeep, that growth
and
shrinks stack in multiple goroutines. There is significant
slowdown on
this synthetic benchmark:

benchmark old ns/op new ns/op delta
BenchmarkStackGrowthDeep 94101 109271 +16.12%
BenchmarkStackGrowthDeep-2 47576 70916 +49.06%
BenchmarkStackGrowthDeep-4 25687 67188 +161.56%
BenchmarkStackGrowthDeep-8 13592 77776 +472.22%
BenchmarkStackGrowthDeep-16 9695 78721 +711.98%
BenchmarkStackGrowthDeep-32 11679 76796 +557.56%
BenchmarkStackGrowthDeep-64 12623 88951 +604.67%

I would prefer to fix the performance in a separate patch.


https://codereview.appspot.com/6997052/
Is it related to the watermark values? They seem very small and I
would expect the stack segment cache size to be roughly of the
same
order of magnitude of the size of an OS thread (a few megabytes).

Yes, it is related, but just increasing them won't help.

AFAIR, by default Go runtime requests just 64k for thread (g0)
stack.
Please hold on. I am working on similar patch that makes slowdown more
reasonable:
BenchmarkStackGrowthDeep 97231 94391 -2.92%
BenchmarkStackGrowthDeep-2 47230 58562 +23.99%
BenchmarkStackGrowthDeep-4 24993 49356 +97.48%
BenchmarkStackGrowthDeep-8 15105 30072 +99.09%
BenchmarkStackGrowthDeep-16 10005 15623 +56.15%
BenchmarkStackGrowthDeep-32 12517 13069 +4.41%
https://codereview.appspot.com/7029044/
The code almost completely rewritten, so it makes little sense to
review this
patch.
I've sent https://codereview.appspot.com/7029044/ for review. That
changes increases per-thread caches (12MB StackSys consumption on the
test instead of 4MB), but scales much more gracefully.

https://codereview.appspot.com/6997052/

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-dev @
categoriesgo
postedJan 3, '13 at 5:43p
activeJan 3, '13 at 5:43p
posts1
users1
websitegolang.org

1 user in discussion

Dvyukov: 1 post

People

Translate

site design / logo © 2021 Grokbase