[Tutorial/Call for Testing] Enabling Receive Side Scaling on OPNsense

Started by tuto2, August 16, 2021, 02:13:24 PM

Previous topic - Next topic
Quote from: franco on September 08, 2021, 10:30:14 AM
Sure, kernel is

# opnsense-update -zkr 21.7.2-rss

Make sure to set net.inet.rss.enabled to "1" from System: Settings: Tunables and reboot. As mentioned the sysctl cannot be changed at runtime anymore.


Cheers,
Franco

Thanks, updated to that kernel and set dispatch to hybrid manually again (do I have to?)


root@OPNsense:~ # netstat -Q
Configuration:
Setting                        Current        Limit
Thread count                         4            4
Default queue limit                256        10240
Dispatch policy                 direct          n/a
Threads bound to CPUs          enabled          n/a

Protocols:
Name   Proto QLimit Policy Dispatch Flags
ip         1   1000    cpu   hybrid   C--
igmp       2    256 source  default   ---
rtsock     3    256 source  default   ---
arp        4    256 source  default   ---
ether      5    256    cpu   direct   C--
ip6        6    256   flow  default   ---
ip_direct     9    256    cpu   hybrid   C--
ip6_direct    10    256    cpu   hybrid   C--

Workstreams:
WSID CPU   Name     Len WMark   Disp'd  HDisp'd   QDrops   Queued  Handled
   0   0   ip         0     9        0     2531        0     1853     4384
   0   0   igmp       0     0        0        0        0        0        0
   0   0   rtsock     0     0        0        0        0        0        0
   0   0   arp        0     0        2        0        0        0        2
   0   0   ether      0     0     3519        0        0        0     3519
   0   0   ip6        0     0      138        0        0        0      138
   0   0   ip_direct     0     0        0        0        0        0        0
   0   0   ip6_direct     0     0        0        0        0        0        0
   1   1   ip         0    11        0     4706        0     4646     9352
   1   1   igmp       0     0        0        0        0        0        0
   1   1   rtsock     0     0        0        0        0        0        0
   1   1   arp        0     0        4        0        0        0        4
   1   1   ether      0     0     5731        0        0        0     5731
   1   1   ip6        0     0      146        0        0        0      146
   1   1   ip_direct     0     0        0        0        0        0        0
   1   1   ip6_direct     0     0        0        0        0        0        0
   2   2   ip         0     9        0     1794        0     5857     7651
   2   2   igmp       0     0        0        0        0        0        0
   2   2   rtsock     0     5        0        0        0      153      153
   2   2   arp        0     0        0        0        0        0        0
   2   2   ether      0     0     2374        0        0        0     2374
   2   2   ip6        0     1      189        0        0        7      196
   2   2   ip_direct     0     0        0        0        0        0        0
   2   2   ip6_direct     0     0        0        0        0        0        0
   3   3   ip         0     6        0     2706        0     4659     7365
   3   3   igmp       0     0        0        0        0        0        0
   3   3   rtsock     0     0        0        0        0        0        0
   3   3   arp        0     0      250        0        0        0      250
   3   3   ether      0     0     3526        0        0        0     3526
   3   3   ip6        0     1      137        0        0        3      140
   3   3   ip_direct     0     0        0        0        0        0        0
   3   3   ip6_direct     0     0        0        0        0        0        0

root@OPNsense:~ # sysctl -w net.isr.dispatch=hybrid
net.isr.dispatch: direct -> hybrid

root@OPNsense:~ # netstat -Q
Configuration:
Setting                        Current        Limit
Thread count                         4            4
Default queue limit                256        10240
Dispatch policy                 hybrid          n/a
Threads bound to CPUs          enabled          n/a

Protocols:
Name   Proto QLimit Policy Dispatch Flags
ip         1   1000    cpu   hybrid   C--
igmp       2    256 source  default   ---
rtsock     3    256 source  default   ---
arp        4    256 source  default   ---
ether      5    256    cpu   direct   C--
ip6        6    256   flow  default   ---
ip_direct     9    256    cpu   hybrid   C--
ip6_direct    10    256    cpu   hybrid   C--

Workstreams:
WSID CPU   Name     Len WMark   Disp'd  HDisp'd   QDrops   Queued  Handled
   0   0   ip         0     9        0     2797        0     5265     8062
   0   0   igmp       0     0        0        0        0        0        0
   0   0   rtsock     0     0        0        0        0        0        0
   0   0   arp        0     0        3        0        0        0        3
   0   0   ether      0     0     4026        0        0        0     4026
   0   0   ip6        0     0      160        0        0        0      160
   0   0   ip_direct     0     0        0        0        0        0        0
   0   0   ip6_direct     0     0        0        0        0        0        0
   1   1   ip         0    11        0     5042        0     4827     9869
   1   1   igmp       0     0        0        0        0        0        0
   1   1   rtsock     0     0        0        0        0        0        0
   1   1   arp        0     1        4        0        0        2        6
   1   1   ether      0     0     6351        0        0        0     6351
   1   1   ip6        0     0      170        1        0        0      171
   1   1   ip_direct     0     0        0        0        0        0        0
   1   1   ip6_direct     0     0        0        0        0        0        0
   2   2   ip         0     9        0     2109        0     8354    10463
   2   2   igmp       0     0        0        0        0        0        0
   2   2   rtsock     0     5        0        0        0      164      164
   2   2   arp        0     0        0        0        0        0        0
   2   2   ether      0     0     2829        0        0        0     2829
   2   2   ip6        0     1      228        1        0       11      240
   2   2   ip_direct     0     0        0        0        0        0        0
   2   2   ip6_direct     0     0        0        0        0        0        0
   3   3   ip         0     6        0     3034        0     6392     9426
   3   3   igmp       0     0        0        0        0        0        0
   3   3   rtsock     0     0        0        0        0        0        0
   3   3   arp        0     0      385        0        0        0      385
   3   3   ether      0     0     4073        0        0        0     4073
   3   3   ip6        0     1      145        0        0        3      148
   3   3   ip_direct     0     0        0        0        0        0        0
   3   3   ip6_direct     0     0        0        0        0        0        0

Quote from: nzkiwi68 on September 08, 2021, 04:10:45 AM

I too had to add the "net.isr.dispatch = hybrid" to
System > Settings > Tunables


Quote from: athurdent on September 08, 2021, 10:47:39 AM

Thanks, updated to that kernel and set dispatch to hybrid manually again (do I have to?)


It seems the original post wasn't all to clear on what really happens with the dispatching policy when enabling RSS. While 'netstat -Q' and the relevant sysctl shows that the dispatch policy is 'direct', this is a global setting which is overridden when enabling RSS. The output from netstat -Q actually shows this, as dispatch policies are also defined on a per-protocol basis. You will see that only ether is direct, which is correct for various technical reasons. From the IP layer and onwards the policy will be hybrid.

TLDR; There is no need to manually set the dispatch policy to hybrid.

Cheers,

Stephan

Quote from: nzkiwi68 on September 08, 2021, 04:34:52 AM
Best result I got across a layer 3 switch;

QuoteC:\iperf-3.1.3-win64>iperf3.exe -p 30718 -c 192.168.1.242
Connecting to host 192.168.1.242, port 30718
[  4] local 10.1.1.16 port 63670 connected to 192.168.1.242 port 30718
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-1.00   sec  83.4 MBytes   699 Mbits/sec
[  4]   1.00-2.00   sec   190 MBytes  1.59 Gbits/sec
[  4]   2.00-3.00   sec   269 MBytes  2.26 Gbits/sec
[  4]   3.00-4.00   sec   262 MBytes  2.20 Gbits/sec
[  4]   4.00-5.00   sec   260 MBytes  2.18 Gbits/sec
[  4]   5.00-6.00   sec   263 MBytes  2.21 Gbits/sec
[  4]   6.00-7.00   sec   214 MBytes  1.79 Gbits/sec
[  4]   7.00-8.00   sec   246 MBytes  2.06 Gbits/sec
[  4]   8.00-9.00   sec   250 MBytes  2.10 Gbits/sec
[  4]   9.00-10.00  sec   208 MBytes  1.74 Gbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-10.00  sec  2.19 GBytes  1.88 Gbits/sec                  sender
[  4]   0.00-10.00  sec  2.19 GBytes  1.88 Gbits/sec                  receiver

