]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Rename cache-shards to record-cache-shards and document it. 9390/head
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Tue, 18 Aug 2020 11:45:04 +0000 (13:45 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Tue, 18 Aug 2020 12:53:01 +0000 (14:53 +0200)
pdns/pdns_recursor.cc
pdns/recursordist/docs/settings.rst
regression-tests/recursor-test

index 95723348dfcd60bfaac760a6e7c530507e12cc8b..e50aa7682d907381823a0aa58cdbc0376d99be13 100644 (file)
@@ -5133,7 +5133,7 @@ int main(int argc, char **argv)
     ::arg().setSwitch("qname-minimization", "Use Query Name Minimization")="yes";
     ::arg().setSwitch("nothing-below-nxdomain", "When an NXDOMAIN exists in cache for a name with fewer labels than the qname, send NXDOMAIN without doing a lookup (see RFC 8020)")="dnssec";
     ::arg().set("max-generate-steps", "Maximum number of $GENERATE steps when loading a zone from a file")="0";
-    ::arg().set("cache-shards", "Number of shards in the record cache")="1024";
+    ::arg().set("record-cache-shards", "Number of shards in the record cache")="1024";
 
 #ifdef NOD_ENABLED
     ::arg().set("new-domain-tracking", "Track newly observed domains (i.e. never seen before).")="no";
@@ -5232,7 +5232,7 @@ int main(int argc, char **argv)
       exit(0);
     }
 
-    s_RC = std::unique_ptr<MemRecursorCache>(new MemRecursorCache(::arg().asNum("cache-shards")));
+    s_RC = std::unique_ptr<MemRecursorCache>(new MemRecursorCache(::arg().asNum("record-cache-shards")));
 
     Logger::Urgency logUrgency = (Logger::Urgency)::arg().asNum("loglevel");
 
index 81dc609653fb23f63830fd83cb45612471e18a32..d82c616988a284d07b14a0f22e0b7fbf6dfa6a7d 100644 (file)
@@ -1357,6 +1357,19 @@ Disabled by default, which also disables outgoing IPv6 support.
 
 Don't log queries.
 
+.. _setting-record-cache-shards
+
+``record-cache-shards``
+------------------------
+.. versionadded:: 4.4.0
+-  Integer
+-  Default: 1024
+
+Sets the number of shards in the record cache. If you have high
+contention as reported by
+``record-cache-contented/record-cache-acquired``, you can try to
+enlarge this value or run with fewer threads.
+
 .. _setting-reuseport:
 
 ``reuseport``
index 184e5676d724bdf455fe57eb8d70caee51a4e900..280d578a0258fb011a19d056a1b97ff6b457fe68 100755 (executable)
@@ -31,7 +31,7 @@ rm -f recursor.pid pdns_recursor.pid
 <measurement><name>system CPU seconds</name><value>%S</value></measurement>
 <measurement><name>wallclock seconds</name><value>%e</value></measurement>
 <measurement><name>%% CPU used</name><value>%P</value></measurement>
-'         ${RECURSOR} --daemon=no --local-port=$port --socket-dir=./ --trace=$TRACE --config-dir=. --max-mthreads=$mthreads --query-local-address="0.0.0.0${QLA6}" --threads=$threads --cache-shards=$shards --disable-packetcache > recursor.log 2>&1 &
+'         ${RECURSOR} --daemon=no --local-port=$port --socket-dir=./ --trace=$TRACE --config-dir=. --max-mthreads=$mthreads --query-local-address="0.0.0.0${QLA6}" --threads=$threads --record-cache-shards=$shards --disable-packetcache > recursor.log 2>&1 &
 sleep 3
 
 # warm up the cache