// Module included in the following assemblies:
//
// * networking/hardware_networks/using-dpdk-and-rdma.adoc

:_mod-docs-content-type: PROCEDURE
[id="nw-example-dpdk-line-rate_{context}"]
= Using SR-IOV and the Node Tuning Operator to achieve a DPDK line rate

[role="_abstract"]
You can use the Node Tuning Operator to configure isolated CPUs, hugepages, and a topology scheduler.
You can then use the Node Tuning Operator with Single Root I/O Virtualization (SR-IOV) to achieve a specific Data Plane Development Kit (DPDK) line rate.

.Prerequisites

* You have installed the OpenShift CLI (`oc`).
* You have installed the SR-IOV Network Operator.
* You have logged in as a user with `cluster-admin` privileges.
* You have deployed a standalone Node Tuning Operator.
+
[NOTE]
====
In previous versions of {product-title}, the Performance Addon Operator was used to implement automatic tuning to achieve low latency performance for OpenShift applications. In {product-title} 4.11 and later, this functionality is part of the Node Tuning Operator.
====

.Procedure
. Create a `PerformanceProfile` object based on the following example:
+
[source,yaml]
----
apiVersion: performance.openshift.io/v2
kind: PerformanceProfile
metadata:
  name: performance
spec:
  globallyDisableIrqLoadBalancing: true
  cpu:
    isolated: 21-51,73-103
    reserved: 0-20,52-72
  hugepages:
    defaultHugepagesSize: 1G
    pages:
      - count: 32
        size: 1G
  net:
    userLevelNetworking: true
  numa:
    topologyPolicy: "single-numa-node"
  nodeSelector:
    node-role.kubernetes.io/worker-cnf: ""
----
+
where:
+
`metadata.name`:: Specifies the name of the performance profile.
`spec.cpu.isolated`:: Specifies the CPUs that are isolated for the application workloads. If Hyper-Threading is enabled on the system, allocate the relevant symbolic links to the `isolated` and `reserved` CPU groups. If the system has multiple non-uniform memory access (NUMA) nodes, allocate CPUs from both NUMAs to both groups. You can also use the Performance Profile Creator for this task. For more information, see _Creating a performance profile_.
`spec.cpu.reserved`:: Specifies the CPUs that are reserved for the operating system and Kubernetes system daemons. You can also specify a list of devices that will have their queues set to the reserved CPU count. For more information, see _Reducing NIC queues using the Node Tuning Operator_.
`spec.hugepages.defaultHugepagesSize`:: Specifies the default size of hugepages.
`spec.hugepages.pages`:: Specifies the number and size of hugepages to allocate. You can specify the NUMA configuration for the hugepages. By default, the system allocates an even number to every NUMA node on the system.
`spec.net.userLevelNetworking`:: Specifies whether to enable user-level networking. Set to `true` for DPDK workloads.
`spec.numa.topologyPolicy`:: Specifies the NUMA topology policy. Set to `single-numa-node` to ensure that all resources are allocated from the same NUMA node.
`spec.nodeSelector`:: Specifies the node selector label for nodes that this performance profile applies to.
. Save the `yaml` file as `mlx-dpdk-perfprofile-policy.yaml`.
. Apply the performance profile using the following command:
+
[source,terminal]
----
$ oc create -f mlx-dpdk-perfprofile-policy.yaml
----
