5. 5
NFV – basic concepts
● independent common hardware
● automatic network operation
● flexible application development/deploy/high reliability
● provide the same service quality and safety as Telecom network
8. 8
NFV bottlenecks
● packet loss
● hypervisor overhead
● low routing/traffic throughput
● CPU
● vm/instances resources allocation and scheduling
9. 9
NFV – workload example
● Some NFV applications may have been developed to make specific use of certain
CPU instructions.
Example :
● A VPN appliance that requires a high-performance cryptography library Intel®
Advanced Encryption Standard New Instructions (Intel® AES-NI).
12. 12
pci passtrough
● Allocation of the PCIe NIC entirely dedicated to the VMs
● No sharing of the NIC
● If your hardware does not have an I/O MMU (known as "Intel VT-d" on Intel-based
machines and "AMD I/O Virtualization Technology" on AMD-based machines), you
will not be able to assign devices in (hypervisor) KVM.
16. 16
sr-iov (single-root input/output virtualization)
● Allows a device, such as a network adapter, to separate access to its resources
among various PCIe hardware functions: physical function (PF) and one or more
virtual functions (VFs)
● Improves manageability and performance
● Enables network traffic to bypass the software layer of the hypervisor
and flow directly between the VF and the virtual machine
● The PCI SR-IOV specification indicates that each device can have up to 256 VFs.
Depending on the SR-IOV device.
20. 20
hugepages
● Linux uses a mechanism in the CPU architecture called "Translation Lookaside
Buffers" (TLB) to manage the mapping of virtual memory pages to actual physical
memory addresses.
● The TLB is a limited hardware resource, so utilizing a huge amount of physical
memory with the default page size consumes the TLB and adds processing
overhead
● Boost CPU computing performance
● The obvious optimization is to cache the results
21. 21
hugepages
Host
# grubby --update-kernel=ALL --args=”hugepagesz=2M hugepages=2048
# echo 4 > /sys/devices/system/node/node0/hugepages/hugepages-
2048kB/nr_hugepages
# nova flavor-key m1.small.performance set hw:mem_page_size=2048
Host
# grubby --update-kernel=ALL --args=”hugepagesz=2M hugepages=2048
# echo 4 > /sys/devices/system/node/node0/hugepages/hugepages-
2048kB/nr_hugepages
# nova flavor-key m1.small.performance set hw:mem_page_size=2048
23. 23
numa
● Each node (or CPU) has its own memory bank
● memory access management is now
distributed
● memory proximity
● performance and latency characteristics differ
depending on the core a process is executing
on and where the memory a process is
accessing is located.
24. 24
numa / cpu pinning
● Define vCPUs to cores 1 -> 1
● Improves performance on the VM processing capacity
● Related to NUMA and PCI-Passthrough
$ numactl --hardware
node 0 cpus: 0 1 | 2 3
node 1 cpus: 4 5 | 6 7
Host Processes: Cores -> 0,1,4,5
Guest: Cores -> 2,3,6,7
/etc/nova/nova.conf
vcpu_pin_set=2,3,6,7
$ numactl --hardware
node 0 cpus: 0 1 | 2 3
node 1 cpus: 4 5 | 6 7
Host Processes: Cores -> 0,1,4,5
Guest: Cores -> 2,3,6,7
/etc/nova/nova.conf
vcpu_pin_set=2,3,6,7
25. 25
numa / cpu pinning
$ nova flavor-create small.numa auto 2048 20 2
$ nova flavor-key small.numa set hw:cpu_policy=dedicated
$ nova flavor-key small.numa set aggregate_instance_extra_specs:pinned=true
$ nova flavor-create small.numa auto 2048 20 2
$ nova flavor-key small.numa set hw:cpu_policy=dedicated
$ nova flavor-key small.numa set aggregate_instance_extra_specs:pinned=true
28. 28
dpdk
● Data Plane Development Kit (DPDK) greatly boosts packet processing
performance and throughput, allowing more time for data plane applications.