This is single thread performance, since you're only starting one iperf thread.

RSS comes into play when lots of different connections are built up, since it uses the protocol 4-tuples to calculate the resulting CPU core. Try iperf3.exe -P 4 to start up some parallel threads. Note that RSS does not guarantee perfect load-balancing, 1 or more connections might still end up on the same CPU.

Cheers,

Stephan

Thanks @tuto2!

Wanted to post my iperf3 results, but somehow I cannot compare with the stock kernel, no idea how to revert. Turning off RSS does not work, looks like this after a reboot:

Cannot turn it off anymore:
root@OPNsense:~ # cat /boot/loader.conf | grep rss
net.inet.rss.enabled="0"
root@OPNsense:~ # sysctl net.inet.rss.enabled
net.inet.rss.enabled: 1


One thing I noticed between the two kernels is that ip6 went from hybrid to direct.  Not sure why ip6 wouldn't have RSS enabled.  Do we need to have a tunable set for this as well?

Quote from: madj42 on September 08, 2021, 02:02:06 PM
One thing I noticed between the two kernels is that ip6 went from hybrid to direct.  Not sure why ip6 wouldn't have RSS enabled.  Do we need to have a tunable set for this as well?

I'm not sure why this is the case for you. All protocols are dispatched using the default policy (which is direct) when NOT using RSS, unless you specify otherwise using a sysctl.

When using RSS, both ip and ip6 are switched to hybrid mode, which is correct.

Case in point:

No RSS:

root@OPNsense:~ # netstat -Q
Configuration:
Setting                        Current        Limit
Thread count                         8            8
Default queue limit                256        10240
Dispatch policy                 direct          n/a
Threads bound to CPUs          enabled          n/a

Protocols:
Name   Proto QLimit Policy Dispatch Flags
ip         1   1000   flow  default   ---
igmp       2    256 source  default   ---
rtsock     3    256 source  default   ---
arp        4    256 source  default   ---
ether      5    256 source   direct   ---
ip6        6    256   flow  default   ---



WITH RSS:


Configuration:
Setting                        Current        Limit
Thread count                         8            8
Default queue limit                256        10240
Dispatch policy                 direct          n/a
Threads bound to CPUs          enabled          n/a

Protocols:
Name   Proto QLimit Policy Dispatch Flags
ip         1   1000    cpu   hybrid   C--
igmp       2    256 source  default   ---
rtsock     3    256 source  default   ---
arp        4    256 source  default   ---
ether      5    256    cpu   direct   C--
ip6        6    256    cpu   hybrid   C--
ip_direct     9    256    cpu   hybrid   C--
ip6_direct    10    256    cpu   hybrid   C--


Disable after reboot works for me. I think this is the default also when nothing was specified.


Cheers,
Franco

Quote from: franco on September 08, 2021, 02:19:10 PM
Disable after reboot works for me. I think this is the default also when nothing was specified.


Cheers,
Franco

Thanks, it seems I had to delete the tunable instead of setting it to 0. After a reboot it was gone.
But I think, even after removing all of the tunables & rebooting, my ixl network card still balances the connections. There are 4 very active if_io_tqg_* when iperf'ing -P8 through the firewall.

PID USERNAME    PRI NICE   SIZE    RES STATE    C   TIME    WCPU COMMAND
  0 root        -76    -      0   656K CPU3     3   0:44  91.01% [kernel{if_io_tqg_3}]
  0 root        -76    -      0   656K CPU1     1   0:58  90.08% [kernel{if_io_tqg_1}]
  0 root        -76    -      0   656K -        2   0:51  82.79% [kernel{if_io_tqg_2}]
