Files
nats-server/server
Ivan Kozlovic 7b116379cb Propose going back to condition variable to notify writeLoop
This is how it was up to v2.1.2 included (changed in v2.1.4 onward).
I added a benchmark that has 3 subscribers running and increase
the number of publishers: 1, 2, 5 and 10. This is the comparison
between the pre-PR and post-PR:

```
benchcmp old.txt new.txt
benchmark                           old ns/op     new ns/op     delta
Benchmark___BumpPubCount_1x3-16     396           385           -2.78%
Benchmark___BumpPubCount_2x3-16     495           406           -17.98%
Benchmark___BumpPubCount_5x3-16     542           395           -27.12%
Benchmark__BumpPubCount_10x3-16     549           515           -6.19%

benchmark                           old MB/s     new MB/s     speedup
Benchmark___BumpPubCount_1x3-16     717.27       737.54       1.03x
Benchmark___BumpPubCount_2x3-16     574.31       699.02       1.22x
Benchmark___BumpPubCount_5x3-16     524.35       718.80       1.37x
Benchmark__BumpPubCount_10x3-16     517.26       551.53       1.07x
```

It is inline with what the user reported, seeing a 20% drop in performance
when going from 1 publisher to 2. But, as we can see, the difference
between go channel and cond variable reduces with the increased number
of publishers after a certain number.

I am not sure of the performance impact on other situations, so this
PR is more of a proposal than a fix.

Resolves #1786

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2021-01-12 12:24:37 -07:00
..
2020-06-12 15:48:38 -07:00
2020-05-19 14:15:11 -07:00
2020-11-30 20:08:44 -07:00
2020-12-07 10:07:30 -07:00
2020-12-14 19:48:54 -05:00
2020-02-25 19:53:09 -05:00
2020-12-01 15:38:47 -07:00
2020-11-17 18:57:45 +00:00
2020-12-28 12:28:55 -07:00
2020-12-28 12:28:55 -07:00
2020-12-01 15:38:47 -07:00
2021-01-07 18:19:25 -05:00
2019-05-06 15:41:38 -07:00
2020-12-10 10:55:41 -07:00
2020-12-10 10:55:41 -07:00
2019-12-12 11:58:24 -07:00
2018-12-06 15:09:14 -08:00
2021-01-07 18:19:25 -05:00
2020-11-30 20:08:44 -07:00
2020-06-12 10:03:47 -06:00
2018-10-06 14:06:14 -07:00
2020-12-02 15:52:06 -07:00
2020-10-09 09:36:30 -06:00
2020-11-30 20:08:44 -07:00
2018-03-15 22:31:07 -07:00
2019-11-14 20:05:32 -07:00
2018-03-15 22:31:07 -07:00
2019-11-14 20:05:32 -07:00
2019-11-14 20:05:32 -07:00
2019-12-12 11:58:24 -07:00
2020-11-30 20:08:44 -07:00