Does VyOS use more than one CPU core for packet forwarding?
Apparently this comment from a year ago stated that only one core was used. Is that accurate as per May 2020?
Posted May 16, 2020, 11:18 PM UTC
Apparently this comment from a year ago stated that only one core was used. Is that accurate as per May 2020?
Posted May 16, 2020, 11:18 PM UTC
That depends on the network driver.
The comment linked:
[T]he issue is compounded by the fact that the kernel network stack does not span cores so in effect the networking is done by one core
Is not 100% correct.
In most Linux distributions this is true by default but out-of-the-box VyOS configures interrupt coalescing across all available cores when using a driver that supports it. Intel NICs are generally very good. VyOS has done this since release BTW it's not new.
You can verify by looking at /proc/interrupts on a running system. More at https://wiki.vyos.net/wiki/Performance_Tuning
That said there are certainly some limitations in terms of CPU that will slow down small packet processing vs. a hardware L3 switch.
Brilliant, thanks for the answer!
Yeah, I was surprised it would not support something like RSS as it's not exactly a new technology and I don't think VyOS licenses per core (*cough*PaloAlto*cough*).
This is much clarifying, thanks again!
The vyos stack is just the Linux stack, right? So this should be the same question as “does Linux only use one core for networking”.
From what I can tell, since the Big Kernel Lock went away in 2.4 at least the “bottom half” processing gets distributed across all the cores. Your nic might only send interrupts to score 0 - I don’t know much about that part. There’s a bunch of papers out there.
You're right, but the comment put me totally off-track and I feared there would be some artificial limitation I couldn't think of.
Thanks for clarifying!