环境:64位Ubuntu14.04,i5-3230MPHP5.4.31 with ZendOPcacheNode.JS 0.10.35Node.JS 测试var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/html;charset=UTF-8'});
res.write('DOCTYPE htmlNode测试'+new Date().getTime()+'');
res.end();
}).listen(8082, '127.0.0.1');运行程序:node t.js查看系统CPU空闲率:sar 1压力测试,并发100,完成10万请求:ab -c100 -n100000 http://127.0.0.1:8082/t.js内存从11MB涨到61MB,系统CPU空闲率65%,RPS达到6049.PHP CLI Server 测试php header('Content-Type: text/html;charset=UTF-8'); ?DOCTYPE htmlPHP测试php echo time(); ?运行程序:php -S 127.0.0.1:8081 -t ./查看系统CPU空闲
...
继续阅读
(61)