V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
loqixh
V2EX  ›  Node.js

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

  •  
  •   loqixh · 2015-08-16 09:56:16 +08:00 · 4186 次点击
    这是一个创建于 3168 天前的主题,其中的信息可能已经有所发展或是发生改变。

    具体可看 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-08-16 10:56:02 +08:00 via iPhone
    业务逻辑没法进行对比啊,能说明什么问题呢?
    yakczh
        2
    yakczh  
       2015-08-16 11:00:08 +08:00
    为什么iis/asp.net只容许 512个链接 要么都是512,要么都是1024, 这样比较才公平 吧
    loqixh
        3
    loqixh  
    OP
       2015-08-16 11:00:35 +08:00
    @zonghua cpu花在虚拟机上,传说中的node.js性能高太虚
    loqixh
        4
    loqixh  
    OP
       2015-08-16 11:02:58 +08:00
    @yakczh iis是打酱油的,看libuv C#比较有效果,和node.js一样的网络引擎
    loqixh
        5
    loqixh  
    OP
       2015-08-16 11:04:05 +08:00
    @yakczh cpu100%了
    yakczh
        6
    yakczh  
       2015-08-16 11:18:39 +08:00
    @loqixh 那应该出两分,一份512 一份1024 比较要在相同基准下才有意义
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3937 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 05:07 · PVG 13:07 · LAX 22:07 · JFK 01:07
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.