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

Issue 6454142: code review 6454142: net/http: reduce mutex contention (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 8 months ago by dvyukov
Modified:
11 years, 8 months ago
Reviewers:
CC:
bradfitz, dfc, dsymonds, gobot, golang-dev, remyoudompheng
Visibility:
Public.

Description

net/http: reduce mutex contention benchmark old ns/op new ns/op delta BenchmarkClientServerParallel 155909 154454 -0.93% BenchmarkClientServerParallel-2 86012 82986 -3.52% BenchmarkClientServerParallel-4 70211 55168 -21.43% BenchmarkClientServerParallel-8 80755 47862 -40.73% BenchmarkClientServerParallel-12 77753 51478 -33.79% BenchmarkClientServerParallel-16 77920 50278 -35.47% The benchmark is http://codereview.appspot.com/6441134 The machine is 2 x 4 HT cores (16 HW threads total). Fixes issue 3946. Now contention moves to net.pollServer.AddFD().

Patch Set 1 #

Patch Set 2 : diff -r 66e0219bd117 https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r b855390a295f https://go.googlecode.com/hg/ #

Patch Set 4 : diff -r b855390a295f https://go.googlecode.com/hg/ #

Patch Set 5 : diff -r b855390a295f https://go.googlecode.com/hg/ #

Total comments: 3

Patch Set 6 : diff -r bd7fd672b7c8 https://go.googlecode.com/hg/ #

Patch Set 7 : diff -r bd7fd672b7c8 https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+29 lines, -22 lines) Patch
M src/pkg/net/http/export_test.go View 1 2 chunks +4 lines, -4 lines 0 comments Download
M src/pkg/net/http/transport.go View 1 2 3 4 5 8 chunks +25 lines, -18 lines 0 comments Download

Messages

Total messages: 12
dvyukov
Hello bradfitz@golang.org (cc: dave@cheney.net, golang-dev@googlegroups.com, remyoudompheng@gmail.com), I'd like you to review this change to https://go.googlecode.com/hg/
11 years, 8 months ago (2012-08-13 11:31:30 UTC) #1
dfc
Looks pretty good to me. Can you post the new contention graph somewhere ? http://codereview.appspot.com/6454142/diff/3003/src/pkg/net/http/transport.go ...
11 years, 8 months ago (2012-08-13 11:41:53 UTC) #2
dvyukov
On 2012/08/13 11:41:53, dfc wrote: > Looks pretty good to me. Can you post the ...
11 years, 8 months ago (2012-08-13 12:01:44 UTC) #3
remyoudompheng
Looks trivial enough to me.
11 years, 8 months ago (2012-08-18 09:38:06 UTC) #4
bradfitz
LGTM http://codereview.appspot.com/6454142/diff/3003/src/pkg/net/http/transport.go File src/pkg/net/http/transport.go (right): http://codereview.appspot.com/6454142/diff/3003/src/pkg/net/http/transport.go#newcode136 src/pkg/net/http/transport.go:136: t.altLk.Lock() why not RLock here?
11 years, 8 months ago (2012-08-20 05:59:22 UTC) #5
gobot
R=gri (assigned by bradfitz)
11 years, 8 months ago (2012-08-20 06:16:36 UTC) #6
gobot
R=dsymonds (assigned by bradfitz)
11 years, 8 months ago (2012-08-20 06:16:36 UTC) #7
gobot
R=dsymonds (assigned by bradfitz)
11 years, 8 months ago (2012-08-20 06:16:37 UTC) #8
gobot
R=bradfitz (assigned by bradfitz)
11 years, 8 months ago (2012-08-20 06:21:01 UTC) #9
dvyukov
http://codereview.appspot.com/6454142/diff/3003/src/pkg/net/http/transport.go File src/pkg/net/http/transport.go (right): http://codereview.appspot.com/6454142/diff/3003/src/pkg/net/http/transport.go#newcode136 src/pkg/net/http/transport.go:136: t.altLk.Lock() On 2012/08/20 05:59:22, bradfitz wrote: > why not ...
11 years, 8 months ago (2012-08-20 09:24:05 UTC) #10
dvyukov
*** Submitted as http://code.google.com/p/go/source/detail?r=43568ec5cf55 *** net/http: reduce mutex contention benchmark old ns/op new ns/op delta ...
11 years, 8 months ago (2012-08-20 09:24:33 UTC) #11
dfc
11 years, 8 months ago (2012-08-20 09:27:40 UTC) #12
Thank you. 

On 20/08/2012, at 19:24, dvyukov@google.com wrote:

> *** Submitted as
> http://code.google.com/p/go/source/detail?r=43568ec5cf55 ***
> 
> net/http: reduce mutex contention
> benchmark                           old ns/op    new ns/op    delta
> BenchmarkClientServerParallel          155909       154454   -0.93%
> BenchmarkClientServerParallel-2         86012        82986   -3.52%
> BenchmarkClientServerParallel-4         70211        55168  -21.43%
> BenchmarkClientServerParallel-8         80755        47862  -40.73%
> BenchmarkClientServerParallel-12        77753        51478  -33.79%
> BenchmarkClientServerParallel-16        77920        50278  -35.47%
> The benchmark is http://codereview.appspot.com/6441134
> The machine is 2 x 4 HT cores (16 HW threads total).
> Fixes issue 3946.
> Now contention moves to net.pollServer.AddFD().
> 
> R=bradfitz
> CC=bradfitz, dave, dsymonds, gobot, golang-dev, remyoudompheng
> http://codereview.appspot.com/6454142
> 
> 
> http://codereview.appspot.com/6454142/
Sign in to reply to this message.

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