Closed SesomB closed 3 weeks ago
@SesomB I think that's a great idea! And you already laid out the entire solution 🙂 Would you consider opening a PR with this implementation?
The PR addressing this issue has been successfully merged, Closing the issue now.
The
DpdkDevice::openMultiQueues
method in the PcapPlusPlus DPDK wrapper is currently not NUMA aware. It allocates memory using hard coded socket id, which is set to0
. This behavior can lead to suboptimal performance on NUMA systems, where memory access times can vary significantly depending on the proximity of the memory to the CPU cores.Possible Solution To address this issue, the following changes can be made:
Add a Private Member: Introduce a private member
m_DeviceSocketId
in theDpdkDevice
class, which will be set in the constructor.Set
m_DeviceSocketId
in the Constructor: Initializem_DeviceSocketId
in theDpdkDevice
constructor usingrte_eth_dev_socket_id
.Modify
DpdkDevice::initMemPool
to Usem_DeviceSocketId
:Modify
DpdkDevice::initQueues
to Usem_DeviceSocketId
:By implementing these changes, the
DpdkDevice::openMultiQueues
method will be NUMA aware, potentially improving performance on NUMA systems by ensuring that memory is allocated on the appropriate NUMA node.