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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

500,000 Requests/Sec – Modern HTTP Servers Are Fast

81 点作者 arete大约 13 年前

10 条评论

rdoherty大约 13 年前
Sigh, another completely synthetic benchmark with big iron: A dual Intel Xeon X5670 with 24GB of RAM from SoftLayer. The X5670 has 6 cores @ 2.93 GHz, 2 threads per core, /proc/cpuinfo shows 24 CPUs.<p>Serving a plain HTML page over <i>localhost</i> via nginx. A medium length blog post with pretty much no real-world information.
评论 #3732389 未加载
评论 #3732163 未加载
评论 #3733193 未加载
评论 #3732151 未加载
评论 #3732898 未加载
评论 #3732134 未加载
acidx大约 13 年前
My toy web server can achieve similar performance using a much more modest hardware (Core i7 2640 laptop), using way less RAM (a few dozen kilobytes).<p>Granted this is also being tested on localhost with static content (no disk I/O) -- but shows that event-driven servers are not that novel or difficult to write: my code weighs around 1700 LOC of (might I say) readable C.<p>Static file serving is also fast (using sendfile(), etc), but needs an overhaul to achieve usable concurrency. Currently there's a ~4x performance drop while serving files, but I'm working on this.<p>(The sources are at <a href="http://github.com/lpereira/lwan" rel="nofollow">http://github.com/lpereira/lwan</a> by the way.)
halayli大约 13 年前
nginx saturates at ~18k req/sec / core with a latency of ~24ms. This saturation is not coming from nginx in particular but from OS limits (mode switching, stack copying etc.. for read/write system calls).<p>There is nothing new in "modern HTTP servers". They are event-driven programs and this has existed for a long time.
评论 #3732476 未加载
NeutronBoy大约 13 年前
In a real world app, I think you'd be considered lucky if the web-server is your bottleneck, rather than your DB or network connection.
评论 #3732632 未加载
alexlitov大约 13 年前
Quickly looking over SoftLayer's price sheet, it looks to be a little over $1k a month for Intel 5670 with 24GB of RAM
评论 #3732783 未加载
评论 #3732283 未加载
stuhood大约 13 年前
Since this is almost pure sendfile() work (aside from the headers), it really doesn't seem like a very useful example... there isn't much static content left on the web.
评论 #3733829 未加载
krakensden大约 13 年前
The flipside is that as time goes on, this benchmark becomes less impressive. The server in question had 24GB of RAM and two CPUs with 12 cores each.
jamesu大约 13 年前
A comparison with older hardware would have been nice. Also using localhost is not a very good indicator of real-world performance.
ghempton大约 13 年前
The ironic part is that his blog is hosted on wordpress.
mthreat大约 13 年前
I'm interested in more info on your linux TCP tuning, especially how you decided to tcp_tw_recycle and tcp_fin_timeout (and how you decided setting the former to 1 is safe)