Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance #20

Closed
benjchristensen opened this issue Aug 21, 2015 · 2 comments
Closed

Performance #20

benjchristensen opened this issue Aug 21, 2015 · 2 comments

Comments

@benjchristensen
Copy link
Contributor

As of 3e52b25 the performance looks as follows:

./gradlew benchmarks '-Pjmh=-f 1 -tu s -bm thrpt -wi 5 -i 5 -r 6 .*ReactiveSocketPerf*'

Benchmark                                   Mode  Cnt        Score        Error  Units
ReactiveSocketPerf.requestResponseHello    thrpt    5  3466701.646 ± 232969.245  ops/s
ReactiveSocketPerf.requestStreamHello1000  thrpt    5    13441.690 ±    977.459  ops/s

(On my 2.3 GHz Intel Core i7 running OSX)

This involves no IO, just an in-memory dual-channel for simulating transport and exercising the protocol handlers.

This is 3.5M "hello" request/response per second (with a static payload each time) and 16M messages/second with streams of 1000 "hello" messages (again, all static, so no compute time to encoding).

Here is a Flight Recorder screenshot of the requestResponse test:

screen shot 2015-08-20 at 7 49 41 pm

screen shot 2015-08-20 at 7 51 19 pm

@benjchristensen
Copy link
Contributor Author

The code is currently not production ready. I cut corners to get a pure ReactiveStreams and imperative implementation functioning. There are places where 'merge' would typically be used to manage multiple 'onError' or 'onComplete' signals, but are currently racing each other, or being allowed to occur concurrently. I think all 'onNext' behavior is okay. I also don't trust the cancellation and backpressure (the 'request(n)' semantics).

As we flush out the rest of the functionality and unit tests, I intend to start adding back in composition (such as 'merge') to get the needed correctness, while using these benchmarks as a point of comparison. Unless there is a major functional bug currently that makes these numbers useless, my hope is that the rough edges right now can be polished without significantly affecting these numbers.

@benjchristensen
Copy link
Contributor Author

Old ... moved on to new perf issues after fixing other ones and adding more functionality.

stevegury pushed a commit that referenced this issue Jun 8, 2016
ilayaperumalg pushed a commit to ilayaperumalg/rsocket-java that referenced this issue Dec 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant