SHRUB Configuration - SHRUB Configuration - UG1586

Onload User Guide (UG1586)

Document_ID
UG1586
Release_Date
2026-06-08
Revision
1.5 English

To enable SHRUB, set the EF_SHRUB_CONTROLLER environment variable when starting Onload:

  • The value of the environment variable gives the numerical id of the SHRUB controller to use. For example, setting shrub_controller=1 uses controller 1.
  • Onload ensures the relevant controller is running. See Starting the SHRUB Controller.
  • EF_RX_DATAPATH must also be set to express or both.

Onload then uses a shared RXQ via the Express datapath for multicast traffic, and an exclusive queue for unicast traffic. Setting EF_SHRUB_UNICAST=1 uses the shared queue for all flows, which reduces the total number of RXQs, and allows other stacks/applications to see these unicast flows.

When all applications which consume data via a controller have EF_POLL_USEC=-1, setting EF_SHRUB_USE_INTERRUPTS=0 disables the use of interrupts by receivers and might provide a performance benefit.

The EF_SHRUB_BUFFER_COUNT setting can be used to increase the number of superbufs which the stack requests. By default, 32 superbufs are used. In most situations it is not necessary for Onload to use a large number of superbufs. This is because incoming traffic is copied to per-packet buffers in the stack as soon as Onload has processed the receive event, and so any traffic which is queued in socket buffers is stored in the per-stack buffers (controlled by EF_MAX_PACKETS) rather than in the shared pool of superbufs.

The EF_SHRUB_MAX_CLIENT_BUFFERS setting can be used to configure the maximum number of buffers each SHRUB client is allowed to reference, to ensure each client always has buffers available. By default, each client uses two buffers.