TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

How to receive a million packets per second (2015)

96 点作者 warpech将近 5 年前

5 条评论

ncmncm将近 5 年前
A thousand nanoseconds per packet? Luxury!<p>At 10Gbps, and hundred-odd byte packets as are common on finance multicast feeds, I get 73ns per packet. The amount that can be done in that time is limited. Typically, you just dump them in a big-ass ring buffer and let processes on a bunch of other cores pick out interesting ones to spend more time on.<p>The way to get the packets is usually with some proprietary kernel-bypass library (some have success with DPDK), and a very carefully isolated core that the kernel is kept from interrupting, and just spins moving packets. NIC hardware-level ring buffers are usually pretty small, so pauses make for drops.<p>Many NICs can be persuaded to filter packets out to multiple ring buffers, and then you can get multiple cores picking them off; that is necessary when you get to 40 and 100 Gbps. Multiple rings even with one core multiplies headroom, making occasional housekeeping without drops possible.
评论 #23438045 未加载
评论 #23437580 未加载
评论 #23438306 未加载
tayo42将近 5 年前
&gt; Don&#x27;t expect performance like that for any practical application without a lot more work.<p>5 years later I have servers that can do 2 million (multi process) without messing with Numa or nic settings.
评论 #23437282 未加载
评论 #23437000 未加载
mehrdadn将近 5 年前
Curious, does anyone know how things look on Windows?
评论 #23437641 未加载
7532yahoogmail将近 5 年前
OP has Solarflare NICs. So surely &gt; 1MM pps is possible on that HW? But as you opened with 1 million per second on the Linux stack, I gather that kernel by-pass and such were by definition out of scope. The goal here was to always pass through the kernel. But if so, why use Solarflare? Why not see if one can do + 1MM pps on a nice, even beefy but not Solarflare&#x2F;Mellonx NICs whose motivation includes kernel by-pass.
frumiousirc将近 5 年前
1 Gbps, unoptimized, commodity home network between an ancient thinkpad t520 and gen 4 i7 workstation using ZeroMQ throughput perf test gives more than 1M messages per second:<p><pre><code> $ .&#x2F;local_thr tcp:&#x2F;&#x2F;192.168.1.123:5678 100 1000000 message size: 100 [B] message count: 1000000 mean throughput: 1143708 [msg&#x2F;s] mean throughput: 914.966 [Mb&#x2F;s]</code></pre>
评论 #23439310 未加载
评论 #23439287 未加载