From 0b1f23014ee2d8ee98814c3fa8afd2685105dff3 Mon Sep 17 00:00:00 2001 From: Dmitry Simonenko Date: Fri, 8 Dec 2017 18:39:45 +0300 Subject: [PATCH] odissey: remove pipelining tweak --- README.md | 7 +------ odissey.conf | 4 +--- scripts/debian/config | 1 - sources/config.c | 7 ------- sources/frontend.c | 2 +- sources/scheme.c | 3 --- sources/scheme.h | 1 - 7 files changed, 3 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 59cbf7f1..636f5543 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ specifying a number of additional worker threads. Each worker thread is responsible for authentication and proxying client-to-server and server-to-client requests. All worker threads are sharing global server connection pools. Multi-threaded design plays important role in `SSL/TLS` performance. +Additionally client-to-server and server-to-client buffers are zero-copy. #### Advanced transactional pooling @@ -27,12 +28,6 @@ on each client-to-server assignment. Odissey allows to define connection pools as a pair of `Database` and `User`. Each defined pool can have separate authentication, pooling mode and limits settings. -#### Pipelining and network optimizations - -Odissey allows to reduce network IO calls by logically buffer several -server replies before sending them to the client. Additionally -client-to-server and server-to-client buffers are zero-copy. - #### Authentication Odissey has full-featured `SSL/TLS` support and common authentication methods diff --git a/odissey.conf b/odissey.conf index 58ebf2e3..23708732 100644 --- a/odissey.conf +++ b/odissey.conf @@ -35,8 +35,7 @@ log_stats yes stats_interval 3 nodelay yes keepalive 7200 -readahead 4096 -pipelining 4096 +readahead 8192 client_max 100 workers 3 @@ -94,7 +93,6 @@ database default { pool_timeout 0 pool_ttl 5 pool_cancel yes - pool_discard yes pool_rollback yes # client_max 100 diff --git a/scripts/debian/config b/scripts/debian/config index 2fdbba94..77cfc308 100644 --- a/scripts/debian/config +++ b/scripts/debian/config @@ -18,7 +18,6 @@ log_query no log_stats yes stats_interval 3 readahead 4096 -pipelining 4096 nodelay yes keepalive 7200 client_max 100 diff --git a/sources/config.c b/sources/config.c index 7d650ad7..98fbb228 100644 --- a/sources/config.c +++ b/sources/config.c @@ -62,7 +62,6 @@ enum OD_LNODELAY, OD_LKEEPALIVE, OD_LREADAHEAD, - OD_LPIPELINING, OD_LWORKERS, OD_LCLIENT_MAX, OD_LCLIENT_FWD_ERROR, @@ -131,7 +130,6 @@ static od_keyword_t od_config_keywords[] = od_keyword("nodelay", OD_LNODELAY), od_keyword("keepalive", OD_LKEEPALIVE), od_keyword("readahead", OD_LREADAHEAD), - od_keyword("pipelining", OD_LPIPELINING), od_keyword("workers", OD_LWORKERS), od_keyword("client_max", OD_LCLIENT_MAX), od_keyword("client_fwd_error", OD_LCLIENT_FWD_ERROR), @@ -898,11 +896,6 @@ od_config_parse(od_config_t *config) return -1; scheme->client_max_set = 1; continue; - /* pipelining */ - case OD_LPIPELINING: - if (! od_config_next_number(config, &scheme->server_pipelining)) - return -1; - continue; /* readahead */ case OD_LREADAHEAD: if (! od_config_next_number(config, &scheme->readahead)) diff --git a/sources/frontend.c b/sources/frontend.c index 6759e249..bc07110e 100644 --- a/sources/frontend.c +++ b/sources/frontend.c @@ -425,7 +425,7 @@ od_frontend_reset_stream(od_client_t *client) { od_instance_t *instance = client->system->instance; shapito_stream_t *stream = &client->stream; - int watermark = (instance->scheme.server_pipelining * 2); + int watermark = (instance->scheme.readahead * 2); if (od_unlikely(shapito_stream_used(stream) >= watermark)) { od_debug(&instance->logger, "main", client, client->server, "client buffer size: %d bytes, cleanup", diff --git a/sources/scheme.c b/sources/scheme.c index a7d7af98..71037e54 100644 --- a/sources/scheme.c +++ b/sources/scheme.c @@ -43,7 +43,6 @@ void od_scheme_init(od_scheme_t *scheme) scheme->readahead = 8192; scheme->nodelay = 1; scheme->keepalive = 7200; - scheme->server_pipelining = 32768; scheme->workers = 1; scheme->client_max_set = 0; scheme->client_max = 0; @@ -852,8 +851,6 @@ void od_scheme_print(od_scheme_t *scheme, od_logger_t *logger, int routes_only) "nodelay %d", scheme->nodelay); od_log(logger, "config", NULL, NULL, "keepalive %d", scheme->keepalive); - od_log(logger, "config", NULL, NULL, - "pipelining %d", scheme->server_pipelining); if (scheme->client_max_set) od_log(logger, "config", NULL, NULL, "client_max %d", scheme->client_max); diff --git a/sources/scheme.h b/sources/scheme.h index fc58f707..8206506d 100644 --- a/sources/scheme.h +++ b/sources/scheme.h @@ -137,7 +137,6 @@ struct od_scheme int readahead; int nodelay; int keepalive; - int server_pipelining; int workers; int client_max_set; int client_max;