1
0
mirror of https://github.com/golang/go synced 2024-10-05 08:21:22 -06:00
go/src/pkg
Dmitriy Vyukov 8fc6ed4c89 sync: less agressive local caching in Pool
Currently Pool can cache up to 15 elements per P, and these elements are not accesible to other Ps.
If a Pool caches large objects, say 2MB, and GOMAXPROCS is set to a large value, say 32,
then the Pool can waste up to 960MB.
The new caching policy caches at most 1 per-P element, the rest is shared between Ps.

Get/Put performance is unchanged. Nested Get/Put performance is 57% worse.
However, overall scalability of nested Get/Put is significantly improved,
so the new policy starts winning under contention.

benchmark                     old ns/op     new ns/op     delta
BenchmarkPool                 27.4          26.7          -2.55%
BenchmarkPool-4               6.63          6.59          -0.60%
BenchmarkPool-16              1.98          1.87          -5.56%
BenchmarkPool-64              1.93          1.86          -3.63%
BenchmarkPoolOverlflow        3970          6235          +57.05%
BenchmarkPoolOverlflow-4      10935         1668          -84.75%
BenchmarkPoolOverlflow-16     13419         520           -96.12%
BenchmarkPoolOverlflow-64     10295         380           -96.31%

LGTM=rsc
R=rsc
CC=golang-codereviews, khr
https://golang.org/cl/86020043
2014-04-14 21:13:32 +04:00
..
archive archive/tar: add support for GNU sparse files. 2014-04-03 20:01:04 +00:00
bufio bufio: fix potential endless loop in ReadByte 2014-04-10 21:46:00 -07:00
builtin
bytes bytes, strings: more consistent error messages 2014-04-10 21:45:41 -07:00
compress compress/bzip2: support superfluous Huffman levels. 2014-02-14 17:17:19 -05:00
container container/list: mark must be an element of the list 2014-02-13 16:43:52 -08:00
crypto crypto/(ec)dsa: use Fermat's inversion. 2014-04-08 16:32:48 -07:00
database/sql database/sql: add "defer rows.Close()" to the example code. 2014-03-25 13:32:18 +11:00
debug debug/macho: handle missing __debug_str section 2014-03-13 14:04:29 -07:00
encoding encoding/xml: unmarshal into interfaces 2014-04-08 14:55:12 -04:00
errors
expvar expvar: fix map key output 2014-04-10 21:14:04 -07:00
flag flag: remove extra space in error message 2014-04-10 22:15:55 -07:00
fmt fmt: fix typo in help doc 2014-04-10 21:14:51 -07:00
go go/doc: fix URL matched in ToHTML 2014-04-08 13:51:44 -07:00
hash all: merge NaCl branch (part 1) 2014-02-25 09:47:42 -05:00
html html/template: fix two unrelated bugs 2014-04-09 15:57:50 +10:00
image image/jpeg: return a FormatError when hitting an unexpected io.EOF 2014-02-28 15:18:35 +11:00
index/suffixarray
io io: clarify MultiReader documentation 2014-01-28 19:49:29 +11:00
log all: merge NaCl branch (part 1) 2014-02-25 09:47:42 -05:00
math math/cmplx: define Pow(0, x) for problematic values of x. 2014-03-25 11:25:20 +11:00
mime all: merge NaCl branch (part 1) 2014-02-25 09:47:42 -05:00
net net/http: close Body in client code always, even on errors, and document 2014-04-14 08:06:13 -07:00
os os/signal: use unique program name during TestCtrlBreak 2014-04-11 16:43:36 +10:00
path path/filepath: fixed misaligned comment. 2014-03-11 14:34:07 -07:00
reflect reflect: fix variadic arg for funcs created by MakeFunc. 2014-04-08 22:35:23 -04:00
regexp regexp/syntax: remove InstLast 2014-03-27 14:05:14 -04:00
runtime sync: less agressive local caching in Pool 2014-04-14 21:13:32 +04:00
sort
strconv strconv: CanBackquote should reject \x7F 2014-03-19 10:16:48 +11:00
strings bytes, strings: more consistent error messages 2014-04-10 21:45:41 -07:00
sync sync: less agressive local caching in Pool 2014-04-14 21:13:32 +04:00
syscall syscall: fix Getfsstat() for BSD 2014-04-10 13:58:03 +10:00
testing testing: fix bogus benchmark 2014-02-24 21:12:44 +04:00
text text/scanner: handle non-io.EOF errors 2014-03-21 17:05:57 -07:00
time time: increase timeout in negative sleep duration test 2014-04-02 08:23:35 +11:00
unicode unicode/utf8: minor code simplification 2014-03-23 15:44:29 -07:00
unsafe