Commit 224b8a34 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Make the size of the workerthreads local shmlog workspace a paramter.



git-svn-id: http://www.varnish-cache.org/svn/trunk@3176 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent c76456af
......@@ -237,7 +237,7 @@ wrk_thread(void *priv)
{
struct worker *w, ww;
struct wq *qp;
unsigned char wlog[8192]; /* XXX: size */
unsigned char wlog[params->shm_workspace];
struct workreq *wrq;
THR_SetName("cache-worker");
......
......@@ -96,6 +96,7 @@ struct params {
/* Memory allocation hints */
unsigned sess_workspace;
unsigned obj_workspace;
unsigned shm_workspace;
/* Acceptor hints */
unsigned sess_timeout;
......
......@@ -595,6 +595,15 @@ static const struct parspec parspec[] = {
"Minimum is 1024 bytes.",
DELAYED_EFFECT,
"8192", "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 "
"needless flushes of the SHM workspace.\n"
"These flushes show up in stats as "
"\"SHM flushes due to overflow\".\n"
"Minimum is 4096 bytes.",
DELAYED_EFFECT,
"8192", "bytes" },
{ "default_grace", tweak_uint, &master.default_grace, 0, UINT_MAX,
"Default grace period. We will deliver an object "
"this long after it has expired, provided another thread "
......
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