Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvdp-pesi
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Jobs
Commits
Open sidebar
uplex-varnish
libvdp-pesi
Commits
f08472bb
Commit
f08472bb
authored
Aug 28, 2019
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
doc: minor clarifications on workspace_prealloc
parent
05cebd46
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
19 deletions
+24
-19
vdp_pesi.vcc
src/vdp_pesi.vcc
+24
-19
No files found.
src/vdp_pesi.vcc
View file @
f08472bb
...
@@ -263,24 +263,25 @@ See the detailled discussion in `THREADS`_ for details.
...
@@ -263,24 +263,25 @@ See the detailled discussion in `THREADS`_ for details.
$Function VOID workspace_prealloc(BYTES min_free=4096, INT max_nodes=32)
$Function VOID workspace_prealloc(BYTES min_free=4096, INT max_nodes=32)
Configure workspace pre-allocation of objects in variable-sized
Configure the amount of workspace used for pesi internal data
internal data structures.
structures.
For each request, the VDP builds such a structure, whose size is
The pesi VDP builds a structure, whose size is roughly proportional to
roughly proportional to the size of the ESI tree -- the conceptual
the size of the ESI tree -- the conceptual tree with the top-level
tree with the top-level response at the root, and its includes and all
response at the root, and its includes and all of their nested
of their nested includes as branches. The nodes in this structure have
includes as branches. The nodes in this structure have a fixed size,
a fixed size, but the number of nodes used by the VDP varies with the
but the number of nodes used by the VDP varies with the size of the
size of the ESI tree.
ESI tree.
The VDP pre-allocates a constant number of such nodes in client
For each (sub)request, the VDP pre-allocates a constant number of such
workspace, and initially takes nodes from the pre-allocation. If more
nodes in client workspace, and initially uses the pre-allocation for
are needed for larger ESI trees, they are obtained from a global
child nodes of that (sub)request. If more are needed, they are
memory pool as described below. The use of pre-allocated nodes from
obtained from a global memory pool as described below. The use of
workspace is preferred, since it never requires new system memory
pre-allocated nodes from workspace is preferred, since it never
allocations (workspaces themselves are pre-allocated by Varnish), and
requires new system memory allocations (workspaces themselves are
because they are local to each request, so locking is never required
pre-allocated by Varnish), and because they are local to each request,
to access them (but is required for the memory pool).
so locking is never required to access them (but is required for the
memory pool).
The pre-allocation contributes a fixed size to client workspace usage,
The pre-allocation contributes a fixed size to client workspace usage,
since the number of pre-allocated nodes is constant. So any adjustment
since the number of pre-allocated nodes is constant. So any adjustment
...
@@ -296,7 +297,11 @@ pre-allocation will always leave free in client workspace; if the
...
@@ -296,7 +297,11 @@ pre-allocation will always leave free in client workspace; if the
targeted number of pre-allocated nodes would result in less free space
targeted number of pre-allocated nodes would result in less free space
than ``min_free`` bytes in workspace, then fewer nodes are
than ``min_free`` bytes in workspace, then fewer nodes are
allocated. This ensures that free workspace is always left over for
allocated. This ensures that free workspace is always left over for
other VMODs, VCL usage, and so forth. ``min_free`` defaults to 4 KiB.
other VMODs, VCL usage, and so forth. Note that most of the operations
typically requiring workspace have already finished when VDP pesi
makes the pre-allocation, because it starts after `vcl_deliver
{}`. Thus, the reservation is mostly for other VDPs and VMODs using
`PRIV_TOP`. ``min_free`` defaults to 4 KiB.
The ``max_nodes`` parameter sets the number of nodes to be allocated,
The ``max_nodes`` parameter sets the number of nodes to be allocated,
unless the limit imposed by ``min_free`` is exceeded; ``max_nodes``
unless the limit imposed by ``min_free`` is exceeded; ``max_nodes``
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment