]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
rec: describe (roughly) memory usage 14358/head
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 19 Jun 2024 09:35:15 +0000 (11:35 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 19 Jun 2024 09:54:34 +0000 (11:54 +0200)
Also fix a few refs

pdns/recursordist/docs/performance.rst
pdns/recursordist/settings/table.py

index c023c11ae072992b666dd983acbcf37bc547c841..fcfd67157fc1505ca97cc22f29efb6eff4fd255c 100644 (file)
@@ -110,6 +110,32 @@ When running with >3000 queries per second, and running Linux versions prior to
 This is solved by rebooting with ``clock=tsc`` or upgrading to a 2.6.17 kernel.
 This is relevant if dmesg shows ``Using pmtmr for high-res timesource``.
 
+Memory usage
+------------
+
+:program:`Recursor` keeps all the data it needs in memory.
+The default configuration uses a little more than 1GB when the caches are full.
+Depending on configuration, memory usage can amount to many gigabytes for a large installation.
+
+.. warning::
+   Avoid swapping. The memory access patterns of :program:`Recursor` are random. This means
+   that it will cause trashing (the OS spending lots of time pulling in and writing out memory
+   pages) if :program:`Recursor` uses more physical memory than available and performance will be severely impacted.
+
+Below the memory usage observed for a specific test case are described.
+Please note that depending on OS, version of system libraries, version of the :program:`Recursor`, features used and usage patterns these numbers may vary.
+Test and observe your system to learn more about the memory requirements specific to your case.
+
+The most important subsystems that use memory are:
+
+- The packet cache. The amount of memory used in a test case was about 500 bytes per entry
+- The record cache. The amount of memory used in a test case was about 850 bytes per entry
+- Authoritative zones loaded. Memory usage is dependent on the size and number loaded.
+- RPZ zones loaded. Memory usage is dependent on the size and number loaded.
+- NOD DBs. Memory usage is dependent on specific settings of this subsystem.
+
+An estimate for the memory used by its caches for a :program:`Recursor` having 2 million record cache entries and 1 million packet cache entries is ``2e6 * 850 * + 1e6 * 500 = about 2GB``.
+
 Connection tracking and firewalls
 ---------------------------------
 
index 73ed91872de3b7d9cb79a54fa9e6a1d177f3e61e..e029d9c072ea654098a7e62ea9145f3f8656a547 100644 (file)
@@ -1816,7 +1816,7 @@ feature.
         'doc' : '''
 Path to a file with a list of domains. File should have one domain per line,
 with no extra characters or comments.
-See :doc:`ignore_list`.
+See :ref:`setting-new-domain-ignore-list`.
  ''',
     'versionadded': '5.1.0'
     },
@@ -1843,7 +1843,7 @@ will never be considered for a new unique domain request.
         'doc' : '''
 Path to a file with a list of domains. File should have one domain per line,
 with no extra characters or comments.
-See :doc:`udr_ignore_list`.
+See :ref:`setting-udr-ignore-list`.
  ''',
     'versionadded': '5.1.0'
     },