Skip to content

Commit ec456ba

Browse files
committed
TASK-91082: Changing dnsbuf documentation
Signed-off-by: Doug Koerich <[email protected]>
1 parent 7573ec7 commit ec456ba

File tree

6 files changed

+100
-12
lines changed

6 files changed

+100
-12
lines changed

content/momentum/3/3-reference/3-reference-modules-dnsbuf.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
---
2-
lastUpdated: "03/26/2020"
2+
lastUpdated: "09/30/2025"
33
title: "dnsbuf – Dynamically Set the DNS UDP Buffer Size"
44
description: "Configuration Change This feature is available as beta in Momentum 3 6 5 Momentum does not manipulate the size of UDP sockets it creates and uses for DNS queries instead it will use the default sizes configured by the Operating System This can create problems for clients with too many..."
55
---
66

77
<a name="idp19364064"></a>
88

9-
**Configuration Change. ** This feature is available as beta in Momentum 3.6.5.
9+
**Configuration Change.** This feature is available as beta in Momentum 3.6.5.
10+
11+
> **NOTE: This feature was DEPRECATED in Momentum 4.8. Please refer to the [updated](/momentum/4/modules/dnsbuf-new) module for changes in the functionality.**
1012
1113
Momentum does not manipulate the size of UDP sockets it creates and uses for DNS queries; instead, it will use the default sizes configured by the Operating System. This can create problems for clients with too many domains (e.g., tens of thousands) in the system. Responses may be dropped, causing unnecessary DNS failures and retries, thus further increasing the DNS query volume. The `dnsbuf` module enables the client to manipulate the DNS buffer sizes on demand, on the fly.
1214

@@ -150,4 +152,4 @@ The following is an example in which Momentum started with ~30,000 unresolvable
150152
DNS AAAA Queries: 0
151153
DNS MX Queries: 908388
152154
Pending DNS Queries: 311
153-
```
155+
```

