11 When VPP is installed, a new usergroup *'vpp'* is created. To avoid running the
12 VPP CLI (vppctl) as root, add any existing users to the new group that need to
15 .. code-block:: console
17 $ sudo usermod -a -G vpp user1
19 Update your current session for the group change to take effect:
21 .. code-block:: console
26 Systemd File vpp.service
27 ------------------------
29 When the VPP is installed, a systemd service files is also installed. This
30 file, vpp.service (Ubuntu: /lib/systemd/system/vpp.service and CentOS:
31 /usr/lib/systemd/system/vpp.service), controls how VPP is run as a service. For
32 example, whether or not to restart on failure and if so, with how much delay.
33 Also, which UIO driver should be loaded and location of the *'startup.conf'*
36 .. code-block:: console
38 $ cat /usr/lib/systemd/system/vpp.service
40 Description=Vector Packet Processing Process
41 After=syslog.target network.target auditd.service
44 ExecStartPre=-/bin/rm -f /dev/shm/db /dev/shm/global_vm /dev/shm/vpe-api
45 ExecStartPre=-/sbin/modprobe uio_pci_generic
46 ExecStart=/usr/bin/vpp -c /etc/vpp/startup.conf
52 WantedBy=multi-user.target
56 Some older versions of the *'uio_pci_generic'* driver don't bind all
57 the supported NICs properly, so the *'igb_uio'* driver built from DPDK
58 needs to be installed. This file controls which driver is loaded at boot.
59 *'startup.conf'* file controls which driver is used.
64 VPP requires *hugepages* to run during VPP operation, to manage large pages of memory.
65 During VPP installation, VPP will overwrite the existing hugepage settings.
66 By default, VPP sets the number of hugepages on a system to 1024 2M hugepages.
67 This is the number of hugepages on the system, not just used by VPP.
69 When VPP is installed, the following configuration file is copied to the system. The
70 hugepage settings are applied in the VPP installation and on system reboots. To set
71 the hugepage settings, perform the following commands:
73 .. code-block:: console
75 $ cat /etc/sysctl.d/80-vpp.conf
76 # Number of 2MB hugepages desired
79 # Must be greater than or equal to (2 * vm.nr_hugepages).
82 # All groups allowed to access hugepages
83 vm.hugetlb_shm_group=0
85 # Shared Memory Max must be greater or equal to the total size of hugepages.
86 # For 2MB pages, TotalHugepageSize = vm.nr_hugepages * 2 * 1024 * 1024
87 # If the existing kernel.shmmax setting (cat /sys/proc/kernel/shmmax)
88 # is greater than the calculated TotalHugepageSize then set this parameter
89 # to current shmmax value.
90 kernel.shmmax=2147483648
92 Depending on how the system is being used, this configuration file can be updated to adjust
93 the number of hugepages reserved on a system. Below are some examples of
96 For a small VM with minimal workload:
98 .. code-block:: console
101 vm.max_map_count=2048
102 kernel.shmmax=1073741824
104 For a large system running multiple VMs, each needing its own set of hugepages:
106 .. code-block:: console
108 vm.nr_hugepages=32768
109 vm.max_map_count=66560
110 kernel.shmmax=68719476736
115 If VPP is being run in a Virtual Machine (VM), the VM must have hugepage
116 backing. When VPP is installed, it will attempt to overwrite existing the
117 hugepage setting. If the VM does not have hugepage backing, the install will fail,
118 but the failure may go unnoticed. When the VM is rebooted, on system startup,
119 *'vm.nr_hugepages'* will be reapplied, and will fail, and the VM will abort kernel
120 boot, locking up the VM. To avoid this scenario, ensure the VM has enough