.net node.js Scala 网络性能测试 - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
loqixh

.net node.js Scala 网络性能测试

  •  
  •   loqixh 2015 年 8 月 16 日 4792 次点击
    这是一个创建于 3906 天前的主题,其中的信息可能已经有所发展或是发生改变。

    具体可看 https://github.com/aspnet/benchmarks

    Benchmarks

    A playground for experimenting with different server models.

    Environment

    We're using the following physical machines to perform these tests:

    Name OS Role CPU RAM NIC Notes
    perfsvr Windows Server 2012 R2 Web Server Xeon E5-1650 32 GB Intel Ethernet Converged Network Adapter X540-T1 10GbE
    perfsvr2 Ubuntu 14.04 LTS Web Server & Load Generator Xeon E5-1620 32 GB Intel Ethernet Converged Network Adapter X540-T1 10GbE
    perf02 Windows Server 2012 R2 Load Generator Xeon W3550 24 GB Broadcom NetXtreme Gigabit Ethernet (BCM5764)
    perf03 Ubuntu 14.04 LTS Load Generator Xeon W3550 12 GB Intel Ethernet Converged Network Adapter X540-T1 10GbE

    The machines are connected to an 8-port Netgear XS708E 10-Gigabit switch.

    Load Generation

    We're using wrk to generate load from one of our Linux boxes (usually perfsvr2). We also have WCAT) set up on perf02 but it as it doesn't support HTTP pipelining we've stopped using it for now.

    Results

    For each stack, variations of the load parameters and multiple runs are tested and the highest result is recorded.

    Plain Text

    Similar to the plain text benchmark in the TechEmpower tests. Intended to highlight the HTTP efficiency of the server & stack. Implementations are free to cache aggressively and remove/disable components that aren't required in order to maximize performance.

    Stack Server Req/sec Load Params Impl Observations
    ASP.NET 4.6 perfsvr 65,383 8 threads, 512 connections Generic reusable handler, unused IIS modules removed CPU is 100%, almost exclusively in user mode
    IIS Static File (kernel cached) perfsvr 276,727 8 threads, 512 connections hello.html containing "HelloWorld" CPU is 36%, almost exclusively in kernel mode
    IIS Static File (non-kernel cached) perfsvr 231,609 8 threads, 512 connections hello.html containing "HelloWorld" CPU is 100%, almost exclusively in user mode
    ASP.NET 5 on WebListener (kernel cached) perfsvr 264,117 8 threads, 512 connections Just app.Run() CPU is 36%, almost exclusively in kernel mode
    ASP.NET 5 on WebListener (non-kernel cached) perfsvr 107,315 8 threads, 512 connections Just app.Run() CPU is 100%, mostly in user mode
    ASP.NET 5 on IIS (Helios) (non-kernel cached) perfsvr 109,560 8 threads, 512 connections Just app.Run() CPU is 100%, mostly in user mode
    NodeJS perfsvr 96,558 8 threads, 1024 connections The actual TechEmpower NodeJS app CPU is 100%, almost exclusively in user mode
    Scala perfsvr 204,009 8 threads, 1024 connections The actual TechEmpower Scala plain text app CPU is 68%, mostly in kernel mode
    libuv C# perfsvr 300,507 12 threads, 1024 connections Simple TCP server, not real HTTP yet, load spread across 12 ports (port/thread/CPU) CPU is 54%, mostly in kernel mode

    Plain Text with HTTP Pipelining

    Like the Plain Text scenario above but with HTTP pipelining enabled. Only stacks/servers that support pipelining are included.

    Stack Server Req/sec Load Params Impl Observations
    NodeJS perfsvr 148,934 8 threads, 1024 connections The actual TechEmpower NodeJS app CPU is 100%, almost exclusively in user mode
    Scala perfsvr 764,775 8 threads, 1024 connections, pipelining 15 deep The actual TechEmpower Scala plain text app CPU is 46%, mostly in kernel mode, 1Gbps NIC saturated (need to re-run on 10GbE)
    libuv C# perfsvr 2,379,267 36 threads, 288 connections, pipelining 15 deep Simple TCP server, not real HTTP yet, load spread across 12 ports (port/thread/CPU) CPU is 100%, mostly in user mode, gets slower as test runs longer, issue somewhere

    Plain Text with HTTP 2

    Coming soon...

    JSON

    Coming soon...


    This project is part of ASP.NET 5. You can find samples, documentation and getting started instructions for ASP.NET 5 at the Home repo.

    6 条回复    2015-08-16 11:18:39 +08:00
    zonghua
        1
    zonghua  
       2015 年 8 月 16 日 via iPhone
    业务逻辑没法进行对比啊,能说明什么问题呢?
    yakczh
        2
    yakczh  
       2015 年 8 月 16 日
    为什么iis/asp.net只容许 512个链接 要么都是512,要么都是1024, 这样比较才公平 吧
    loqixh
        3
    loqixh  
    OP
       2015 年 8 月 16 日
    @zonghua cpu花在虚拟机上,传说中的node.js性能高太虚
    loqixh
        4
    loqixh  
    OP
       2015 年 8 月 16 日
    @yakczh iis是打酱油的,看libuv C#比较有效果,和node.js一样的网络引擎
    loqixh
        5
    loqixh  
    OP
       2015 年 8 月 16 日
    @yakczh cpu100%了
    yakczh
        6
    yakczh  
       2015 年 8 月 16 日
    @loqixh 那应该出两分,一份512 一份1024 比较要在相同基准下才有意义
    关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     2965 人在线   最高记录 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 165ms UTC 03:04 PVG 11:04 LAX 20:04 JFK 23:04
    Do have faith in what you're doing.
    ubao msn snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86