ignore core counts and core lists in qps json driver
diff --git a/test/cpp/qps/driver.cc b/test/cpp/qps/driver.cc
index 93ef32d..42722b7 100644
--- a/test/cpp/qps/driver.cc
+++ b/test/cpp/qps/driver.cc
@@ -76,30 +76,6 @@
return s;
}
-static std::unordered_map<string, std::deque<int>> get_hosts_and_cores(
- const deque<string>& workers) {
- std::unordered_map<string, std::deque<int>> hosts;
- for (auto it = workers.begin(); it != workers.end(); it++) {
- const string host = get_host(*it);
- if (hosts.find(host) == hosts.end()) {
- auto stub = WorkerService::NewStub(
- CreateChannel(*it, InsecureChannelCredentials()));
- grpc::ClientContext ctx;
- ctx.set_wait_for_ready(true);
- CoreRequest dummy;
- CoreResponse cores;
- grpc::Status s = stub->CoreCount(&ctx, dummy, &cores);
- GPR_ASSERT(s.ok());
- std::deque<int> dq;
- for (int i = 0; i < cores.cores(); i++) {
- dq.push_back(i);
- }
- hosts[host] = dq;
- }
- }
- return hosts;
-}
-
static deque<string> get_workers(const string& env_name) {
char* env = gpr_getenv(env_name.c_str());
if (!env) {
@@ -210,7 +186,7 @@
const ClientConfig& initial_client_config, size_t num_clients,
const ServerConfig& initial_server_config, size_t num_servers,
int warmup_seconds, int benchmark_seconds, int spawn_local_worker_count,
- const char* qps_server_target_override, bool configure_core_lists) {
+ const char* qps_server_target_override) {
// Log everything from the driver
gpr_set_log_verbosity(GPR_LOG_SEVERITY_DEBUG);
@@ -279,9 +255,6 @@
std::vector<ServerData> servers(num_servers);
std::unordered_map<string, std::deque<int>> hosts_cores;
- if (configure_core_lists) {
- hosts_cores = get_hosts_and_cores(workers);
- }
for (size_t i = 0; i < num_servers; i++) {
gpr_log(GPR_INFO, "Starting server on %s (worker #%" PRIuPTR ")",
workers[i].c_str(), i);
@@ -289,37 +262,8 @@
CreateChannel(workers[i], InsecureChannelCredentials()));
ServerConfig server_config = initial_server_config;
- int server_core_limit = initial_server_config.core_limit();
- int client_core_limit = initial_client_config.core_limit();
-
- if (configure_core_lists) {
- string host_str(get_host(workers[i]));
- if (server_core_limit == 0 && client_core_limit > 0) {
- // In this case, limit the server cores if it matches the
- // same host as one or more clients
- const auto& dq = hosts_cores.at(host_str);
- bool match = false;
- int limit = dq.size();
- for (size_t cli = 0; cli < num_clients; cli++) {
- if (host_str == get_host(workers[cli + num_servers])) {
- limit -= client_core_limit;
- match = true;
- }
- }
- if (match) {
- GPR_ASSERT(limit > 0);
- server_core_limit = limit;
- }
- }
- if (server_core_limit > 0) {
- auto& dq = hosts_cores.at(host_str);
- GPR_ASSERT(dq.size() >= static_cast<size_t>(server_core_limit));
- gpr_log(GPR_INFO, "Setting server core_list");
- for (int core = 0; core < server_core_limit; core++) {
- server_config.add_core_list(dq.front());
- dq.pop_front();
- }
- }
+ if(server_config.core_limit() != 0) {
+ gpr_log(GPR_WARN, "server config core limit is set but ignored by driver");
}
ServerArgs args;
@@ -364,33 +308,8 @@
CreateChannel(worker, InsecureChannelCredentials()));
ClientConfig per_client_config = client_config;
- int server_core_limit = initial_server_config.core_limit();
- int client_core_limit = initial_client_config.core_limit();
- if (configure_core_lists &&
- ((server_core_limit > 0) || (client_core_limit > 0))) {
- auto& dq = hosts_cores.at(get_host(worker));
- if (client_core_limit == 0) {
- // limit client cores if it matches a server host
- bool match = false;
- int limit = dq.size();
- for (size_t srv = 0; srv < num_servers; srv++) {
- if (get_host(worker) == get_host(workers[srv])) {
- match = true;
- }
- }
- if (match) {
- GPR_ASSERT(limit > 0);
- client_core_limit = limit;
- }
- }
- if (client_core_limit > 0) {
- GPR_ASSERT(dq.size() >= static_cast<size_t>(client_core_limit));
- gpr_log(GPR_INFO, "Setting client core_list");
- for (int core = 0; core < client_core_limit; core++) {
- per_client_config.add_core_list(dq.front());
- dq.pop_front();
- }
- }
+ if(initial_client_config.core_limit() != 0) {
+ gpr_log(GPR_WARN, "client config core limit set but ignored");
}
// Reduce channel count so that total channels specified is held regardless
diff --git a/test/cpp/qps/driver.h b/test/cpp/qps/driver.h
index b5c8152..e72d30a 100644
--- a/test/cpp/qps/driver.h
+++ b/test/cpp/qps/driver.h
@@ -46,8 +46,7 @@
const grpc::testing::ClientConfig& client_config, size_t num_clients,
const grpc::testing::ServerConfig& server_config, size_t num_servers,
int warmup_seconds, int benchmark_seconds, int spawn_local_worker_count,
- const char* qps_server_target_override = "",
- bool configure_core_lists = true);
+ const char* qps_server_target_override = "");
bool RunQuit();
} // namespace testing
diff --git a/test/cpp/qps/qps_json_driver.cc b/test/cpp/qps/qps_json_driver.cc
index da835b9..ca4c686 100644
--- a/test/cpp/qps/qps_json_driver.cc
+++ b/test/cpp/qps/qps_json_driver.cc
@@ -70,9 +70,6 @@
DEFINE_string(qps_server_target_override, "",
"Override QPS server target to configure in client configs."
"Only applicable if there is a single benchmark server.");
-DEFINE_bool(configure_core_lists, true,
- "Provide 'core_list' parameters to workers. Value determined "
- "by cores available and 'core_limit' parameters of the scenarios.");
namespace grpc {
namespace testing {
@@ -85,7 +82,7 @@
scenario.server_config(), scenario.num_servers(),
scenario.warmup_seconds(), scenario.benchmark_seconds(),
scenario.spawn_local_worker_count(),
- FLAGS_qps_server_target_override.c_str(), FLAGS_configure_core_lists);
+ FLAGS_qps_server_target_override.c_str());
// Amend the result with scenario config. Eventually we should adjust
// RunScenario contract so we don't need to touch the result here.
diff --git a/tools/run_tests/performance/scenario_config.py b/tools/run_tests/performance/scenario_config.py
index c3c5ece..b20bb40 100644
--- a/tools/run_tests/performance/scenario_config.py
+++ b/tools/run_tests/performance/scenario_config.py
@@ -109,7 +109,6 @@
unconstrained_client=None,
client_language=None,
server_language=None,
- server_core_limit=0,
async_server_threads=0,
warmup_seconds=WARMUP_SECONDS,
categories=DEFAULT_CATEGORIES,
@@ -136,7 +135,6 @@
'server_config': {
'server_type': server_type,
'security_params': _get_secargs(secure),
- 'core_limit': server_core_limit,
'async_server_threads': async_server_threads,
},
'warmup_seconds': warmup_seconds,
@@ -200,7 +198,7 @@
rpc_type='STREAMING',
client_type='ASYNC_CLIENT',
server_type='ASYNC_GENERIC_SERVER',
- use_generic_payload=True, server_core_limit=1, async_server_threads=1,
+ use_generic_payload=True, async_server_threads=1,
secure=secure,
categories=smoketest_categories)
@@ -219,7 +217,7 @@
client_type='ASYNC_CLIENT',
server_type='ASYNC_GENERIC_SERVER',
unconstrained_client='async', use_generic_payload=True,
- server_core_limit=1, async_server_threads=1,
+ async_server_threads=1,
secure=secure)
yield _ping_pong_scenario(
@@ -248,7 +246,7 @@
rpc_type=rpc_type.upper(),
client_type='%s_CLIENT' % synchronicity.upper(),
server_type='%s_SERVER' % synchronicity.upper(),
- server_core_limit=1, async_server_threads=1,
+ async_server_threads=1,
secure=secure)
yield _ping_pong_scenario(
@@ -332,13 +330,13 @@
yield _ping_pong_scenario(
'csharp_to_cpp_protobuf_sync_unary_ping_pong', rpc_type='UNARY',
client_type='SYNC_CLIENT', server_type='SYNC_SERVER',
- server_language='c++', server_core_limit=1, async_server_threads=1,
+ server_language='c++', async_server_threads=1,
categories=[SMOKETEST, SCALABLE])
yield _ping_pong_scenario(
'csharp_to_cpp_protobuf_async_streaming_ping_pong', rpc_type='STREAMING',
client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER',
- server_language='c++', server_core_limit=1, async_server_threads=1)
+ server_language='c++', async_server_threads=1)
yield _ping_pong_scenario(
'csharp_to_cpp_protobuf_async_unary_qps_unconstrained', rpc_type='UNARY',
@@ -414,13 +412,13 @@
#yield _ping_pong_scenario(
# 'node_to_cpp_protobuf_async_unary_ping_pong', rpc_type='UNARY',
# client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER',
- # server_language='c++', server_core_limit=1, async_server_threads=1)
+ # server_language='c++', async_server_threads=1)
# TODO(jtattermusch): make this scenario work
#yield _ping_pong_scenario(
# 'node_to_cpp_protobuf_async_streaming_ping_pong', rpc_type='STREAMING',
# client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER',
- # server_language='c++', server_core_limit=1, async_server_threads=1)
+ # server_language='c++', async_server_threads=1)
def __str__(self):
return 'node'
@@ -469,13 +467,13 @@
yield _ping_pong_scenario(
'python_to_cpp_protobuf_sync_unary_ping_pong', rpc_type='UNARY',
client_type='SYNC_CLIENT', server_type='ASYNC_SERVER',
- server_language='c++', server_core_limit=1, async_server_threads=1,
+ server_language='c++', async_server_threads=1,
categories=[SMOKETEST, SCALABLE])
yield _ping_pong_scenario(
'python_to_cpp_protobuf_sync_streaming_ping_pong', rpc_type='STREAMING',
client_type='SYNC_CLIENT', server_type='ASYNC_SERVER',
- server_language='c++', server_core_limit=1, async_server_threads=1)
+ server_language='c++', async_server_threads=1)
def __str__(self):
return 'python'
@@ -516,12 +514,12 @@
yield _ping_pong_scenario(
'ruby_to_cpp_protobuf_sync_unary_ping_pong', rpc_type='UNARY',
client_type='SYNC_CLIENT', server_type='SYNC_SERVER',
- server_language='c++', server_core_limit=1, async_server_threads=1)
+ server_language='c++', async_server_threads=1)
yield _ping_pong_scenario(
'ruby_to_cpp_protobuf_sync_streaming_ping_pong', rpc_type='STREAMING',
client_type='SYNC_CLIENT', server_type='SYNC_SERVER',
- server_language='c++', server_core_limit=1, async_server_threads=1)
+ server_language='c++', async_server_threads=1)
def __str__(self):
return 'ruby'