Commit Graph

607 Commits

Author SHA1 Message Date
Karthik Ravi Shankar dad3f34207
Revert "Revert "Revert "Folding the Channel class into the grpc_impl namespace.""" 2019-04-10 12:14:04 -07:00
Karthik Ravi Shankar 9875fabdd4 Merge branch 'master' into revert-18076-revert-17797-channel 2019-04-08 12:55:07 -07:00
Karthik Ravi Shankar dcc199048f
Merge pull request #18396 from grpc/revert-18392-revert-18223-grpc_namespace_opencensus
Revert "Revert "Fold opencensus into grpc_impl namespace""
2019-03-29 10:09:01 -07:00
Bill Feng c1b03b68da Merge remote-tracking branch 'upstream/master' into feature/reinstate-rbe-windows 2019-03-28 16:45:41 -07:00
Guantao Liu 872d2787a0 Avoid using grpc_core::Executor when the background poller is available.
Instead, run closures in the background poller. This will generally
avoid the thread hop in the gRPC runtime.
2019-03-25 16:19:08 -07:00
Karthik Ravi Shankar 4e0923e802 Fix errors from clang_format_code.sh 2019-03-25 15:49:22 -07:00
Bill Feng d49cdbd01f Merge remote-tracking branch 'upstream/master' into feature/reinstate-rbe-windows 2019-03-25 14:09:00 -07:00
Soheil Hassas Yeganeh a3366c1b7f
Merge pull request #18464 from soheilhy/slice-buffer
Introduce grpc_byte_buffer_reader_peek and use it for Protobuf parsing.
2019-03-23 22:42:23 -04:00
Soheil Hassas Yeganeh 1014fe507f Use const ref for grpc_slice.
We are copying the slice on every call creation, which is hurting
ping/pong traffic.
2019-03-22 06:38:33 -04:00
Bill Feng d93959853f Enabled Windows Bazel build for cpp tests 2019-03-21 18:00:48 -07:00
Karthik Ravi Shankar 4260fe1147 More fixes 2019-03-21 17:51:28 -07:00
Soheil Hassas Yeganeh ad1b3e5094 Introduce grpc_byte_buffer_reader_peek and use it for Protobuf parsing.
grpc_byte_buffer_reader_next() copies and references the slice. This
is not always necessary since the caller will not use the slice
after destroying the byte buffer.

A prominent example is the protobuf parser, which
calls grpc_byte_buffer_reader_next() and immediately unrefs the slice
after the call. This ref() and unref() calls can be very expensive
in the hot path.

This commit introduces grpc_byte_buffer_reader_peek() which
essentialy return a pointer to the slice in the buffer, i.e.,
no copies, and no refs.

QPS of 1MiB 1 Channel callback benchmark increases by 5%.
More importantly insructions per cycle is increased by 10%.

Also add tests and benchmarks for byte_buffer_reader_peek()

This commit reaplies 509e77a5a3
2019-03-21 06:03:45 -04:00
Karthik Ravi Shankar 2a8f3f79ab Fix more namespace stuff 2019-03-15 17:08:58 -07:00
Karthik Ravi Shankar f66b654795
Revert "Revert "Fold opencensus into grpc_impl namespace"" 2019-03-15 11:30:23 -07:00
Karthik Ravi Shankar 3b4835d92d
Merge pull request #18392 from grpc/revert-18223-grpc_namespace_opencensus
Revert "Fold opencensus into grpc_impl namespace"
2019-03-15 11:27:35 -07:00
Karthik Ravi Shankar 2bf934f97d
Revert "Fold opencensus into grpc_impl namespace" 2019-03-15 10:20:06 -07:00
Jan Tattermusch cf6a311761
Revert "Windows builds for gRPC C++ tests" 2019-03-15 17:15:20 +01:00
Karthik Ravi Shankar 276c4dc593
Merge pull request #18223 from grpc/grpc_namespace_opencensus
Fold opencensus into grpc_impl namespace
2019-03-08 15:45:03 -08:00
Bill Feng d61f690a33
Merge pull request #18285 from billfeng327/update-deps-version
Windows local Bazel build for gRPC C++ tests
2019-03-08 14:17:36 -08:00
Soheil Hassas Yeganeh 0031393a17
Merge pull request #18240 from soheilhy/tcp-inq
Implement TCP_INQ for gRPC in Linux
2019-03-08 11:29:39 -05:00
billfeng327 9e102ea8b0 excluded non-compatible test 2019-03-07 16:14:02 -08:00
billfeng327 4241edeaa4 renamed tag to no_windows in conformation with Bazel and TensorFlow 2019-03-07 14:52:49 -08:00
Soheil Hassas Yeganeh 18b19105f2 Implement TCP_INQ for gRPC in Linux
TCP_INQ is a socket option we added to Linux to report pending bytes
on the socket as a control message.

Using TCP_INQ we can accurately decide whether to continue read or not.
Add an urgent parameter, when we do not want to wait for EPOLLIN.

