Tune defaults for load tester a bit and remove "auto config"

This commit is contained in:
2025-08-20 22:44:44 -04:00
parent 130ff2062a
commit 0b9310d560

View File

@@ -123,10 +123,10 @@ int getConnectFdUnix(const char *socket_name) {
} }
struct Config { struct Config {
int concurrency = 1000; int concurrency = 64;
int requests_per_connection = 1; int requests_per_connection = 1;
int connect_threads = 0; // 0 means auto-calculate int connect_threads = 4;
int network_threads = 0; // 0 means auto-calculate int network_threads = 4;
int event_batch_size = 32; int event_batch_size = 32;
int connection_buf_size = 1024; int connection_buf_size = 1024;
std::string host = ""; std::string host = "";
@@ -432,9 +432,9 @@ void print_usage(const char *program_name) {
"(default: 1)\n"); "(default: 1)\n");
printf("\nThread options:\n"); printf("\nThread options:\n");
printf(" --connect-threads N Number of connect threads (default: " printf(" --connect-threads N Number of connect threads (default: "
"auto)\n"); "4)\n");
printf(" --network-threads N Number of network threads (default: " printf(" --network-threads N Number of network threads (default: "
"auto)\n"); "4)\n");
printf("\nPerformance options:\n"); printf("\nPerformance options:\n");
printf(" --event-batch-size N Epoll event batch size (default: 32)\n"); printf(" --event-batch-size N Epoll event batch size (default: 32)\n");
printf( printf(
@@ -552,14 +552,6 @@ void parse_args(int argc, char *argv[]) {
"connections\n"); "connections\n");
exit(1); 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[]) { int main(int argc, char *argv[]) {