11 root        155 ki31      0    64K RUN      0 268:36  72.36% [idle{idle: cpu0}]
11 root        155 ki31      0    64K RUN      2 269:19  15.18% [idle{idle: cpu2}]
  0 root        -76    -      0   656K -        0   0:53  11.80% [kernel{if_io_tqg_0}]
11 root        155 ki31      0    64K RUN      1 255:37   9.32% [idle{idle: cpu1}]
11 root        155 ki31      0    64K RUN      3 269:09   6.96% [idle{idle: cpu3}]

ix also seems to have support for RSS, passed through my other 10G card to OPNsense.

ix0: <Intel(R) X520 82599ES (SFI/SFP+)> port 0xf020-0xf03f mem 0xfd600000-0xfd67ffff,0xfd680000-0xfd683fff irq 10 at device 17.0 on pci0
ix0: Using 2048 TX descriptors and 2048 RX descriptors
ix0: Using 4 RX queues 4 TX queues
ix0: Using MSI-X interrupts with 5 vectors
ix0: allocated for 4 queues
ix0: allocated for 4 rx queues
ix0: Ethernet address: ***
ix0: PCI Express Bus: Speed 5.0GT/s Width x8
ix0: Error 2 setting up SR-IOV
ix0: netmap queues/slots: TX 4/2048, RX 4/2048

root@OPNsense:~ # sysctl -a | grep rss
net.inet.rss.bucket_mapping: 0:0 1:1 2:2 3:3 4:0 5:1 6:2 7:3
net.inet.rss.enabled: 1
net.inet.rss.debug: 0
net.inet.rss.basecpu: 0
net.inet.rss.buckets: 8
net.inet.rss.maxcpus: 64
net.inet.rss.ncpus: 4
net.inet.rss.maxbits: 7
net.inet.rss.mask: 7
net.inet.rss.bits: 3
net.inet.rss.hashalgo: 2
hw.bxe.udp_rss: 0
hw.ix.enable_rss: 1

root@OPNsense:~ # netstat -Q
Configuration:
Setting                        Current        Limit
Thread count                         4            4
Default queue limit                256        10240
Dispatch policy                 direct          n/a
Threads bound to CPUs          enabled          n/a

Protocols:
Name   Proto QLimit Policy Dispatch Flags
ip         1   1000    cpu   hybrid   C--
igmp       2    256 source  default   ---
rtsock     3    256 source  default   ---
arp        4    256 source  default   ---
ether      5    256    cpu   direct   C--
ip6        6    256   flow  default   ---
ip_direct     9    256    cpu   hybrid   C--
ip6_direct    10    256    cpu   hybrid   C--

Workstreams:
WSID CPU   Name     Len WMark   Disp'd  HDisp'd   QDrops   Queued  Handled
   0   0   ip         0     4        0      664        0     6779     7443
   0   0   igmp       0     0        0        0        0        0        0
   0   0   rtsock     0     0        0        0        0        0        0
   0   0   arp        0     0      415        0        0        0      415
   0   0   ether      0     0     2429        0        0        0     2429
   0   0   ip6        0     1       39        0        0        6       45
   0   0   ip_direct     0     0        0        0        0        0        0
   0   0   ip6_direct     0     0        0        0        0        0        0
   1   1   ip         0     6        0      688        0     6492     7180
   1   1   igmp       0     0        0        0        0        0        0
   1   1   rtsock     0     7        0        0        0      338      338
   1   1   arp        0     0      188        0        0        0      188
   1   1   ether      0     0     1955        0        0        0     1955
   1   1   ip6        0     2      114        0        0       31      145
   1   1   ip_direct     0     0        0        0        0        0        0
   1   1   ip6_direct     0     0        0        0        0        0        0
   2   2   ip         0     5        0     1341        0     2715     4056
   2   2   igmp       0     0        0        0        0        0        0
   2   2   rtsock     0     0        0        0        0        0        0
   2   2   arp        0     0       73        0        0        0       73
   2   2   ether      0     0     4118        0        0        0     4118
   2   2   ip6        0     0      782        0        0        0      782
   2   2   ip_direct     0     0        0        0        0        0        0
   2   2   ip6_direct     0     0        0        0        0        0        0
   3   3   ip         0    16        0      353        0     4932     5285
   3   3   igmp       0     0        0        0        0        0        0
   3   3   rtsock     0     0        0        0        0        0        0
   3   3   arp        0     0        0        0        0        0        0
   3   3   ether      0     0      568        0        0        0      568
   3   3   ip6        0     1       26        0        0        1       27
   3   3   ip_direct     0     0        0        0        0        0        0
   3   3   ip6_direct     0     0        0        0        0        0        0

Quote from: athurdent on September 10, 2021, 04:31:38 PM
ix also seems to have support for RSS, passed through my other 10G card to OPNsense.

ix0: <Intel(R) X520 82599ES (SFI/SFP+)> port 0xf020-0xf03f mem 0xfd600000-0xfd67ffff,0xfd680000-0xfd683fff irq 10 at device 17.0 on pci0
ix0: Using 2048 TX descriptors and 2048 RX descriptors
ix0: Using 4 RX queues 4 TX queues
ix0: Using MSI-X interrupts with 5 vectors
ix0: allocated for 4 queues
ix0: allocated for 4 rx queues
ix0: Ethernet address: ***
ix0: PCI Express Bus: Speed 5.0GT/s Width x8
ix0: Error 2 setting up SR-IOV
ix0: netmap queues/slots: TX 4/2048, RX 4/2048

root@OPNsense:~ # sysctl -a | grep rss
net.inet.rss.bucket_mapping: 0:0 1:1 2:2 3:3 4:0 5:1 6:2 7:3
net.inet.rss.enabled: 1
net.inet.rss.debug: 0
net.inet.rss.basecpu: 0
net.inet.rss.buckets: 8
net.inet.rss.maxcpus: 64
net.inet.rss.ncpus: 4
net.inet.rss.maxbits: 7
net.inet.rss.mask: 7
net.inet.rss.bits: 3
net.inet.rss.hashalgo: 2
hw.bxe.udp_rss: 0
hw.ix.enable_rss: 1

root@OPNsense:~ # netstat -Q
Configuration:
Setting                        Current        Limit
Thread count                         4            4
Default queue limit                256        10240
Dispatch policy                 direct          n/a
Threads bound to CPUs          enabled          n/a

Protocols:
Name   Proto QLimit Policy Dispatch Flags
ip         1   1000    cpu   hybrid   C--
igmp       2    256 source  default   ---
rtsock     3    256 source  default   ---
arp        4    256 source  default   ---
ether      5    256    cpu   direct   C--
ip6        6    256   flow  default   ---
ip_direct     9    256    cpu   hybrid   C--
ip6_direct    10    256    cpu   hybrid   C--

Workstreams:
WSID CPU   Name     Len WMark   Disp'd  HDisp'd   QDrops   Queued  Handled
   0   0   ip         0     4        0      664        0     6779     7443
   0   0   igmp       0     0        0        0        0        0        0
   0   0   rtsock     0     0        0        0        0        0        0
   0   0   arp        0     0      415        0        0        0      415
   0   0   ether      0     0     2429        0        0        0     2429
   0   0   ip6        0     1       39        0        0        6       45
   0   0   ip_direct     0     0        0        0        0        0        0
   0   0   ip6_direct     0     0        0        0        0        0        0
   1   1   ip         0     6        0      688        0     6492     7180
   1   1   igmp       0     0        0        0        0        0        0
   1   1   rtsock     0     7        0        0        0      338      338
   1   1   arp        0     0      188        0        0        0      188
   1   1   ether      0     0     1955        0        0        0     1955
   1   1   ip6        0     2      114        0        0       31      145
   1   1   ip_direct     0     0        0        0        0        0        0
   1   1   ip6_direct     0     0        0        0        0        0        0
   2   2   ip         0     5        0     1341        0     2715     4056
   2   2   igmp       0     0        0        0        0        0        0
   2   2   rtsock     0     0        0        0        0        0        0
   2   2   arp        0     0       73        0        0        0       73
   2   2   ether      0     0     4118        0        0        0     4118
   2   2   ip6        0     0      782        0        0        0      782
   2   2   ip_direct     0     0        0        0        0        0        0
   2   2   ip6_direct     0     0        0        0        0        0        0
   3   3   ip         0    16        0      353        0     4932     5285
   3   3   igmp       0     0        0        0        0        0        0
   3   3   rtsock     0     0        0        0        0        0        0
   3   3   arp        0     0        0        0        0        0        0
   3   3   ether      0     0      568        0        0        0      568
   3   3   ip6        0     1       26        0        0        1       27
   3   3   ip_direct     0     0        0        0        0        0        0
   3   3   ip6_direct     0     0        0        0        0        0        0


