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

Issue 45770044: code review 45770044: runtime: increase page size to 8K (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 2 months ago by dvyukov
Modified:
11 years, 1 month ago
Reviewers:
rsc
CC:
golang-codereviews, dave_cheney.net, khr, rsc, khr1
Visibility:
Public.

Description

runtime: increase page size to 8K Tcmalloc uses 8K, 32K and 64K pages, and in custom setups 256K pages. Only Chromium uses 4K pages today (in "slow but small" configuration). The general tendency is to increase page size, because it reduces metadata size and DTLB pressure. This change reduces GC pause by ~10% and slightly improves other metrics. json-1 allocated 8037492 8038689 +0.01% allocs 105762 105573 -0.18% cputime 158400000 155800000 -1.64% gc-pause-one 4412234 4135702 -6.27% gc-pause-total 2647340 2398707 -9.39% rss 54923264 54525952 -0.72% sys-gc 3952624 3928048 -0.62% sys-heap 46399488 46006272 -0.85% sys-other 5597504 5290304 -5.49% sys-stack 393216 393216 +0.00% sys-total 56342832 55617840 -1.29% time 158478890 156046916 -1.53% virtual-mem 256548864 256593920 +0.02% garbage-1 allocated 2991113 2986259 -0.16% allocs 62844 62652 -0.31% cputime 16330000 15860000 -2.88% gc-pause-one 789108229 725555211 -8.05% gc-pause-total 3945541 3627776 -8.05% rss 1143660544 1132253184 -1.00% sys-gc 65609600 65806208 +0.30% sys-heap 1032388608 1035599872 +0.31% sys-other 37501632 22777664 -39.26% sys-stack 8650752 8781824 +1.52% sys-total 1144150592 1132965568 -0.98% time 16364602 15891994 -2.89% virtual-mem 1327296512 1313746944 -1.02%

Patch Set 1 #

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

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

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

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

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

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

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

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

Unified diffs Side-by-side diffs Delta from patch set Stats (+28 lines, -13 lines) Patch
M src/pkg/runtime/malloc.h View 1 2 3 4 5 3 chunks +3 lines, -3 lines 0 comments Download
M src/pkg/runtime/malloc.goc View 1 2 3 4 5 6 7 2 chunks +5 lines, -1 line 0 comments Download
M src/pkg/runtime/mem.go View 1 2 3 4 5 1 chunk +1 line, -2 lines 0 comments Download
M src/pkg/runtime/mgc0.c View 1 2 3 4 5 6 7 6 chunks +13 lines, -6 lines 0 comments Download
M src/pkg/runtime/netpoll.goc View 1 2 3 4 5 6 7 2 chunks +6 lines, -1 line 0 comments Download

Messages

Total messages: 15
dvyukov
Hello golang-codereviews@googlegroups.com, I'd like you to review this change to https://dvyukov%40google.com@code.google.com/p/go/
11 years, 2 months ago (2013-12-31 09:47:58 UTC) #1
dvyukov
Any better ideas on what to do with MemStats?
11 years, 2 months ago (2013-12-31 09:48:42 UTC) #2
dave_cheney.net
On 2013/12/31 09:48:42, dvyukov wrote: > Any better ideas on what to do with MemStats? ...
11 years, 2 months ago (2014-01-06 23:38:06 UTC) #3
dvyukov
On 2014/01/06 23:38:06, dfc wrote: > On 2013/12/31 09:48:42, dvyukov wrote: > > Any better ...
11 years, 2 months ago (2014-01-09 10:39:44 UTC) #4
dave_cheney.net
Sounds reasonable to me. > On 9 Jan 2014, at 21:39, dvyukov@google.com wrote: > >> ...
11 years, 2 months ago (2014-01-09 10:43:21 UTC) #5
dvyukov
ping
11 years, 1 month ago (2014-01-18 15:41:28 UTC) #6
khr
On 2014/01/18 15:41:28, dvyukov wrote: > ping I'm happy with the code proper. Who was ...
11 years, 1 month ago (2014-01-21 22:00:08 UTC) #7
rsc
On 2014/01/21 22:00:08, khr wrote: > Who was the genius who hardcoded 61 size classes? ...
11 years, 1 month ago (2014-01-21 22:10:43 UTC) #8
khr1
On Tue, Jan 21, 2014 at 2:10 PM, <rsc@golang.org> wrote: > On 2014/01/21 22:00:08, khr ...
11 years, 1 month ago (2014-01-21 22:13:05 UTC) #9
rsc
On Tue, Jan 21, 2014 at 5:13 PM, Keith Randall <khr@google.com> wrote: > On Tue, ...
11 years, 1 month ago (2014-01-21 22:14:08 UTC) #10
khr1
On Tue, Jan 21, 2014 at 2:14 PM, Russ Cox <rsc@golang.org> wrote: > On Tue, ...
11 years, 1 month ago (2014-01-21 22:38:32 UTC) #11
dvyukov
On 2014/01/21 22:10:43, rsc wrote: > On 2014/01/21 22:00:08, khr wrote: > > Do you ...
11 years, 1 month ago (2014-01-22 09:28:39 UTC) #12
dvyukov
On 2014/01/22 09:28:39, dvyukov wrote: > On 2014/01/21 22:10:43, rsc wrote: > > On 2014/01/21 ...
11 years, 1 month ago (2014-01-22 10:21:05 UTC) #13
rsc
LGTM Okay, let's try it and see.
11 years, 1 month ago (2014-01-22 19:06:43 UTC) #14
dvyukov
11 years, 1 month ago (2014-01-23 15:00:08 UTC) #15
*** Submitted as https://code.google.com/p/go/source/detail?r=d795425bfa18 ***

runtime: increase page size to 8K
Tcmalloc uses 8K, 32K and 64K pages, and in custom setups 256K pages.
Only Chromium uses 4K pages today (in "slow but small" configuration).
The general tendency is to increase page size, because it reduces
metadata size and DTLB pressure.
This change reduces GC pause by ~10% and slightly improves other metrics.

json-1
allocated                 8037492      8038689      +0.01%
allocs                     105762       105573      -0.18%
cputime                 158400000    155800000      -1.64%
gc-pause-one              4412234      4135702      -6.27%
gc-pause-total            2647340      2398707      -9.39%
rss                      54923264     54525952      -0.72%
sys-gc                    3952624      3928048      -0.62%
sys-heap                 46399488     46006272      -0.85%
sys-other                 5597504      5290304      -5.49%
sys-stack                  393216       393216      +0.00%
sys-total                56342832     55617840      -1.29%
time                    158478890    156046916      -1.53%
virtual-mem             256548864    256593920      +0.02%

garbage-1
allocated                 2991113      2986259      -0.16%
allocs                      62844        62652      -0.31%
cputime                  16330000     15860000      -2.88%
gc-pause-one            789108229    725555211      -8.05%
gc-pause-total            3945541      3627776      -8.05%
rss                    1143660544   1132253184      -1.00%
sys-gc                   65609600     65806208      +0.30%
sys-heap               1032388608   1035599872      +0.31%
sys-other                37501632     22777664     -39.26%
sys-stack                 8650752      8781824      +1.52%
sys-total              1144150592   1132965568      -0.98%
time                     16364602     15891994      -2.89%
virtual-mem            1327296512   1313746944      -1.02%

R=golang-codereviews, dave, khr, rsc, khr
CC=golang-codereviews
https://codereview.appspot.com/45770044
Sign in to reply to this message.

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