Commit 7a85739b authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Deprecate the second sub-argument to varnishd -l now that VSM

autosizes everything.
parent 20c4b99f
......@@ -129,9 +129,8 @@ usage(void)
printf(FMT, "", " -s malloc");
printf(FMT, "", " -s file");
printf(FMT, "-l vsl[,vsm]", "Size of shared memory file");
printf(FMT, "-l vsl", "Size of shared memory log");
printf(FMT, "", " vsl: space for VSL records [80m]");
printf(FMT, "", " vsm: space for stats counters [1m]");
printf("\nSecurity options:\n");
......@@ -269,7 +268,6 @@ init_params(struct cli *cli)
MCF_ParamConf(MCF_DEFAULT, "http_req_size", "12k");
MCF_ParamConf(MCF_DEFAULT, "gzip_buffer", "4k");
MCF_ParamConf(MCF_MAXIMUM, "vsl_space", "1G");
MCF_ParamConf(MCF_MAXIMUM, "vsm_space", "1G");
}
#if !defined(HAVE_ACCEPT_FILTERS) || defined(__linux)
......@@ -661,14 +659,17 @@ main(int argc, char * const *argv)
av = VAV_Parse(optarg, NULL, ARGV_COMMA);
AN(av);
if (av[0] != NULL)
ARGV_ERR("\t-l ...: %s\n", av[0]);
ARGV_ERR("-l ...: %s\n", av[0]);
if (av[1] != NULL && av[2] != NULL && av[3] != NULL)
ARGV_ERR("Too many sub arguments to -l\n");
if (av[1] != NULL) {
MCF_ParamSet(cli, "vsl_space", av[1]);
cli_check(cli);
}
if (av[1] != NULL && av[2] != NULL) {
MCF_ParamSet(cli, "vsm_space", av[2]);
cli_check(cli);
fprintf(stderr,
"Warning: Ignoring deprecated second"
" subargument to -l\n");
}
VAV_Free(av);
break;
......
varnishtest "Test -I argument"
varnishtest "Test -I and -l arguments"
shell -err -expect {Only one -I allowed} {
touch foo bar
......@@ -9,5 +9,17 @@ shell -err -expect {Error: -I file CLI command failed (104)} {
echo "vcl.list" > foo
echo "-foobar" >> foo
echo "vcl.load" >> foo
varnishd -f '' -I foo -n ${tmpdir}/v0 -a :0 -l 2m,1m
varnishd -f '' -I foo -n ${tmpdir}/v0 -a :0 -l 2m
}
shell -err -expect {Error: -l ...: Missing '"'} {
varnishd -f '' -I foo -n ${tmpdir}/v0 -a :0 -l '2m,"'
}
shell -err -expect {Error: Too many sub arguments} {
varnishd -f '' -I foo -n ${tmpdir}/v0 -a :0 -l 2m,2m,2m
}
shell -err -expect {Warning: Ignoring deprecated second subargument} {
varnishd -f '' -I foo -n ${tmpdir}/v0 -a :0 -l 2m,2m
}
......@@ -422,7 +422,7 @@ varnish_launch(struct varnish *v)
VSB_cat(vsb, " -p debug=+vsm_keep");
VSB_cat(vsb, " -p debug=+vmod_so_keep");
}
VSB_printf(vsb, " -l 2m,1m,-");
VSB_printf(vsb, " -l 2m");
VSB_printf(vsb, " -p auto_restart=off");
VSB_printf(vsb, " -p syslog_cli_traffic=off");
VSB_printf(vsb, " -p sigsegv_handler=on");
......
......@@ -180,12 +180,11 @@ Tuning options
files. Name is referenced in logs, VCL, statistics, etc. If name
is not specified, "s0", "s1" and so forth is used.
-l <vsl[,vsm]>
-l <vsl>
Specifies size of shmlog file. vsl is the space for the VSL records
[80M] and vsm is the space for stats counters [1M]. Scaling suffixes
like 'K' and 'M' can be used up to (G)igabytes.
Default is 81 Megabytes.
Specifies size of the space for the VSL records.
Scaling suffixes like 'K' and 'M' can be used up to (G)igabytes.
Default is 80 Megabytes.
Security options
----------------
......
......@@ -1605,11 +1605,10 @@ PARAM(
/* max */ "4G",
/* default */ "1M",
/* units */ "bytes",
/* flags */ MUST_RESTART,
/* flags */ 0,
/* s-text */
"The amount of space to allocate for stats counters in the VSM "
"memory segment. If you make this too small, some counters will "
"be invisible. Making it too large just costs memory resources.",
"DEPRECATED: This parameter is ignored.\n"
"There is no global limit on amount of shared memory now.",
/* l-text */ "",
/* func */ NULL
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment