Re: Why the number of /proc/interrupts doesn't change when nic isunder heavy workload?

From: Eric Dumazet
Date: Mon Jan 16 2012 - 02:01:35 EST


Le lundi 16 janvier 2012 Ã 07:53 +0100, Eric Dumazet a Ãcrit :
> Le dimanche 15 janvier 2012 Ã 17:27 -0500, Yuehai Xu a Ãcrit :
> > Thanks for replying! Please see below:
>
> > My memcached uses 8 different UDP sockets(8 different UDP ports), so
> > there should be no lock contention for a single UDP rx-queue.
>
> Ah, I missed this mail, so you really should post here result of "perf
> top -C 0", after you make sure your NIC interrupts are handled by cpu 0.
>
> Also, what speed is your link, and how many UDP messages per second do
> you receive ?
>

RPS is not good for you because the generic rxhash computation will
spread messages for UDP port XX on many different cpus (because rxhash
computation takes into account the complete tuple (src ip, dst ip, src
port, dst port), not only dst port.

It would be better for your workload to only hash dst port, to avoid
false sharing on socket structure.

I guess we could extend rxhash computation to use a pluggable BPF
filter, now we can have fast filters.



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/