]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Increase default to `num-queries-per-thread: 2048`, when unbound is
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Wed, 16 Apr 2025 10:03:08 +0000 (12:03 +0200)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Wed, 16 Apr 2025 10:03:08 +0000 (12:03 +0200)
  compiled with libevent. It makes saturation of the task queue more
  resource intensive and less practical. Thanks to Shiming Liu,
  Network and Information Security Lab, Tsinghua University for the
  report.

doc/Changelog
doc/example.conf.in
doc/unbound.conf.5.in
util/config_file.c

index f695d7f4e454c8ab2d3bd84efdec83c1e581d067..488b107c094f771fd0b6d9258e76268fce6f7073 100644 (file)
@@ -1,3 +1,10 @@
+16 April 2025: Wouter
+       - Increase default to `num-queries-per-thread: 2048`, when unbound is
+         compiled with libevent. It makes saturation of the task queue more
+         resource intensive and less practical. Thanks to Shiming Liu,
+         Network and Information Security Lab, Tsinghua University for the
+         report.
+
 11 April 2025: Yorgos
        - Merge #1265: Fix WSAPoll.
 
index fdef9ef37917658796f55113f6a35b5466412a14..db54f9739f9b1d6ba9a8d357082aac8cb9be1660 100644 (file)
@@ -163,7 +163,7 @@ server:
        # msg-cache-slabs: 4
 
        # the number of queries that a thread gets to service.
-       # num-queries-per-thread: 1024
+       # num-queries-per-thread: 2048
 
        # if very busy, 50% queries run to completion, 50% get timeout in msec
        # jostle-timeout: 200
index 21dbd73e6f8c6d85ee5f7df63880fe06fff71c2c..4c7ea9f75da998e248b1076cbc731664c3c6af8d 100644 (file)
@@ -268,7 +268,7 @@ The number of queries that every thread will service simultaneously.
 If more queries arrive that need servicing, and no queries can be jostled out
 (see \fIjostle\-timeout\fR), then the queries are dropped. This forces
 the client to resend after a timeout; allowing the server time to work on
-the existing queries. Default depends on compile options, 512 or 1024.
+the existing queries. Default depends on compile options, 512 or 2048.
 .TP
 .B jostle\-timeout: \fI<msec>
 Timeout used when the server is very busy.  Set to a value that usually
@@ -280,7 +280,7 @@ service by slow queries or high query rates.  Default 200 milliseconds.
 The effect is that the qps for long-lasting queries is about
 (numqueriesperthread / 2) / (average time for such long queries) qps.
 The qps for short queries can be about (numqueriesperthread / 2)
-/ (jostletimeout in whole seconds) qps per thread, about (1024/2)*5 = 2560
+/ (jostletimeout in whole seconds) qps per thread, about (2048/2)*5 = 5120
 qps by default.
 .TP
 .B delay\-close: \fI<msec>
index 81bffa8d88aab1f72920f5080039767810163c2c..7566d690c39bf81d521ff2fe65fe4227af8b4c01 100644 (file)
@@ -155,7 +155,7 @@ config_create(void)
 #  else
        /* libevent can use many sockets */
        cfg->outgoing_num_ports = 4096;
-       cfg->num_queries_per_thread = 1024;
+       cfg->num_queries_per_thread = 2048;
 #  endif
        cfg->outgoing_num_tcp = 10;
        cfg->incoming_num_tcp = 10;