Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Jun 2011 01:51:57 +0900
From:      Kazuya Goda <gockzy@gmail.com>
To:        soc-status@freebsd.org
Cc:        Takuya ASADA <syuu@dokukino.com>, "Robert N. M. Watson" <rwatson@freebsd.org>
Subject:   [status report] RPS/RFS #week2
Message-ID:  <BANLkTi=onz6vs8MHvmdUGs%2BMUtJf2VkAOA@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Hi,

The goal of my project is to implement RPS/RFS on FreeBSD. RPS solves
the problem of
mono-queue NIC which can't distribute packets across multiple processors.

This week status:

* Implement
RPS act this:
1. get IP address and TCP port in Ethernet layer
2. calculate hash from IP address and TCP port
3. assign hash value to m->pkthdr.flowid
4. enable M_FLOWID flags in m->m_flags

I added this process in ether_demux(). I used rss_hash_ip_4tuple()
from //depot/users/rwatson/tcp/...
branch to calculating hash value. I think I'd like to share functions
of calculating hash value with RSS.


* Test
- Confirm to select CPU
Enable RPS, pakcets are distributed other CPU on IP layer. At this
time, same flow is distributed
same CPU. So, I printed below values to comfirm.

-- In netisr_select_cpuid() : m->pkthdr.flowid (flowid) , cpuid
(destination CPU)
-- In ip_input()                  : m->pkthdr.flowid (flowid), curcpu
(current CPU)

I confirmed that if flowid is the same, destination CPU is equal to current CPU.

- Simplified benchmark test
I used netperf to benchmark test. Server environment is:

CPU : Xeon E5310@1.6GHz x2(total 8 core)
NIC : e1000 (interface : PCI)

Below is result running 300 instances of netperf TCP_RR test with 1
byte req. and resp.
In both cases, net.isr.numthreads is 8.

-- Result --
Without RPS : 132 tps
With      RPS : 230 tps


*known problem
In the case of net.isr.numthreads < CPU_NUM, connection is not closed
at high load.


* Next week
- Search for a cause "known problem"
- Implement IPv6, UDP support


Regards,

Kazuya Goda



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BANLkTi=onz6vs8MHvmdUGs%2BMUtJf2VkAOA>