Page MenuHomeVyOS Platform

VPP HugePages calculation is incorrect
Closed, ResolvedPublicBUG

Description

It seems the VPP HugePages calculation is incorrect.
There is an example from the netgate documentation.

For example for a system with a 6GB main heap, consider setting this value to 3072 to match.

This value can be tweaked lower for systems with less memory or higher for systems with more available memory and larger workloads

Check (exact 6G, 3072 hugepages * 2 = 6144M or 6G):

set system option kernel disable-mitigations
set system option kernel memory hugepage-size 2M hugepage-count '3072'
set vpp settings interface eth1 driver 'dpdk'
set vpp settings memory main-heap-size '6G'

Commit unexpectedly fails:

vyos@r14# commit
[ vpp ]
Not enough free hugepage memory to start VPP: available: 6.0 GB,
required: 6.2 GB. Please add kernel memory options for HugePages and
reboot
[[vpp]] failed
Commit failed
[edit]
vyos@r14#

Huge pages exact 3072:

vyos@r14# sudo sysctl -a | grep vm.nr_hugepages
vm.nr_hugepages = 3072
vm.nr_hugepages_mempolicy = 3072
[edit]
vyos@r14#

Solutions (one of them):

  • fix the calculation
  • allow for example -10% -15% values of configure hugepage in the check and pass this config

Details

Version
VyOS 2025.07.24-0021-rolling
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)

Event Timeline

Viacheslav triaged this task as High priority.
natali-rs1985 changed the task status from Open to In progress.Jul 24 2025, 3:02 PM
natali-rs1985 claimed this task.
natali-rs1985 moved this task from Need Triage to Completed on the VyOS Rolling board.
dmbaturin renamed this task from VPP HugePages calculation incorrect to VPP HugePages calculation is incorrect.Thu, Nov 13, 1:30 AM
dmbaturin changed Is it a breaking change? from Unspecified (possibly destroys the router) to Perfectly compatible.