Intel® Ethernet Controller E810 Application Device Queues (ADQ)

Configuration Guide

ID 609008
Date 04/03/2023
Version 2.8
Document Table of Contents

Redis Server Setup

Note:This section uses application dependent polling (ADQ1.0) for application and testing and does not use an independent poller (ADQ2.0).

The following variables are used in the examples in this section:

$iface The interface in use (PF).
$ipaddr The IP Address of the Redis server interface under test.
$app_​port The starting port of the application (for example, 7001). Note:Port number greater than 5000 is best, but check that it is available (for example: sudo netstat -tulpn | grep LISTEN)
$app_​threads The number of Redis server instances to be run (must be less than or equal to $num_​queues_​tc1).
$redispath The path to Redis install (for example, /opt/redis-4.0.11/bin).
$clients The array of hostnames or IPs of the physical Redis client systems (for example, declare -a clients=("server1" "server2")).
$redisbench_​keysize The Redis benchmark key size in bytes.
$redisbench_​conn The number of connections per Redis benchmark thread.
ADQ Setup Script variables
$bp Global busy_​poll value to be set by ADQ Setup Script (system-wide setting, not to be used with independent poller).
$br Global busy_​read value to be set by ADQ Setup Script (system-wide setting, not to be used with independent poller).
$file_​name Application name to be set and used by ADQ Setup Script (any descriptive string, i.e., redis).
$portrange TCP ports to be configured by ADQ Setup Script.
$addr Destination IP address of traffic to be configured by ADQ Setup Script.

System Setup

  1. Perform general system setup.

    Complete the ADQ install and setup in ADQ System Under Test (SUT) Installation and General System Tuning on just the server under test system.

    Note:Many settings in General System Tuning do not persist between reboots and might have to be reapplied.
  2. Perform Redis build:
    1. Download the Redis release. wget http://download.redis.io/releases/redis-4.0.11.tar.gz
    2. Untar the package. tar -xvzf redis-4.0.11.tar.gz
    3. Install Redis. cd redis-4.0.11 make PREFIX=/opt/redis-4.0.11 install
    4. After this, the redis-server and redis-benchmark are found under /opt/redis-4.0.11/bin.
  3. Perform Redis-specific tuning.

    Enable overcommit and disable transparent hugepages as per Redis recommendations.

    sysctl -w vm.overcommit_memory=1 echo never > /sys/kernel/mm/transparent_hugepage/enabled

Using ADQ Setup Script

The ADQ Setup script allows you to quickly and easily configure required ADQ parameters such as traffic classes, priority, filters, and ethtool parameters etc.

  1. To configure ADQ, run the following command: adqsetup --dev=$iface –-priority=skbedit --busypoll=$bp --busyread=$br create $file_name mode shared \ queues $num_queues_tc1 ports $portrange

    See Notes below for customizing the ADQ configuration. Once ADQ is configured by adqsetup, start the Redis server.

    Notes:
    1. The example command above creates both ingress (Rx) and egress (Tx) filters, and a Linux cgroups are not needed to be created and can be skipped (cgroups are only needed if --priority=skbedit was NOT specified in adqsetup command).
    2. ADQ setup script handles symmetric queues and affinity.
    3. The setup script sets per-queue coalesce by default.
    4. Set the transmit and receive interrupt coalescing values to --rxadapt=off --rxusecs=0 --txadapt=off --txusecs=500 for improved ADQ performance.
    5. To configure independent pollers, add the -pollers=$pollers parameter in the adqsetup command (and optionally --pollers_​timeout), and remove the flags to set global --busypoll=$bp --busyread=$br.
    6. Use the cpu parameter in the command to bind the independent pollers to specific CPU cores. Refer to ADQ Setup Using ADQ Setup Script for more information on pinning pollers to specific CPU cores.
    7. The --debug parameter is optional, but it is useful for obtaining complete stack trace.
    8. For more information on how to use the script, refer ADQ Setup Using ADQ Setup Script.
  2. Start Redis clones and seed initial data.

    Example:

    server="${redispath}/redis-server --protected-mode no --loglevel warning \ --tcp-backlog 1023" trafficgen="${redispath}/redis-benchmark" ports=($(seq $app_port $((app_port + app_threads - 1)))) # start clones in the background then seed database ( for p in ${ports[@]:1}; do sleep 1 $server --port $p --slaveof \ 127.0.0.1 $app_port & done sleep 1 #seed initial data $trafficgen -q -t SET,GET -n 5000 -r 1000 -d 100 -c 1 -P 1 -p $app_port echo "** Ready!" ) & # start master server in the foreground and wait for benchmark to start $server --port ${ports[0]} Note:Pinning the application processes to CPU cores using numactl or similar might provide more consistent results.
Note:The ADQ Setup script clears the existing configuration before proceeding with the new ADQ configuration. To clear manually, follow the steps in Clear the ADQ Configuration.