Tune defaults for load tester a bit and remove "auto config"
This commit is contained in:
@@ -123,10 +123,10 @@ int getConnectFdUnix(const char *socket_name) {
|
||||
}
|
||||
|
||||
struct Config {
|
||||
int concurrency = 1000;
|
||||
int concurrency = 64;
|
||||
int requests_per_connection = 1;
|
||||
int connect_threads = 0; // 0 means auto-calculate
|
||||
int network_threads = 0; // 0 means auto-calculate
|
||||
int connect_threads = 4;
|
||||
int network_threads = 4;
|
||||
int event_batch_size = 32;
|
||||
int connection_buf_size = 1024;
|
||||
std::string host = "";
|
||||
@@ -432,9 +432,9 @@ void print_usage(const char *program_name) {
|
||||
"(default: 1)\n");
|
||||
printf("\nThread options:\n");
|
||||
printf(" --connect-threads N Number of connect threads (default: "
|
||||
"auto)\n");
|
||||
"4)\n");
|
||||
printf(" --network-threads N Number of network threads (default: "
|
||||
"auto)\n");
|
||||
"4)\n");
|
||||
printf("\nPerformance options:\n");
|
||||
printf(" --event-batch-size N Epoll event batch size (default: 32)\n");
|
||||
printf(
|
||||
@@ -552,14 +552,6 @@ void parse_args(int argc, char *argv[]) {
|
||||
"connections\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
// Auto-calculate thread counts if not specified
|
||||
if (g_config.connect_threads == 0) {
|
||||
g_config.connect_threads = std::min(2, g_config.concurrency);
|
||||
}
|
||||
if (g_config.network_threads == 0) {
|
||||
g_config.network_threads = std::min(8, g_config.concurrency);
|
||||
}
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
|
||||
Reference in New Issue
Block a user