This commit improves the latency of 1 RPC unary (minimal benchmark)
significantly:

  Before:
    l_50: 61.3584984733
    l_90: 94.8328711277
    l_99: 126.211351174
    l_999: 158.722406029

  After:
    l_50: 51.3546011488 (-16%)
    l_90: 72.3420731581 (-23%)
    l_99: 103.280218974 (-18%)
    l_999: 130.905689996 (-17%)
2019-03-06 22:15:53 -05:00
billfeng327 928aedf5c8 Merge branch 'master' into update-deps-version 2019-03-06 15:48:29 -08:00
billfeng327 ab06853fc9 C++ Windows test builds 2019-03-06 15:47:49 -08:00
Soheil Hassas Yeganeh c060d55cc7
Revert "Introduce grpc_byte_buffer_reader_peek and use it for Protobuf parsing." 2019-03-05 14:01:01 -05:00
Karthik Ravi Shankar b606cad6cc Fold opencensus into grpc_impl namespace
Moving opencensus into grpc_impl namespace..
2019-03-04 15:47:37 -08:00
Soheil Hassas Yeganeh 509e77a5a3 Introduce grpc_byte_buffer_reader_peek and use it for Protobuf parsing.
grpc_byte_buffer_reader_next() copies and references the slice. This
is not always necessary since the caller will not use the slice
after destroying the byte buffer.

A prominent example is the protobuf parser, which
calls grpc_byte_buffer_reader_next() and immediately unrefs the slice
after the call. This ref() and unref() calls can be very expensive
in the hot path.

This commit introduces grpc_byte_buffer_reader_peek() which
essentialy return a pointer to the slice in the buffer, i.e.,
no copies, and no refs.

QPS of 1MiB 1 Channel callback benchmark increases by 5%.
More importantly insructions per cycle is increased by 10%.

Also add tests and benchmarks for byte_buffer_reader_peek()
2019-03-04 14:17:46 -05:00
Mark D. Roth 251d66aac6 Convert client channel factory to C++ 2019-03-01 08:40:21 -08:00
Nicolas Noble 91ad888497
Revert "Revert "Folding the Channel class into the grpc_impl namespace."" 2019-02-27 16:53:23 -08:00
Vijay Pai 29191d5eda Need to properly init library for microbenchmarks 2019-02-26 12:44:13 -08:00
Mark D. Roth aa149fedbb Revert "Merge pull request #18093 from grpc/revert-17770-lb_policy_picker_api"
This reverts commit f327b83706, reversing
changes made to b3b5d63423.
2019-02-19 13:19:24 -08:00
hcaseyal 275296c594
Revert "LB policy picker API" 2019-02-19 11:05:52 -08:00
Soheil Hassas Yeganeh db38d4ca9b
Merge pull request #17939 from vertextao/gpr_mu_cv-leak-test
Add ASAN-only leak detection for gpr_mu/cv and fix the newly caught leaks
2019-02-15 21:43:32 -05:00
Nicolas Noble 2ad245cb0c
Revert "Folding the Channel class into the grpc_impl namespace." 2019-02-15 09:52:15 -08:00
xtao 7766912dda
fix more detected mu/cv leaks 2019-02-16 00:00:50 +08:00
Nicolas "Pixel" Noble de332cfcee Merge branch 'master' of https://github.com/grpc/grpc into channel 2019-02-13 22:11:47 +01:00
Mark D. Roth bab8123763 LB policy picker API 2019-02-13 08:30:04 -08:00
Nicolas "Pixel" Noble 63db582516 Merge branch 'master' of https://github.com/grpc/grpc into channel 2019-02-13 00:19:23 +01:00
Vijay Pai f919ace038 Add a microbenchmark for immediately-firing alarms 2019-02-07 08:38:26 -08:00
Juanli Shen 4f3c1572e1
Revert "Revert "C++-ify subchannel"" 2019-01-30 10:23:07 -08:00
Juanli Shen bbfc024a02
Revert "C++-ify subchannel" 2019-01-29 15:23:55 -08:00
Juanli Shen 25dc2ffed6 C++-ify subchannel 2019-01-29 13:00:02 -08:00
Nicolas "Pixel" Noble 2fd079ff7c Channel folding. 2019-01-23 21:40:07 +01:00
Vijay Pai fab05d336c Dynamic callback requesting, graceful server shutdown, and separate ExecCtx for callbacks 2019-01-23 11:21:50 -08:00
Vijay Pai 302e7b4d2b
Merge pull request #17658 from guantaol/avoid_thd_jump
Avoid the thread jump in server callback APIs.
2019-01-09 13:43:24 -08:00
Juanli Shen 23677bd827 Remove subchannel args 2019-01-08 19:43:45 -08:00
Guantao Liu 11eff929e2 Avoid the thread jump in server callback APIs.
Add a utility function in iomgr to check whether the caller thread is a
worker for any background poller, and keep grpc combiner from offloading
closures to the default executor if the current thread is a worker for
any background poller.
2019-01-07 18:22:50 -08:00
Soheil Hassas Yeganeh 2e017da58a Add microbenchmarks for grpc_timer
This helps assessing upcoming changes.
2018-12-21 18:56:09 -05:00
yang-g 038a71d826 Merge remote-tracking branch 'upstream/master' into gpr_test_util_to_grpc_test_util 2018-12-17 08:52:20 -08:00