From 7372a256c27281e37713393c7b50fa70b33ddcde Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Mon, 10 May 2021 16:03:52 +0200 Subject: [PATCH] dnsdist: Add a few words about memory consumption in the documentation --- pdns/dnsdistdist/docs/advanced/tuning.rst | 51 ++++++++++++++--------- 1 file changed, 31 insertions(+), 20 deletions(-) diff --git a/pdns/dnsdistdist/docs/advanced/tuning.rst b/pdns/dnsdistdist/docs/advanced/tuning.rst index f6f03f4ee2..3c84d9aa6e 100644 --- a/pdns/dnsdistdist/docs/advanced/tuning.rst +++ b/pdns/dnsdistdist/docs/advanced/tuning.rst @@ -130,23 +130,34 @@ For other components, like the packet cache and the in-memory ring buffers, it i Sharding was disabled by default before 1.6.0 and could be enabled via the `numberOfShards` option to :func:`newPacketCache` and :func:`setRingBuffersSize`. It might still make sense to increment the number of shards when dealing with a lot of threads. -Memory usage for TCP, DoH and DoT ---------------------------------- - -+--------------------------------+-----------------------------+ -| Protocol | Memory usage per connection | -+================================+=============================+ -| TCP | 6 kB | -+--------------------------------+-----------------------------+ -| DoT (GnuTLS) | 16 kB | -+--------------------------------+-----------------------------+ -| DoT (OpenSSL) | 52 kB | -+--------------------------------+-----------------------------+ -| DoT (OpenSSL w/ releaseBuffers | 19 kB | -+--------------------------------+-----------------------------+ -| DoH (http) | 2 kB | -+--------------------------------+-----------------------------+ -| DoH | 48 kB | -+--------------------------------+-----------------------------+ -| DoH (w/ releaseBuffers) | 15 kB | -+--------------------------------+-----------------------------+ +Memory usage +------------ + +The main sources of memory usage in DNSDist are: + + * packet caches, when enabled + * the number of outstanding UDP queries per backend, configured with :func:`setMaxUDPOutstanding` (see above) + * the number of entries in the ring-buffers, configured with :func:`setRingBuffersSize` + * the number of short-lived dynamic block entries + * the number of user-defined rules and actions + * the number of TCP, DoT and DoH connections + +Memory usage per connection for connected protocols: + ++---------------------------------+-----------------------------+ +| Protocol | Memory usage per connection | ++=================================+=============================+ +| TCP | 6 kB | ++---------------------------------+-----------------------------+ +| DoT (GnuTLS) | 16 kB | ++---------------------------------+-----------------------------+ +| DoT (OpenSSL) | 52 kB | ++---------------------------------+-----------------------------+ +| DoT (OpenSSL w/ releaseBuffers) | 19 kB | ++---------------------------------+-----------------------------+ +| DoH (http) | 2 kB | ++---------------------------------+-----------------------------+ +| DoH | 48 kB | ++---------------------------------+-----------------------------+ +| DoH (w/ releaseBuffers) | 15 kB | ++---------------------------------+-----------------------------+ -- 2.47.2