Kaynağa Gözat

H2O: Increase the number of pipelined database queries (#8221)

Anton Kirilov 2 yıl önce
ebeveyn
işleme
9fd7e78e0c

+ 1 - 1
frameworks/C/h2o/h2o.dockerfile

@@ -106,7 +106,7 @@ CMD ["taskset", \
      "-a20", \
      "-a20", \
      "-d", \
      "-d", \
      "dbname=hello_world host=tfb-database password=benchmarkdbpass sslmode=disable user=benchmarkdbuser", \
      "dbname=hello_world host=tfb-database password=benchmarkdbpass sslmode=disable user=benchmarkdbuser", \
-     "-e64", \
+     "-e11000", \
      "-f", \
      "-f", \
      "/opt/h2o_app/share/h2o_app/template", \
      "/opt/h2o_app/share/h2o_app/template", \
      "-m1"]
      "-m1"]

+ 4 - 1
frameworks/C/h2o/src/main.c

@@ -41,6 +41,8 @@
 #include "tls.h"
 #include "tls.h"
 #include "utility.h"
 #include "utility.h"
 
 
+#define HOST_NAME "default"
+#define SERVER_NAME "h2o"
 #define USAGE_MESSAGE \
 #define USAGE_MESSAGE \
 	"Usage:\n%s " \
 	"Usage:\n%s " \
 	"[-a <max connections accepted simultaneously>] " \
 	"[-a <max connections accepted simultaneously>] " \
@@ -106,11 +108,12 @@ static int initialize_global_data(const config_t *config, global_data_t *global_
 	CHECK_ERRNO(sigaddset, &signals, SIGTERM);
 	CHECK_ERRNO(sigaddset, &signals, SIGTERM);
 	CHECK_ERRNO_RETURN(global_data->signal_fd, signalfd, -1, &signals, SFD_NONBLOCK | SFD_CLOEXEC);
 	CHECK_ERRNO_RETURN(global_data->signal_fd, signalfd, -1, &signals, SFD_NONBLOCK | SFD_CLOEXEC);
 	h2o_config_init(&global_data->h2o_config);
 	h2o_config_init(&global_data->h2o_config);
+	global_data->h2o_config.server_name = h2o_iovec_init(H2O_STRLIT(SERVER_NAME));
 
 
 	if (config->cert && config->key)
 	if (config->cert && config->key)
 		initialize_openssl(config, global_data);
 		initialize_openssl(config, global_data);
 
 
-	const h2o_iovec_t host = h2o_iovec_init(H2O_STRLIT("default"));
+	const h2o_iovec_t host = h2o_iovec_init(H2O_STRLIT(HOST_NAME));
 	h2o_hostconf_t * const hostconf = h2o_config_register_host(&global_data->h2o_config,
 	h2o_hostconf_t * const hostconf = h2o_config_register_host(&global_data->h2o_config,
 	                                                           host,
 	                                                           host,
 	                                                           config->port);
 	                                                           config->port);