Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
216 commits
Select commit Hold shift + click to select a range
efa9435
rpc test infra change
Corey-Zumar Aug 23, 2017
67a6530
rpcbench more
Corey-Zumar Aug 23, 2017
50f6429
bench, metrics fix
Corey-Zumar Aug 23, 2017
da3ab5e
concurrent queue for rpc
Corey-Zumar Aug 23, 2017
abb0591
Add send/recv balance to rpc bench
Corey-Zumar Aug 24, 2017
699b65c
multi container bench
Corey-Zumar Aug 24, 2017
7599f9a
add concurrent queue
Corey-Zumar Aug 24, 2017
7b67e81
fix end_to_end bench
Corey-Zumar Aug 24, 2017
1429039
[CLIPPER-224] Replace boost futures with folly futures (#266)
Corey-Zumar Aug 25, 2017
d968873
Merge remote-tracking branch 'crankshaw/high-perf-clipper' into perfo…
Corey-Zumar Aug 25, 2017
6eb5af9
query proc return default future
Corey-Zumar Aug 26, 2017
f868a91
grpc benchmark script
Corey-Zumar Aug 26, 2017
27f71e0
Add request throughput meter to grpc frontend
Corey-Zumar Aug 28, 2017
9f779b2
change meter name
Corey-Zumar Aug 29, 2017
08574b5
Add metrics reporting
Corey-Zumar Aug 29, 2017
59e45bb
update grpc bench
Corey-Zumar Aug 29, 2017
8331c1f
fixes
Corey-Zumar Aug 29, 2017
76653c0
frontend fixes
Corey-Zumar Aug 29, 2017
2e5d9b3
update grpc benchmark
Corey-Zumar Aug 29, 2017
9db8592
multiproc changes
Corey-Zumar Aug 29, 2017
8a77bde
more bench fixes
Corey-Zumar Aug 29, 2017
1306169
allow query proc to flourish
Corey-Zumar Aug 29, 2017
730a295
logging perf
Corey-Zumar Aug 29, 2017
77bdc83
batch size log
Corey-Zumar Aug 29, 2017
cb8f47b
Management frontend: Improve clarity of response messages (#271)
Corey-Zumar Aug 29, 2017
8a1eabb
logs
Corey-Zumar Aug 29, 2017
c763a7c
queue size
Corey-Zumar Aug 29, 2017
b30d7a9
Fix histogram overflow errors (#272)
Corey-Zumar Aug 29, 2017
33941f1
Implement CLOCK policy
Corey-Zumar Aug 13, 2017
b9daf08
add cache tests
Corey-Zumar Aug 14, 2017
dd7a78b
revert clipper mgr changes
Corey-Zumar Aug 14, 2017
799e6ff
remove quotes
Corey-Zumar Aug 14, 2017
4c2025d
add test assertion
Corey-Zumar Aug 14, 2017
4b646d1
format code
Corey-Zumar Aug 14, 2017
6417d10
Refactor PredictionCache to evict based on byte size rather than num …
Corey-Zumar Aug 15, 2017
5e06289
Add config flag for cache size
Corey-Zumar Aug 15, 2017
7e815ef
Format code
Corey-Zumar Aug 15, 2017
7402ba2
Update config tests
Corey-Zumar Aug 15, 2017
7035dc6
format code
Corey-Zumar Aug 15, 2017
babf68d
Update config.hpp
Corey-Zumar Aug 15, 2017
9c083c2
Remove unused task executor threadpool size config
Corey-Zumar Aug 22, 2017
38743da
Add cache size option to clipper mgr
Corey-Zumar Aug 22, 2017
cfbb5fe
format code
Corey-Zumar Aug 23, 2017
185ef15
remove task execution variable
Corey-Zumar Aug 23, 2017
a6aac4d
when evicting, stop if we're out of pages
Corey-Zumar Aug 23, 2017
2cf9f76
remove task execution test statement
Corey-Zumar Aug 23, 2017
58a16c0
Fix rebase issue
Corey-Zumar Aug 29, 2017
1569bf8
updates
Corey-Zumar Aug 29, 2017
389f495
fix
Corey-Zumar Aug 29, 2017
6ecf918
qp limit
Corey-Zumar Aug 29, 2017
2eee792
fix
Corey-Zumar Aug 29, 2017
8e99a2f
fix test
Corey-Zumar Aug 29, 2017
03951a2
qp lat
Corey-Zumar Aug 29, 2017
3f0578d
fix
Corey-Zumar Aug 29, 2017
8e5b82f
fox
Corey-Zumar Aug 29, 2017
7ebbd2d
test
Corey-Zumar Aug 29, 2017
f6f89bc
test2
Corey-Zumar Aug 29, 2017
c93d1af
test3
Corey-Zumar Aug 29, 2017
9069a38
test4
Corey-Zumar Aug 29, 2017
6a643e4
test5
Corey-Zumar Aug 30, 2017
f06e61a
Wangle
Corey-Zumar Aug 30, 2017
7f3a3fa
more wangle
Corey-Zumar Aug 30, 2017
278c43d
threadpool
Corey-Zumar Aug 30, 2017
acec135
..
Corey-Zumar Aug 30, 2017
fb8bf0b
link wangle
Corey-Zumar Aug 30, 2017
e089705
bench log
Corey-Zumar Aug 30, 2017
0cb3df3
update
Corey-Zumar Aug 30, 2017
3df974b
..
Corey-Zumar Aug 30, 2017
f881823
test
Corey-Zumar Aug 30, 2017
f669e1f
test
Corey-Zumar Aug 30, 2017
c8f942d
testfix
Corey-Zumar Aug 30, 2017
3d688ee
test2
Corey-Zumar Aug 30, 2017
e6d4511
fixes
Corey-Zumar Aug 30, 2017
9b3617d
var naming
Corey-Zumar Aug 30, 2017
fa412a9
more metrics
Corey-Zumar Aug 30, 2017
abb93d2
time diff
Corey-Zumar Aug 30, 2017
32cb8b3
..
Corey-Zumar Aug 30, 2017
372f39b
one more metric change
Corey-Zumar Aug 30, 2017
be7c474
queue insert metric
Corey-Zumar Aug 30, 2017
b265fee
more seg monitor
Corey-Zumar Aug 30, 2017
166a1cc
measure something that probably isn't the issue
Corey-Zumar Aug 30, 2017
26529cb
measure something that probably is the problem
Corey-Zumar Aug 30, 2017
91158c0
fixes
Corey-Zumar Aug 30, 2017
68b697c
hopeful move fix
Corey-Zumar Aug 30, 2017
5939856
measure other part of cache
Corey-Zumar Aug 30, 2017
addde44
measure cache put
Corey-Zumar Aug 30, 2017
3a6771b
measure with some wangle
Corey-Zumar Aug 30, 2017
6450a81
wangle with the frontend
Corey-Zumar Aug 30, 2017
d3cccc9
more measure
Corey-Zumar Aug 30, 2017
cd07411
hone measurement
Corey-Zumar Aug 30, 2017
6e620ce
try fix
Corey-Zumar Aug 30, 2017
997b675
var issues
Corey-Zumar Aug 30, 2017
eeb647c
add move
Corey-Zumar Aug 30, 2017
e73a6bb
make copy
Corey-Zumar Aug 30, 2017
f415b5e
Add a log
Corey-Zumar Aug 30, 2017
b2b0cc1
expect tid match
Corey-Zumar Aug 30, 2017
7a06368
remove log
Corey-Zumar Aug 30, 2017
aaac0d6
another continuation change
Corey-Zumar Aug 30, 2017
9f8ebff
bump hist size
Corey-Zumar Aug 30, 2017
2f41546
change cache seg to fetch
Corey-Zumar Aug 31, 2017
ed90bed
urgh
Corey-Zumar Aug 31, 2017
dd5d494
hm
Corey-Zumar Aug 31, 2017
02b8992
fix segfault
Corey-Zumar Aug 31, 2017
24cce60
var naming
Corey-Zumar Aug 31, 2017
9bddeaf
merge
Corey-Zumar Aug 31, 2017
50cd9aa
fix merge issues
Corey-Zumar Aug 31, 2017
299853b
measure cache insertion latency
Corey-Zumar Aug 31, 2017
8f44240
cache eviction
Corey-Zumar Aug 31, 2017
c1257e1
cache unique ptr
Corey-Zumar Aug 31, 2017
c2c955d
fix method prototype
Corey-Zumar Aug 31, 2017
2a99582
fixes
Corey-Zumar Aug 31, 2017
31cd2a8
remove hit ratio
Corey-Zumar Aug 31, 2017
4b5b0d1
remove lookups counter
Corey-Zumar Aug 31, 2017
5ba9c94
bench other seg
Corey-Zumar Aug 31, 2017
3ebf5dd
metric move
Corey-Zumar Aug 31, 2017
369e54a
change qp seg hist
Corey-Zumar Aug 31, 2017
a4219fe
move hist
Corey-Zumar Aug 31, 2017
6eeef09
..
Corey-Zumar Aug 31, 2017
d1f6286
hist size
Corey-Zumar Aug 31, 2017
2cd4b8b
...
Corey-Zumar Aug 31, 2017
79f627d
send/recv balance
Corey-Zumar Aug 31, 2017
ba24c9f
meterfix
Corey-Zumar Aug 31, 2017
ab0ae94
remove metrics
Corey-Zumar Aug 31, 2017
1ebdc16
experiment
Corey-Zumar Aug 31, 2017
bc49767
varfix
Corey-Zumar Aug 31, 2017
0c69de7
..
Corey-Zumar Aug 31, 2017
38d6864
...
Corey-Zumar Aug 31, 2017
8ea1858
..
Corey-Zumar Aug 31, 2017
ceda0ff
logging
Corey-Zumar Aug 31, 2017
cb50e4b
varfix
Corey-Zumar Aug 31, 2017
415098b
why
Corey-Zumar Aug 31, 2017
8bf3de2
measure elsewhere
Corey-Zumar Aug 31, 2017
5d9422e
measure thread task lat
Corey-Zumar Aug 31, 2017
9475da9
compfixes
Corey-Zumar Aug 31, 2017
22bb69f
compfix2
Corey-Zumar Aug 31, 2017
3910c9b
compfix3
Corey-Zumar Aug 31, 2017
33b2786
fail to fix seg fault
Corey-Zumar Aug 31, 2017
989adb4
fix segfault
Corey-Zumar Aug 31, 2017
4020ab3
get num steps
Corey-Zumar Aug 31, 2017
b80d78d
time first pass
Corey-Zumar Aug 31, 2017
b8446bc
track queue insertion
Corey-Zumar Aug 31, 2017
42fd6ff
log output
Corey-Zumar Aug 31, 2017
9c0d02e
Add moar ctx
Corey-Zumar Aug 31, 2017
fc7c7f0
Remove log
Corey-Zumar Aug 31, 2017
0df8ad9
..
Corey-Zumar Aug 31, 2017
555c834
Add a logging tag
Corey-Zumar Aug 31, 2017
6ce0f83
varfix
Corey-Zumar Aug 31, 2017
3267b4a
zmq frontend
Corey-Zumar Sep 1, 2017
218635b
cmake fix
Corey-Zumar Sep 1, 2017
9f8f2fd
import fixes
Corey-Zumar Sep 1, 2017
80c1e01
remove grpc stuff
Corey-Zumar Sep 1, 2017
599effd
fixes
Corey-Zumar Sep 1, 2017
97d0ac5
more fixes
Corey-Zumar Sep 1, 2017
ad3371f
fixes again
Corey-Zumar Sep 1, 2017
9d035ea
fix
Corey-Zumar Sep 1, 2017
0d309db
zmq client
Corey-Zumar Sep 1, 2017
dbc502a
varfox
Corey-Zumar Sep 1, 2017
e2e5f1f
add socket bind
Corey-Zumar Sep 1, 2017
40e50b3
string conversion
Corey-Zumar Sep 1, 2017
07698a7
update
Corey-Zumar Sep 1, 2017
7b2893a
..
Corey-Zumar Sep 1, 2017
deec671
....
Corey-Zumar Sep 1, 2017
a1d6b85
test
Corey-Zumar Sep 1, 2017
6de47d0
...
Corey-Zumar Sep 1, 2017
261bf96
protocol fix
Corey-Zumar Sep 1, 2017
ff6ae41
fix?
Corey-Zumar Sep 1, 2017
027a437
fail
Corey-Zumar Sep 1, 2017
6ed74bb
fix polling
Corey-Zumar Sep 1, 2017
977ef3c
client fix
Corey-Zumar Sep 1, 2017
9c3782e
api fix
Corey-Zumar Sep 1, 2017
1351ce1
fixes
Corey-Zumar Sep 1, 2017
9d97c4b
actually add the application to rpc
Corey-Zumar Sep 1, 2017
f0f96ae
debug
Corey-Zumar Sep 1, 2017
3a78bac
bench fix
Corey-Zumar Sep 1, 2017
b5e7fef
client logs
Corey-Zumar Sep 1, 2017
6fc041e
client log
Corey-Zumar Sep 1, 2017
1a31ad2
new log
Corey-Zumar Sep 1, 2017
0992afe
Add hash checks
Corey-Zumar Sep 1, 2017
a0f9dfb
remove a log
Corey-Zumar Sep 1, 2017
fdba591
log
Corey-Zumar Sep 1, 2017
c7b3902
test
Corey-Zumar Sep 1, 2017
73b036e
routing id log
Corey-Zumar Sep 1, 2017
fdab1ff
cmake fix
Corey-Zumar Sep 1, 2017
d4751eb
import fix
Corey-Zumar Sep 1, 2017
7e78f03
client fix
Corey-Zumar Sep 1, 2017
953d1ee
routing id fix
Corey-Zumar Sep 1, 2017
999be4c
..
Corey-Zumar Sep 1, 2017
e96ebb2
constness
Corey-Zumar Sep 1, 2017
d3a3daf
try again
Corey-Zumar Sep 1, 2017
e236ab1
prototype changes
Corey-Zumar Sep 1, 2017
f3ad4f4
constness
Corey-Zumar Sep 1, 2017
9d08247
constness
Corey-Zumar Sep 1, 2017
afb091d
client test
Corey-Zumar Sep 1, 2017
07f8e99
client test
Corey-Zumar Sep 1, 2017
cf46db3
more routing id logs'
Corey-Zumar Sep 1, 2017
8dfa6fa
remove ref
Corey-Zumar Sep 1, 2017
7ee4262
remove move
Corey-Zumar Sep 1, 2017
1ae5765
routing id rpc log
Corey-Zumar Sep 1, 2017
cd05289
...
Corey-Zumar Sep 1, 2017
3a83462
req id int
Corey-Zumar Sep 1, 2017
c70194f
ordering
Corey-Zumar Sep 1, 2017
bfb44fe
fix really dumb error
Corey-Zumar Sep 1, 2017
9b4589a
prototype fixes
Corey-Zumar Sep 1, 2017
0406b76
client throughput logging
Corey-Zumar Sep 1, 2017
f7de85f
client fix
Corey-Zumar Sep 1, 2017
097d9d9
client fix2
Corey-Zumar Sep 1, 2017
f064f79
units
Corey-Zumar Sep 1, 2017
48fc2e1
..
Corey-Zumar Sep 1, 2017
246eea3
..
Corey-Zumar Sep 1, 2017
4b88015
clean up task executor
Corey-Zumar Sep 12, 2017
dae159a
cleanup qp
Corey-Zumar Sep 12, 2017
a1ba54b
cleanup
Corey-Zumar Sep 12, 2017
ffd104b
bench update
Corey-Zumar Sep 12, 2017
5d46c7b
remove unnecessary file handles from grpc bench
Corey-Zumar Sep 12, 2017
37c69a5
remove unused chron statements
Corey-Zumar Sep 12, 2017
5b8af92
re-add deadline comparator
Corey-Zumar Sep 12, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,18 @@ find_package(Folly REQUIRED)
add_library(folly INTERFACE IMPORTED)
set_property(TARGET folly PROPERTY
INTERFACE_INCLUDE_DIRECTORIES ${FOLLY_INCLUDE_DIR})
set(FOLLY_LINK_FLAGS "-lglog")
set(FOLLY_LINK_FLAGS "-lglog -lcrypto -lssl")
set_property(TARGET folly PROPERTY
INTERFACE_LINK_LIBRARIES ${FOLLY_LINK_FLAGS} ${FOLLY_LIBRARY})

# Include Wangle as an imported target
find_package(Wangle REQUIRED)
add_library(wangle INTERFACE IMPORTED)
set_property(TARGET wangle PROPERTY
INTERFACE_INCLUDE_DIRECTORIES ${WANGLE_INCLUDE_DIR})
set_property(TARGET wangle PROPERTY
INTERFACE_LINK_LIBRARIES ${WANGLE_LIBRARY})

# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -Wextra -Werror -Wno-deprecated-declarations -Wno-unsupported-friend")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wno-deprecated-declarations -Wno-unused-parameter -Wno-sign-compare")
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
Expand Down
12 changes: 9 additions & 3 deletions clipper_admin/clipper_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@

DEFAULT_REDIS_IP = "redis"
DEFAULT_REDIS_PORT = 6379
DEFAULT_PREDICTION_CACHE_SIZE_BYTES = 33554432L
CLIPPER_QUERY_PORT = 1337
CLIPPER_MANAGEMENT_PORT = 1338
CLIPPER_RPC_PORT = 7000
Expand Down Expand Up @@ -104,7 +105,9 @@ class Clipper:
restart_containers : bool, optional
If true, containers will restart on failure. If false, containers
will not restart automatically.

cache_size : int, optional
The size of Clipper's prediction cache in bytes. Default cache size is
32 MiB
"""

def __init__(self,
Expand All @@ -118,7 +121,8 @@ def __init__(self,
redis_port=DEFAULT_REDIS_PORT,
redis_persistence_path=None,
restart_containers=False,
rpc_frontend=False):
rpc_frontend=False,
cache_size=DEFAULT_PREDICTION_CACHE_SIZE_BYTES):
self.redis_ip = redis_ip
self.redis_port = redis_port
if rpc_frontend:
Expand Down Expand Up @@ -152,7 +156,8 @@ def __init__(self,
'query_frontend': {
'command': [
'--redis_ip=%s' % self.redis_ip,
'--redis_port=%d' % self.redis_port
'--redis_port=%d' % self.redis_port,
'--prediction_cache_size=%d' % cache_size
],
'depends_on': ['mgmt_frontend'],
'image':
Expand Down Expand Up @@ -1520,6 +1525,7 @@ def _publish_new_model(self, name, version, labels, input_type,
headers = {'Content-type': 'application/json'}
r = requests.post(url, headers=headers, data=req_json)
if r.status_code == requests.codes.ok:
print(r.text)
return True
else:
print("Error publishing model: %s" % r.text)
Expand Down
4 changes: 2 additions & 2 deletions cmake/FindFolly.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8.7 FATAL_ERROR)

INCLUDE(FindPackageHandleStandardArgs)

FIND_LIBRARY(FOLLY_LIBRARY folly)
FIND_PATH(FOLLY_INCLUDE_DIR "folly/String.h")
FIND_LIBRARY(FOLLY_LIBRARY folly PATHS $ENV{FOLLY_ROOT}/lib $ENV{PATH})
FIND_PATH(FOLLY_INCLUDE_DIR "folly/String.h" HINTS $ENV{FOLLY_ROOT}/include)

SET(FOLLY_LIBRARIES ${FOLLY_LIBRARY})

Expand Down
35 changes: 35 additions & 0 deletions cmake/FindWangle.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#
# - Try to find Facebook wangle library
# This will define
# WANGLE_FOUND
# WANGLE_INCLUDE_DIR
# WANGLE_LIBRARIES
#

find_package(Folly REQUIRED)

find_path(
WANGLE_INCLUDE_DIR
NAMES "wangle/channel/Pipeline.h"
HINTS
"/usr/local/facebook/include"
)

find_library(
WANGLE_LIBRARY
NAMES wangle
HINTS
"/usr/local/facebook/lib"
)

set(WANGLE_LIBRARIES ${WANGLE_LIBRARY} ${FOLLY_LIBRARIES})

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
WANGLE DEFAULT_MSG WANGLE_INCLUDE_DIR WANGLE_LIBRARIES)

mark_as_advanced(WANGLE_INCLUDE_DIR WANGLE_LIBRARIES WANGLE_FOUND)

if(WANGLE_FOUND AND NOT WANGLE_FIND_QUIETLY)
message(STATUS "WANGLE: ${WANGLE_INCLUDE_DIR}")
endif()
64 changes: 64 additions & 0 deletions grpc_client_py/grpc_benchmark.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
from __future__ import print_function

import sys
import grpc
import logging
import numpy as np
import time

import clipper_frontend_pb2
import clipper_frontend_pb2_grpc

from datetime import datetime
from multiprocessing import Process

DATA_TYPE_BYTES = 0
DATA_TYPE_INTS = 1
DATA_TYPE_FLOATS = 2
DATA_TYPE_DOUBLES = 3
DATA_TYPE_STRINGS = 4

CIFAR_SIZE_DOUBLES = 384

input_type = "doubles"
app_name = "app1"
model_name = "m1"

def run(proc_num):
channel = grpc.insecure_channel('localhost:1337')
stub = clipper_frontend_pb2_grpc.PredictStub(channel)
i = 0
latency = 0
file_name = "/tmp/bench_{}".format(proc_num)
while True:
begin = datetime.now()
x = clipper_frontend_pb2.DoubleData(data=list(np.random.random(CIFAR_SIZE_DOUBLES)))
req = clipper_frontend_pb2.PredictRequest(application=app_name, data_type=DATA_TYPE_DOUBLES, double_data=x)
response = stub.Predict(req)
print("Received response!")
end = datetime.now()

latency += (end - begin).total_seconds()

if i > 0 and i % 100 == 0:
print("Throughput: {} qps\n".format(float(latency) / i))
i = 0
latency = 0

i += 1

if __name__ == "__main__":
if len(sys.argv) < 2:
raise

num_procs = int(sys.argv[1])

processes = []

for i in range(num_procs):
p = Process(target=run, args=('%d'.format(i),))
p.start()
processes.append(p)

for p in processes:
p.join()
1 change: 1 addition & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ add_subdirectory(libs)
add_subdirectory(libclipper)
add_subdirectory(rest_frontend)
add_subdirectory(rpc_frontend)
add_subdirectory(zmq_frontend)
add_subdirectory(management)
add_subdirectory(benchmarks)
add_subdirectory(container)
3 changes: 2 additions & 1 deletion src/benchmarks/src/end_to_end_bench.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,9 @@ void run_benchmark(std::unordered_map<std::string, std::string> &config) {
static_cast<char *>(malloc(DEFAULT_OUTPUT.size())), free);
memcpy(default_output_content.get(), DEFAULT_OUTPUT.data(),
DEFAULT_OUTPUT.size());

clipper::Output parsed_default_output(
std::make_tuple(default_output_content, 0, DEFAULT_OUTPUT.size()), {});
std::make_shared<StringOutput>(default_output_content, 0, DEFAULT_OUTPUT.size()), {});
auto init_state = p.init_state(parsed_default_output);
clipper::StateKey state_key{TEST_APPLICATION_LABEL, clipper::DEFAULT_USER_ID,
0};
Expand Down
Loading