- tune.bufsize
- tune.comp.maxlevel
- tune.disable-fast-forward
+ - tune.disable-zero-copy-forwarding
- tune.fail-alloc
- tune.fd.edge-triggered
- tune.h2.be.initial-window-size
Disables the data fast-forwarding. It is a mechanism to optimize the data
forwarding by passing data directly from a side to the other one without
waking the stream up. Thanks to this directive, it is possible to disable
- this optimization. Note it also disable any kernel tcp splicing. This command
- is not meant for regular use, it will generally only be suggested by
- developers along complex debugging sessions. For this reason it is internally
- marked as experimental, meaning that "expose-experimental-directives" must
- appear on a line before this directive.
+ this optimization. Note it also disable any kernel tcp splicing but also the
+ zero-copy forwarding. This command is not meant for regular use, it will
+ generally only be suggested by developers along complex debugging
+ sessions. For this reason it is internally marked as experimental, meaning
+ that "expose-experimental-directives" must appear on a line before this
+ directive.
+
+tune.zero-copy-forwarding
+ Disables the zero-copy forwarding of data. It is a mechanism to optimize the
+ data fast-forwarding by avoiding to use the channel's buffer. Thanks to this
+ directive, it is possible to disable this optimization. Note it also disable
+ any kernel tcp splicing.
tune.fail-alloc
If compiled with DEBUG_FAIL_ALLOC or started with "-dMfail", gives the
#define GTUNE_USE_SYSTEMD (1<<10)
#define GTUNE_BUSY_POLLING (1<<11)
-/* unused: (1<<12) */
+#define GTUNE_USE_ZERO_COPY_FWD (1<<12)
#define GTUNE_SET_DUMPABLE (1<<13)
#define GTUNE_USE_EVPORTS (1<<14)
#define GTUNE_STRICT_LIMITS (1<<15)
goto out;
global.tune.options &= GTUNE_USE_FAST_FWD;
}
+ else if (strcmp(args[0], "tune.disable-zero-copy-forwarding") == 0) {
+ if (alertif_too_many_args(0, file, linenum, args, &err_code))
+ goto out;
+ global.tune.options &= GTUNE_USE_ZERO_COPY_FWD;
+ }
else if (strcmp(args[0], "cluster-secret") == 0) {
blk_SHA_CTX sha1_ctx;
unsigned char sha1_out[20];
" -dW fails if any warning is emitted\n"
" -dD diagnostic mode : warn about suspicious configuration statements\n"
" -dF disable fast-forward\n"
+ " -dZ disable zero-copy forwarding\n"
" -sf/-st [pid ]* finishes/terminates old pids.\n"
" -x <unix_socket> get listening sockets from a unix socket\n"
" -S <bind>[,<bind options>...] new master CLI\n"
global.tune.options |= GTUNE_STRICT_LIMITS;
global.tune.options |= GTUNE_USE_FAST_FWD; /* Use fast-forward by default */
+ global.tune.options |= GTUNE_USE_ZERO_COPY_FWD; /* Use zero-copy forwarding by default */
/* keep a copy of original arguments for the master process */
old_argv = copy_argv(argc, argv);
global.tune.options &= ~GTUNE_USE_FAST_FWD;
else if (*flag == 'd' && flag[1] == 'V')
global.ssl_server_verify = SSL_SERVER_VERIFY_NONE;
+ else if (*flag == 'd' && flag[1] == 'Z')
+ global.tune.options &= ~GTUNE_USE_ZERO_COPY_FWD;
else if (*flag == 'V')
arg_mode |= MODE_VERBOSE;
else if (*flag == 'd' && flag[1] == 'C') {
/* First, let's see if we may fast-forward data from a side to the other
* one without using the channel buffer.
*/
- if (sc_ep_test(sc, SE_FL_MAY_FASTFWD) && ic->to_forward) {
+ if ((global.tune.options & GTUNE_USE_ZERO_COPY_FWD) &&
+ sc_ep_test(sc, SE_FL_MAY_FASTFWD) && ic->to_forward) {
if (c_data(ic)) {
/* We're embarrassed, there are already data pending in
* the buffer and we don't want to have them at two