I also have an ix based card and it seems you're also having the same issue I'm having in regards to ip6 not having RSS enabled.  Not sure why this would be but it was enabled for me with the previous kernel version.

Quote from: madj42 on September 11, 2021, 02:11:48 AM
I also have an ix based card and it seems you're also having the same issue I'm having in regards to ip6 not having RSS enabled.  Not sure why this would be but it was enabled for me with the previous kernel version.

Good find, seems that the .2 kernel has changes for IPv6. Just took a look at my ixl output from the previous kernel, and compared to the .2 one ixl also lost IPv6 hybrid there.
So, it's gone for ix and ixl at least.

By default, don't use core 0 for RSS

As I understand from my Windows Server RSS tuning, it's best never to assign core 0 to RSS because the first CPU core 0 gets used by all sorts of other base OS processes and thus you ultimately get better performance if;

  • 4 core CPU (0,1,2,3)- you only set 3 cores for RSS - cores 1,2,3
  • 8 core CPU (0,1,2,3,4,5,6,7)- you only set 7 cores for RSS - cores 2,3,4,5,6,7,8

I imagine FreeBSD is no different to Windows in regards to certain base processes and interrupts using core 0 exclusively.

You could also make a GUI setting or tunable option we can set, and, allow us to;

  • select the first CPU core to use
  • how many cores to use


That way, if I have a 16 core CPU (e.g. AMD EPYC), I would start at a higher core and only allocate a maximum of 8 cores.


References
https://www.darrylvanderpeijl.com/windows-server-2016-networking-optimizing-network-settings/
https://www.broadcom.com/support/knowledgebase/1211161326328/rss-and-vmq-tuning-on-windows-servers
https://www.itprotoday.com/server-virtualization/why-you-skip-first-core-when-configuring-rss-and-vmq

As for deviating from FreeBSD further we need to take this step forward first on common ground.

For now it doesn't matter whether packet processing is all on CPU 0 or spread across more than one CPU including CPU 0. It's also a bit difficult since RSS is tied to multi queue setup in NICs and not populating a queue (3 to be used vs. 4 existing) can bring other side effects and packet distribution is probably even less optimal.

But in any case if there are easy improvements we will make them happen as we progress and try to upstream to FreeBSD.


Cheers,
Franco

Managed to get SR-IOV working on my Proxmox host.
Seems the iavf driver also supports RSS. No speed difference to the non RSS kernel version though.

Here's an iperf3 test through the firewall with RSS enabled.

With Sensei:
iperf3 -c192.168.178.4 -R -P10
.
[SUM]   0.00-10.00  sec  5.66 GBytes  4.86 Gbits/sec  5533             sender
[SUM]   0.00-10.00  sec  5.64 GBytes  4.85 Gbits/sec                  receiver


Sensei off:
iperf3 -c192.168.178.4 -R -P10
.
[SUM]   0.00-10.00  sec  7.18 GBytes  6.16 Gbits/sec  122             sender
[SUM]   0.00-10.00  sec  7.12 GBytes  6.12 Gbits/sec                  receiver


