irq cpu binding

Slawa Olhovchenkov slw at zxy.spb.ru
Sat Mar 28 22:46:38 UTC 2015


On Sat, Mar 28, 2015 at 03:27:36PM -0700, Adrian Chadd wrote:

> You still have to pin the nginx threads to whatever your limited set
> of RSS CPUs are, or the benefits aren't really there.

nginx already have this ability:

worker_processes  6;
worker_cpu_affinity 000001 000010 000100 001000 010000 100000;

> I'd rather we just get librss defined in FreeBSD-HEAD and then have
> nginx "know" about that for FreeBSD. It already has to know about the
> linux way of doing it and it has to be conditional on it running

I am don't know about nginx support for RSS in Linux.

> Linux. So it's not a big stretch to need to know about FreeBSD.

I am try to read RSS implementation.
I am don't completely understund it, may be.
I found it overingenering and useless in complex setup.

For example: dual NIC, LACP. Uniqueue map NIC queue to CPU core:

NIC 1 que 0 <=> Core 0
NIC 1 que 1 <=> Core 1
NIC 1 que 2 <=> Core 2
NIC 1 que 3 <=> Core 3
NIC 2 que 0 <=> Core 4
NIC 2 que 1 <=> Core 5
NIC 2 que 2 <=> Core 6
NIC 2 que 3 <=> Core 7

ISP network equipment use proper hash for map flow to network link,
you can't predict what NIC got incoming packet (you may assume that
all not-fragment packets dispatch to same NIC, yes).

This is about case of outgoing connections.



More information about the freebsd-hackers mailing list