Todd Lipcon has submitted this change and it was merged. (
http://gerrit.cloudera.org:8080/15701 )
Change subject: client/tserver: add support for connecting over unix domain
sockets
......................................................................
client/tserver: add support for connecting over unix domain sockets
This adds new experiental flags -rpc_listen_on_unix_domain_socket and
-client_use_unix_domain_sockets. The former makes the RPC server bind to
a unix socket and advertise this to the kudu master as part of the TS
registration. The latter makes the client attempt to connect via a
domain socket when it sees such a socket path advertised.
Note that this makes one behavioral change even when those flags are not
enabled: we now consider any tablet server with a loopback IP to be
"local" (and thus a candidate for unix domain socket connection). This
mostly affects the MiniCluster where tablet servers register using
various IPs in the loopback range 127.0.0.0/8, and was necessary in
order to test unix socket connections from the client.
I perf tested by scanning an int32 column from a table with 800M rows
and using 'perf stat -a -r10' to look at total CPU consumption across
the tserver and system. There's a fair amount of variability here due to
inconsistent scheduling to cores/numa nodes, but seems like the unix
socket on average is 10% faster or so in terms of total cycles.
TCP sockets:
Performance counter stats for 'system wide' (10 runs):
148,367.78 msec cpu-clock # 87.755 CPUs utilized
( +- 4.82% )
101,755 context-switches # 0.686 K/sec
( +- 9.03% )
866 cpu-migrations # 0.006 K/sec
( +- 6.42% )
21,440 page-faults # 0.145 K/sec
( +- 19.32% )
43,847,792,445 cycles # 0.296 GHz
( +- 3.77% ) (1.01%)
50,668,281,554 instructions # 1.16 insn per cycle
( +- 1.80% ) (1.11%)
7,676,337,185 branches # 51.739 M/sec
( +- 4.61% ) (0.85%)
69,634,718 branch-misses # 0.91% of all branches
( +- 4.72% ) (0.84%)
1.6907 +- 0.0811 seconds time elapsed ( +- 4.80% )
Unix sockets:
Performance counter stats for 'system wide' (10 runs):
136,877.86 msec cpu-clock # 87.638 CPUs utilized
( +- 2.67% )
77,376 context-switches # 0.565 K/sec
( +- 14.16% )
846 cpu-migrations # 0.006 K/sec
( +- 6.58% )
23,430 page-faults # 0.171 K/sec
( +- 39.77% )
39,106,012,185 cycles # 0.286 GHz
( +- 4.26% ) (0.99%)
48,957,283,894 instructions # 1.25 insn per cycle
( +- 2.24% ) (1.08%)
7,635,756,771 branches # 55.785 M/sec
( +- 3.54% ) (0.83%)
69,900,882 branch-misses # 0.92% of all branches
( +- 5.14% ) (0.82%)
1.5619 +- 0.0415 seconds time elapsed ( +- 2.66% )
Change-Id: I0c390b4209ac7e08cd45239c49499fb0b96405d0
Reviewed-on: http://gerrit.cloudera.org:8080/15701
Tested-by: Kudu Jenkins
Reviewed-by: Andrew Wong <[email protected]>
---
M src/kudu/client/client-internal.cc
M src/kudu/client/client-test.cc
M src/kudu/client/meta_cache.cc
M src/kudu/client/meta_cache.h
M src/kudu/common/wire_protocol.cc
M src/kudu/common/wire_protocol.proto
M src/kudu/master/catalog_manager.cc
M src/kudu/master/master.proto
M src/kudu/rpc/acceptor_pool.cc
M src/kudu/server/rpc_server.cc
M src/kudu/server/rpc_server.h
M src/kudu/server/server_base.cc
M src/kudu/tserver/heartbeater.cc
M src/kudu/util/net/sockaddr.cc
M src/kudu/util/net/sockaddr.h
15 files changed, 163 insertions(+), 9 deletions(-)
Approvals:
Kudu Jenkins: Verified
Andrew Wong: Looks good to me, approved
--
To view, visit http://gerrit.cloudera.org:8080/15701
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I0c390b4209ac7e08cd45239c49499fb0b96405d0
Gerrit-Change-Number: 15701
Gerrit-PatchSet: 6
Gerrit-Owner: Todd Lipcon <[email protected]>
Gerrit-Reviewer: Andrew Wong <[email protected]>
Gerrit-Reviewer: Andrew Wong <[email protected]>
Gerrit-Reviewer: Bankim Bhavsar <[email protected]>
Gerrit-Reviewer: Grant Henke <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mike Percy <[email protected]>
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Todd Lipcon <[email protected]>