I am seeing something odd here. If I have RSS enabled, unbound is no longer working on all threads. I have a 2 core machine, unbound starts with 2 threads, but thread 0 is not doing any work. When I disable RSS using the sysctl and reboot, unbound is working normally again.
Are any other people seeing this?

RSS enabled:
root@jdjdehaan:~ # unbound-control -c /var/unbound/unbound.conf stats
thread0.num.queries=0
thread0.num.queries_ip_ratelimited=0
thread0.num.cachehits=0
thread0.num.cachemiss=0
thread0.num.prefetch=0
thread0.num.expired=0
thread0.num.recursivereplies=0
thread0.requestlist.avg=0
thread0.requestlist.max=0
thread0.requestlist.overwritten=0
thread0.requestlist.exceeded=0
thread0.requestlist.current.all=0
thread0.requestlist.current.user=0
thread0.recursion.time.avg=0.000000
thread0.recursion.time.median=0
thread0.tcpusage=0
thread1.num.queries=38
thread1.num.queries_ip_ratelimited=0
thread1.num.cachehits=5
thread1.num.cachemiss=33
thread1.num.prefetch=0
thread1.num.expired=0
thread1.num.recursivereplies=33
thread1.requestlist.avg=0.606061
thread1.requestlist.max=3
thread1.requestlist.overwritten=0
thread1.requestlist.exceeded=0
thread1.requestlist.current.all=0
thread1.requestlist.current.user=0
thread1.recursion.time.avg=0.057025
thread1.recursion.time.median=0.0354987
thread1.tcpusage=0
total.num.queries=38
total.num.queries_ip_ratelimited=0
total.num.cachehits=5
total.num.cachemiss=33
total.num.prefetch=0
total.num.expired=0
total.num.recursivereplies=33
total.requestlist.avg=0.606061
total.requestlist.max=3
total.requestlist.overwritten=0
total.requestlist.exceeded=0
total.requestlist.current.all=0
total.requestlist.current.user=0
total.recursion.time.avg=0.057025
total.recursion.time.median=0.0177493
total.tcpusage=0
time.now=1631829579.788081
time.up=18.811257
time.elapsed=18.811257


RSS disabled:
root@jdjdehaan:~ # unbound-control -c /var/unbound/unbound.conf stats
thread0.num.queries=11
thread0.num.queries_ip_ratelimited=0
thread0.num.cachehits=1
thread0.num.cachemiss=10
thread0.num.prefetch=0
thread0.num.expired=0
thread0.num.recursivereplies=10
thread0.requestlist.avg=2.4
thread0.requestlist.max=6
thread0.requestlist.overwritten=0
thread0.requestlist.exceeded=0
thread0.requestlist.current.all=0
thread0.requestlist.current.user=0
thread0.recursion.time.avg=0.681863
thread0.recursion.time.median=0.436907
thread0.tcpusage=0
thread1.num.queries=16
thread1.num.queries_ip_ratelimited=0
thread1.num.cachehits=2
thread1.num.cachemiss=14
thread1.num.prefetch=0
thread1.num.expired=0
thread1.num.recursivereplies=14
thread1.requestlist.avg=0.571429
thread1.requestlist.max=2
thread1.requestlist.overwritten=0
thread1.requestlist.exceeded=0
thread1.requestlist.current.all=0
thread1.requestlist.current.user=0
thread1.recursion.time.avg=0.362820
thread1.recursion.time.median=0.131072
thread1.tcpusage=0
total.num.queries=27
total.num.queries_ip_ratelimited=0
total.num.cachehits=3
total.num.cachemiss=24
total.num.prefetch=0
total.num.expired=0
total.num.recursivereplies=24
total.requestlist.avg=1.33333
total.requestlist.max=6
total.requestlist.overwritten=0
total.requestlist.exceeded=0
total.requestlist.current.all=0
total.requestlist.current.user=0
total.recursion.time.avg=0.495755
total.recursion.time.median=0.283989
total.tcpusage=0
time.now=1631829178.752625
time.up=124.904324
time.elapsed=57.175103
In theory there is no difference between theory and practice. In practice there is.