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

add benchmark results to docs #9

Open
gucki opened this issue Aug 15, 2015 · 2 comments
Open

add benchmark results to docs #9

gucki opened this issue Aug 15, 2015 · 2 comments
Assignees

Comments

@gucki
Copy link

gucki commented Aug 15, 2015

You state your library is high performace, but It'd be great if the docs would contain some performance numbers/ benchmarks compared to net/rpc. Especially for different workloads (small requests, large requests with byte slices, ...).

@valyala valyala changed the title add benchmarks to docs add benchmark results to docs Aug 16, 2015
valyala added a commit that referenced this issue Aug 16, 2015
…nce client and server in these benchmarks run on the same machine instead of network, they cannot expose full potential of automatic message batching employed in gorpc
@valyala
Copy link
Owner

valyala commented Aug 16, 2015

I'll definitely add real-life benchmark results comparing gorpc to net/rpc (and, probably, other popular rpc implementations) into README.md.

Currently bench_test.go contains benchmarks, which can be used for performance comparisons with certain grain of salt. Here are results from my machine:

    $ go test -run=None -bench=rpc
    PASS
    BenchmarkNetrpcInt-4           50000         29676 ns/op
    BenchmarkNetrpcByteSlice-4     50000         30501 ns/op
    BenchmarkNetrpcStruct-4        20000         75986 ns/op
    BenchmarkGorpcInt-4           100000         20267 ns/op
    BenchmarkGorpcByteSlice-4      50000         21694 ns/op
    BenchmarkGorpcStruct-4         20000         62887 ns/op

These results may be far from real life, since both server and client are running on the same machine during benchmarks. In the real world client and server are usually located on distinct physical machines connected over the network. Gorpc should work faster in the real world, since it:

  • minimizes the number of send()/recv() syscalls under high load (which, in turn, should minimize the number of network packets required for rpc).
  • minimizes the amount of data floating over the network between client and server.

@valyala valyala self-assigned this Aug 16, 2015
@renanbastos93
Copy link

Maybe, we can put on benchmark to compare with gRPC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants