Commit 3c221fd
MB-36029: Shard Timings::interval_counters by core.
Cache contention was observed when many threads attempt to update
the same interval_counters elements at the same time. Shard this
by core to reduce the contention.
False sharing was also observed with Bucket::response_counters.
Cacheline pad the Timings object to prevent this.
Perf stats (Triton 2 Node 80/20 R/W test):
Before: 3,511,611 (Average of 24 runs)
After: 3,563,007 (Average of 5 runs)
Change-Id: I854bc654072f6789c82296a6e10cb54e8d5cdd13
Reviewed-on: http://review.couchbase.org/111868
Reviewed-by: Dave Rigby <[email protected]>
Tested-by: Build Bot <[email protected]>1 parent 0dd246f commit 3c221fd
2 files changed
+22
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
55 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
56 | 58 | | |
57 | 59 | | |
58 | 60 | | |
| |||
170 | 172 | | |
171 | 173 | | |
172 | 174 | | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
178 | 181 | | |
179 | 182 | | |
180 | 183 | | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
186 | 190 | | |
187 | 191 | | |
188 | 192 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
72 | 73 | | |
73 | 74 | | |
74 | 75 | | |
75 | | - | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
76 | 81 | | |
0 commit comments