Video and slides synchronized, mp3 and slide download available at URL http://bit.ly/1VfmmLC.
David Riddoch talks about the technologies that make very high performance networking possible on commodity servers and networks, with a special focus on kernel bypass technologies including sockets acceleration and NFV. These techniques give user-space applications direct access the network adapter hardware, making possible sub-microsecond latencies and millions of messages per second per thread. Filmed at qconlondon.com.
David Riddoch leads the development of the Solarflare Open IP stack.
2. InfoQ.com: News & Community Site
• 750,000 unique visitors/month
• Published in 4 languages (English, Chinese, Japanese and Brazilian
Portuguese)
• Post content from our QCon conferences
• News 15-20 / week
• Articles 3-4 / week
• Presentations (videos) 12-15 / week
• Interviews 2-3 / week
• Books 1 / month
Watch the video with slide
synchronization on InfoQ.com!
https://www.infoq.com/presentations/
sockets-nfv
3. Purpose of QCon
- to empower software development by facilitating the spread of
knowledge and innovation
Strategy
- practitioner-driven conference designed for YOU: influencers of
change and innovation in your teams
- speakers and topics driving the evolution and innovation
- connecting and catalyzing the influencers and innovators
Highlights
- attended by more than 12,000 delegates since 2007
- held in 9 cities worldwide
Presented at QCon London
www.qconlondon.com
17. Solarflare’s OpenOnload
• Sockets acceleration using kernel bypass
• Standard Ethernet, IP, TCP and UDP
• Standard BSD sockets API
• Binary compatible with existing applications
35. channel_id, n = lookup(4tuple);
if( n > 1 )
channel_id += hash(4tuple) % n_cores;
36. SO_REUSEPORT to the rescue
• Multiple listening sockets on the same TCP port
• One listening socket per worker thread
• Each gets a subset of incoming connection requests
• New connections go to the worker running on the core that
the flow hashes to
• Connection establishment scales with the number of
workers
• Received packets are delivered to the ‘right’ core
48. Tip 1. The faster your application
is already, the more speedup
you’ll get from kernel bypass
(This is just Ahmdal’s law)
49. Tip 2. NUMA locality applies
doubly to I/O devices
50.
51.
52.
53.
54.
55. • DMA transfers will use the L3 cache if:
• The targeted cache line is resident
• Or if not then up to 10% of L3 is available for write-allocate
• Therefore
• If you want consistent high performance, DMA buffers must
be resident in L3 cache
• To achieve that
• Small set of DMA buffers recycled quickly
• (Even if that means doing an extra copy)
57. Queues exist mostly to
handle mismatch between
arrival rate and service rate
58. • Buffers in switches and routers
• Descriptor rings in network adapters
• Socket send and receive buffers
• Shared memory queues, locks etc.
• Run queue in the kernel task scheduler
64. For stable performance when overloaded
Limit working set size
• Limit the sizes of pools, queues, socket buffers etc.
Shed excess load early (Tip 3.1)
• Before you’ve wasted time on requests you’re going to have
to drop anyway
65. Interrupt moves packets from
descriptor ring to sockets
App thread consumes
from socket buffer
66. Drop newest data
(only at very high rates)
Drop newest data
Do work for every packet,
whether dropped or not
74. send()
• Passing a small message to another thread:
• A few cache misses
• send() on a socket last accessed on another core:
• Dozens of cache misses