Commit b39e11c0 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Remove obj_workspace parameter. We autosize it for just what is needed.



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@4539 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 58167a82
......@@ -336,7 +336,8 @@ cnt_error(struct sess *sp)
if (sp->obj == NULL) {
HSH_Prealloc(sp);
sp->wrk->cacheable = 0;
sp->obj = STV_NewObject(sp, 0, 0, params->http_headers);
/* XXX: 1024 is a pure guess */
sp->obj = STV_NewObject(sp, 1024, 0, params->http_headers);
sp->obj->xid = sp->xid;
sp->obj->entered = sp->t_req;
} else {
......
......@@ -99,7 +99,6 @@ struct params {
/* Memory allocation hints */
unsigned sess_workspace;
unsigned obj_workspace;
unsigned shm_workspace;
unsigned http_headers;
......
......@@ -535,14 +535,6 @@ static const struct parspec input_parspec[] = {
"objects allocate only space for the headers they store.\n",
0,
"64", "header lines" },
{ "obj_workspace", tweak_uint, &master.obj_workspace, 0, UINT_MAX,
"Bytes of HTTP protocol workspace allocated for objects. "
"This space must be big enough for the entire HTTP protocol "
"header and any edits done to it in the VCL code while it "
"is cached.\n"
"Minimum is 1024 bytes.",
DELAYED_EFFECT,
"0", "bytes" },
{ "shm_workspace", tweak_uint, &master.shm_workspace, 4096, UINT_MAX,
"Bytes of shmlog workspace allocated for worker threads. "
"If too big, it wastes some ram, if too small it causes "
......
......@@ -117,10 +117,7 @@ STV_NewObject(struct sess *sp, unsigned l, double ttl, unsigned nhttp)
unsigned lh;
(void)ttl;
if (l == 0)
l = 1024;
if (params->obj_workspace > 0 && params->obj_workspace > l)
l = params->obj_workspace;
assert(l > 0);
lh = HTTP_estimate(nhttp);
......
......@@ -895,21 +895,6 @@ Upper limit on how many times a request can restart.
.br
Be aware that restarts are likely to cause a hit against the backend, so don't increase thoughtlessly.
.Pp
.It Va obj_workspace
Units:
.Dv bytes
.br
Default:
.Dv 0
.br
Flags:
.Dv "delayed"
.br
.Pp
Bytes of HTTP protocol workspace allocated for objects. This space must be big enough for the entire HTTP protocol header and any edits done to it in the VCL code while it is cached.
.br
Minimum is 1024 bytes.
.Pp
.It Va overflow_max
Units:
.Dv %
......
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