English 中文(简体)
基准确定节点js
原标题:Benchmarking Node.js

I m benchmarking Node.js with ApacheBench under Mac OS X and I m comparing it with Apache 2. I basically have three questions:

  1. My basic test of a Hello World web page resulted in the following: https://i.sstatic.net/sQNDL.png Node.js serves "Hello World" as plain text through a web server and Apache 2 serves a plain text file which also only contains "Hello World". I did the same test with 8000 requests and it shows the same increase of response time during the last 1000 requests. What is the reason for the increase in the end?

  2. 是否有相当于Mac OS X上 Linux dstat 的等效数据来记录测试期间的内存和 CPU 使用情况?

  3. 是否必须进行一系列基本测试,才能对网络服务器的性能、输送量等进行评估?

问题回答

你说阿帕奇是什么意思? 阿帕奇? 阿帕奇? Tomcat? Apac? Apac 2? Apac Hadoop (不是说一个明显 吗? 阿帕奇 Hadoop )? 您应该具体说明什么是你基准的代码,什么是平台。根据您所写的内容,在哈罗世界基本测试中,NodeJS 可能会造成很多问题,因为执行PHP脚本需要磁盘访问,而大多数NodeJS Hello World测试都是模拟的,因为您只写了 reponsion.send ("哈罗世界"); 这与PHP基准不同。

增加的原因是您的计算机的极限。 您的计算机无法维持数百个开放式连接 。 节点JS 一个接一个接一个接一个, 而阿帕奇人正在发射新的线条, 这会在最后导致所有的线条都耗尽, 因为将会有许多上下文移动, 因此最后会发生缓慢 。

  1. 当您的测试询问服务器的速度超过它能够回应的速度时, 就会出现一个点, 这导致未解决的请求会以越来越快的速度累积。 他们的管理费会不成比例地影响响应时间 。 换句话说, 您对服务器进行了 DDoS 攻击, 并发现了它的能力 。

  2. 有 unix 最高命令, 但它有点粗糙, 也有 ps

  3. 快速谷歌表示,基准网络服务器,如SpecWeb、WebStone和SURGE, 确实存在标准。





相关问题
Using SimplePie with CodeIgniter and XAMPP

I am using CodeIgniter 1.7.2 with XAMPP 1.7.2 on a Windows computer. I am trying to make use of SimplePie. I followed all the instructions I could find: a copy of simplepie.inc is in my applications/...

Multiple Sites with common files

I have developed over 50 sites that all use the exact same files other than CSS and IMAGES, I currently duplicate the files each time I create a new site and upload different css and images. What ...

http server validation

I finish a litle http server, writing from scratch. I would like to be sure that my imlementation is conforme to the HTTP specifications. W3C give us tools for HTML/XML conformance, but i see nothing ...

热门标签