Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(41)

Issue 7029044: code review 7029044: runtime: less aggressive per-thread stack segment caching (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
9 years, 6 months ago by dvyukov
Modified:
9 years, 5 months ago
Reviewers:
albert.strasheim
CC:
sougou, nsf, rsc, golang-dev, msolomon
Visibility:
Public.

Description

runtime: less aggressive per-thread stack segment caching Introduce global stack segment cache and limit per-thread cache size. This greatly reduces StackSys memory on workloads that create lots of threads. benchmark old ns/op new ns/op delta BenchmarkStackGrowth 665 656 -1.35% BenchmarkStackGrowth-2 333 328 -1.50% BenchmarkStackGrowth-4 224 172 -23.21% BenchmarkStackGrowth-8 124 91 -26.13% BenchmarkStackGrowth-16 82 47 -41.94% BenchmarkStackGrowth-32 73 40 -44.79% 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% TestStackMem#1,MB 310 12 -96.13% TestStackMem#2,MB 296 14 -95.27% TestStackMem#3,MB 479 14 -97.08% TestStackMem#1,sec 3.22 2.26 -29.81% TestStackMem#2,sec 2.43 2.15 -11.52% TestStackMem#3,sec 2.50 2.38 -4.80%

Patch Set 1 #

Patch Set 2 : diff -r 492fdf07797e https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 3 : diff -r 492fdf07797e https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 4 : diff -r 492fdf07797e https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 5 : diff -r 492fdf07797e https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 6 : diff -r 6867d442bb3d https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 7 : diff -r 6867d442bb3d https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 8 : diff -r 6867d442bb3d https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 9 : diff -r d0d76b7fb219 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 10 : diff -r d0d76b7fb219 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 11 : diff -r 28ee66c9003f https://dvyukov%40google.com@code.google.com/p/go/ #

Total comments: 10

Patch Set 12 : diff -r 08a1396e9aa7 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 13 : diff -r 2a4cb557ddbd https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 14 : diff -r 2a4cb557ddbd https://dvyukov%40google.com@code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+154 lines, -12 lines) Patch
M src/pkg/runtime/malloc.goc View 1 2 3 4 5 6 12 3 chunks +83 lines, -2 lines 0 comments Download
M src/pkg/runtime/mgc0.c View 1 2 3 4 5 6 7 8 9 10 2 chunks +1 line, -5 lines 0 comments Download
M src/pkg/runtime/proc.c View 1 2 3 4 1 chunk +0 lines, -2 lines 0 comments Download
M src/pkg/runtime/proc_test.go View 1 3 chunks +10 lines, -2 lines 0 comments Download
M src/pkg/runtime/runtime.h View 1 2 3 4 5 6 7 8 10 2 chunks +11 lines, -1 line 0 comments Download
M src/pkg/runtime/stack_test.go View 1 2 3 4 5 6 7 8 2 chunks +49 lines, -0 lines 0 comments Download

Messages

Total messages: 21
dvyukov
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://dvyukov%40google.com@code.google.com/p/go/
9 years, 6 months ago (2013-01-03 15:29:31 UTC) #1
dvyukov
On 2013/01/03 15:29:31, dvyukov wrote: > Hello mailto:golang-dev@googlegroups.com, > > I'd like you to review ...
9 years, 6 months ago (2013-01-03 17:45:38 UTC) #2
sougou
Reran vtocc benchmars, around 10M queries using 100 clients. Run 1: go version currently used ...
9 years, 5 months ago (2013-01-03 23:55:50 UTC) #3
dvyukov
On 2013/01/03 23:55:50, sougou wrote: > Reran vtocc benchmars, around 10M queries using 100 clients. ...
9 years, 5 months ago (2013-01-04 06:04:59 UTC) #4
nsf
On 2013/01/03 15:29:31, dvyukov wrote: > Hello mailto:golang-dev@googlegroups.com, > > I'd like you to review ...
9 years, 5 months ago (2013-01-04 07:19:15 UTC) #5
dvyukov
On 2013/01/04 07:19:15, nsf wrote: > On 2013/01/03 15:29:31, dvyukov wrote: > > Hello mailto:golang-dev@googlegroups.com, ...
9 years, 5 months ago (2013-01-04 07:36:59 UTC) #6
dvyukov
On 2013/01/04 07:36:59, dvyukov wrote: > On 2013/01/04 07:19:15, nsf wrote: > > On 2013/01/03 ...
9 years, 5 months ago (2013-01-04 07:39:15 UTC) #7
dvyukov
On 2013/01/04 06:04:59, dvyukov wrote: > On 2013/01/03 23:55:50, sougou wrote: > > Reran vtocc ...
9 years, 5 months ago (2013-01-04 07:48:43 UTC) #8
msolomon
From our perspective, capping the growth is a big win and the performance tradeoff is ...
9 years, 5 months ago (2013-01-04 07:55:36 UTC) #9
dvyukov
On Fri, Jan 4, 2013 at 11:55 AM, Mike Solomon <msolomon@google.com> wrote: > From our ...
9 years, 5 months ago (2013-01-04 08:05:25 UTC) #10
sougou
Sorry, I forgot to mention that StackSys was indefinitely growing in the first two runs ...
9 years, 5 months ago (2013-01-04 08:05:45 UTC) #11
dvyukov
On Fri, Jan 4, 2013 at 12:05 PM, Sugu Sougoumarane <sougou@google.com> wrote: > Sorry, I ...
9 years, 5 months ago (2013-01-04 08:11:35 UTC) #12
nsf
On 2013/01/04 07:39:15, dvyukov wrote: > Do you miss a part of the sentence? Not ...
9 years, 5 months ago (2013-01-04 12:59:28 UTC) #13
sougou
5M rows using 100 connections: 128/32: qps: 5885 StackSys: 14.7MB 64/32: qps: 5876 StackSys: 8.4MB ...
9 years, 5 months ago (2013-01-04 20:15:38 UTC) #14
dvyukov
OK, I will replace the constants with 32/16. And let's wait for Russ' blessing. On ...
9 years, 5 months ago (2013-01-04 20:36:32 UTC) #15
dvyukov
Updated the constants to 32/16
9 years, 5 months ago (2013-01-05 10:25:55 UTC) #16
rsc
https://codereview.appspot.com/7029044/diff/22001/src/pkg/runtime/malloc.goc File src/pkg/runtime/malloc.goc (right): https://codereview.appspot.com/7029044/diff/22001/src/pkg/runtime/malloc.goc#newcode754 src/pkg/runtime/malloc.goc:754: StackCacheNode *next; The stack itself is way bigger than ...
9 years, 5 months ago (2013-01-07 04:18:57 UTC) #17
dvyukov
PTAL https://codereview.appspot.com/7029044/diff/22001/src/pkg/runtime/malloc.goc File src/pkg/runtime/malloc.goc (right): https://codereview.appspot.com/7029044/diff/22001/src/pkg/runtime/malloc.goc#newcode754 src/pkg/runtime/malloc.goc:754: StackCacheNode *next; On 2013/01/07 04:18:57, rsc wrote: > ...
9 years, 5 months ago (2013-01-08 12:33:47 UTC) #18
rsc
LGTM
9 years, 5 months ago (2013-01-09 19:08:26 UTC) #19
dvyukov
*** Submitted as https://code.google.com/p/go/source/detail?r=88d31369e105 *** runtime: less aggressive per-thread stack segment caching Introduce global stack ...
9 years, 5 months ago (2013-01-10 05:59:56 UTC) #20
albert.strasheim
9 years, 5 months ago (2013-01-24 11:02:33 UTC) #21
Message was sent while issue was closed.
http://code.google.com/p/go/issues/detail?id=4698
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b