content/momentum/4/4-console-commands.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,6 @@ This table lists all console commands alphabetically giving a brief description.
8484
| [dns_cache refcnts](/momentum/4/console-commands/dns-cache) – Show the references in the DNS cache | 4.0 |   | dns |
8585
| [dns_cache stats](/momentum/4/console-commands/dns-cache) – Show summary stats for the DNS cache | 4.0 |   | dns |
8686
| [dns_cache submit](/momentum/4/console-commands/dns-cache) – Submit a DNS query | 4.0 |   | dns |
87-
| [dnsbuf interval](/momentum/4/modules/dnsbuf#modules.dnsbuf.console) – Change how often setsockopt() operations are performed | 4.2 | dnsbuf | module |
88-
| [dnsbuf rcvbuf_size](/momentum/4/modules/dnsbuf#modules.dnsbuf.console) – Change the rcvbuf_size value on the fly | 4.2 | dnsbuf | module |
89-
| [dnsbuf sndbuf_size](/momentum/4/modules/dnsbuf#modules.dnsbuf.console) – Change the sndbuf_size value on the fly | 4.2 | dnsbuf | module |
90-
| [dnsbuf verify](/momentum/4/modules/dnsbuf#modules.dnsbuf.console) – Query active sockets for current buffer sizes and report the results | 4.2 | dnsbuf | module |
9187
| [domain all](/momentum/4/console-commands/domain-all) – Show statistics for all domains | 4.0 |   | stats |
9288
| [domain](/momentum/4/console-commands/domain) – Show domain statistics | 4.0 |   | stats |
9389
| [ds_core flush cache_name](/momentum/4/modules/ds-core#modules.ds_core.console) – Flush a specific cache | 4.0 | ds_core | module |
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
---
2+
lastUpdated: "09/30/2020"
3+
title: "dnsbuf – Configure the DNS UDP Buffer Sizes"
4+
description: "Configuration Change This feature is available in Momentum 4 8 and later"
5+
---
6+
7+
<a name="idp21140416"></a>
8+
9+
**Configuration Change.** This feature is available in Momentum 4.8 and later.
10+
11+
Momentum does not manipulate the size of UDP sockets it creates and uses for DNS queries; instead, it will use the default sizes configured by the Operating System. This can create problems for clients with too many domains (e.g., tens of thousands) in the system. Responses may be dropped, causing unnecessary DNS failures and retries, thus further increasing the DNS query volume. The `dnsbuf` module enables the client to configure the DNS buffer sizes at the service startup.
12+
13+
### <a name="modules.dnsbuf.configuration"></a> Configuration
14+
15+
The `dnsbuf` module is configured as follows:
16+
17+
<a name="example.dnsbuf"></a>
18+
19+
```
20+
dnsbuf {
21+
sndbuf_size = "65536" # Default value is 131072
22+
rcvbuf_size = "65536" # Default value is 131072
23+
}
24+
```
25+
26+
<dl class="variablelist">
27+
28+
<dt>sndbuf_size</dt>
29+
30+
<dd>
31+
32+
The SO_SNDBUF value is set to this value for all UDP DNS sockets. Minimum value is 1024\. Note that in Linux the value in the kernel is automatically doubled; e.g., when a value of 65536 is configured in the module, the kernel will implement a buffer size of 131072.
33+
34+
</dd>
35+
36+
<dt>rcvbuf_size</dt>
37+
38+
<dd>
39+
40+
The SO_RCVBUF value is set to this value for all UDP DNS sockets. Minimum value is 1024\. Note that in Linux the value in the kernel is automatically doubled; e.g., when a value of 65536 is configured in the module, the kernel will actually implement a buffer size of 131072.
41+
42+
</dd>
43+
44+
</dl>
45+
46+
### <a name="modules.dnsbuf.subtleties"></a> Subtleties
47+
48+
49+
* Changes in the values require a service restart to take effect. They are *not* applied in a configuration reload.
50+
* The buffer cannot be set beyond the **sysctl**-defined maximums in Linux:
51+
52+
```
53+
net.core.rmem_max
54+
net.core.wmem_max
55+
```
56+
57+
Note that those values are the post-doubled values; e.g., if `net.core.wmem_max` is set to 65536, the maximum value that will work in the `dnsbuf` module is `sndbuf_max` = 32768.
58+
59+
### <a name="modules.dnsbuf.dropped"></a> Determining that DNS Responses are Being Dropped
60+
61+
To determine whether the DNS responses are being dropped because the DNS UDP socket buffer is full, look for a corresponding increase in the "Pending DNS Queries" statistic from Momentum and the UDP packet errors from netstat, e.g.:
62+
63+
```
64+
while sleep 1; do (netstat --udp -s | grep error; echo summary |
65+
/opt/msys/ecelerity/bin/ec_console | grep DNS); echo; done
66+
```
67+
68+
The following is an example in which Momentum started with ~30,000 unresolvable domains in the queue. Notice that the "packet receive errors" number has increased, and there are a high number of pending DNS queries.
69+
70+
```
71+
1559857 packet receive errors
72+
DNS A Queries: 924801
73+
DNS AAAA Queries: 0
74+
DNS MX Queries: 907577
75+
Pending DNS Queries: 312
76+
77+
1559857 packet receive errors
78+
DNS A Queries: 924803
79+
DNS AAAA Queries: 0
80+
DNS MX Queries: 907849
81+
Pending DNS Queries: 43
82+
83+
1560125 packet receive errors
84+
DNS A Queries: 924803
85+
DNS AAAA Queries: 0
86+
DNS MX Queries: 908388
87+
Pending DNS Queries: 311
88+
```

content/momentum/4/modules/dnsbuf.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
---
2-
lastUpdated: "03/26/2020"
2+
lastUpdated: "09/30/2020"
33
title: "dnsbuf – Dynamically Set the DNS UDP Buffer Size"
44
description: "Configuration Change This feature is available in Momentum 4 2 and later Momentum does not manipulate the size of UDP sockets it creates and uses for DNS queries instead it will use the default sizes configured by the Operating System This can create problems for clients with too many domains..."
55
---
66

77
<a name="idp21140416"></a>
88

9-
**Configuration Change. ** This feature is available in Momentum 4.2 and later.
9+
**Configuration Change.** This feature is available from Momentum 4.2 through 4.7.
10+
11+
> **NOTE: This feature was DEPRECATED in Momentum 4.8. Please refer to the [updated](/momentum/4/modules/dnsbuf-new) module for changes in the functionality.**
1012
1113
Momentum does not manipulate the size of UDP sockets it creates and uses for DNS queries; instead, it will use the default sizes configured by the Operating System. This can create problems for clients with too many domains (e.g., tens of thousands) in the system. Responses may be dropped, causing unnecessary DNS failures and retries, thus further increasing the DNS query volume. The `dnsbuf` module enables the client to manipulate the DNS buffer sizes on demand, on the fly.
1214

@@ -150,4 +152,4 @@ The following is an example in which Momentum started with ~30,000 unresolvable
150152
DNS AAAA Queries: 0
151153
DNS MX Queries: 908388
152154
Pending DNS Queries: 311
153-
```
155+
```

content/momentum/4/modules/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ description: "Table of Contents 71 1 Introduction 71 2 ac auth Authentication Ha
3636
| [custom_logger](/momentum/4/modules/custom-logger) | User-defined Logging |
3737
| [dane](/momentum/4/modules/dane) | DANE related DNS Lookups and TLS Verifications |
3838
| [delay_dsn](/momentum/4/modules/delay-dsn) | Delay DSN Generation |
39-
| [dnsbuf](/momentum/4/modules/dnsbuf) | Dynamically Set the DNS UDP Buffer Size |
39+
| [dnsbuf](/momentum/4/modules/dnsbuf-new) | Configure the DNS UDP Buffer Sizes |
4040
| [domainkeys](/momentum/4/modules/domainkeys) | Yahoo! DomainKeys |
4141
| [ds_core](/momentum/4/modules/ds-core) | Datasource Query Core |
4242
| [EC_logger](/momentum/4/modules/ec-logger) | Momentum-Style Logging |

content/momentum/4/modules/summary-all-modules.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ All modules are listed alphabetically with a brief description. Singleton module
4444
| [dk_validate](/momentum/4/modules/domainkeys) | 4.0 | Validate inbound mail checking domain keys signatures |   |   |  ✓ |   |
4545
| [dkim_sign](/momentum/4/modules/opendkim) | 4.0 | Attach DKIM signatures to outbound mail |   |   |  ✓ |   |
4646
| [dkim_validate](/momentum/4/modules/opendkim) | 4.0 | Validate inbound mail checking DKIM signatures |   |   |  ✓ |   |
47-
| [“dnsbuf – Dynamically Set the DNS UDP Buffer Size](/momentum/4/modules/dnsbuf) | 4.2 | Manipulate DNS buffer sizes on demand |   |   |   |   |
47+
| [“dnsbuf – Configure the DNS UDP Buffer Sizes](/momentum/4/modules/dnsbuf-new) | 4.8 | Set UDP buffer sizes for DNS |   |   |   | [“dnsbuf – Dynamically Set the DNS UDP Buffer Size”](/momentum/4/modules/dnsbuf) **(DEPRECATED)** |
4848
| [“ds_core - Datasource Query Core”](/momentum/4/modules/ds-core) (*singleton*) | 4.0 | Provide modular data access and caching for use by other modules |  ✓ |   |   |   |
4949
| [“EC_logger – Momentum-Style Logging”](/momentum/4/modules/ec-logger) | 4.0 | Log the status of messages |   |   |   |   |
5050
| [“eleven – Eleven eXpurgate Content Scanning”](/momentum/4/modules/eleven) (*singleton*) | 4.0 | This module implements the eleven spam filter and categorization service |   |   |  ✓ |   |

0 commit comments

Comments
 (0)