Hi,
As the subject says, this is a micro benchmark I run ("hello world type").
Load Runner and Server-Target Specs:
- Intel(R) Xeon(R) CPU E7- 8837 @ 2.67GHz
- 16 cores | 256GB RAM
- 1Gbit interface (both connected to the same switch backend)
Load Runner bench tool 'wrk' (
https://github.com/wg/wrk)
./wrk -t16 -c400 -d30s
http://server-targetCASE1: NGINX-1.4.2
- workers = 16
- access_log off
- Handler '/' => html/index.html
/ngx/sbin/nginx -V
nginx version: nginx/1.4.2
built by gcc 4.4.6 20120305 (Red Hat 4.4.6-4) (GCC)
configure arguments: --prefix=/root/ngx/
Results:Running 30s test
16 threads and 400 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 3.38ms 4.45ms 18.57ms 88.26%
Req/Sec 7.98k 1.51k 14.00k 68.89%
3622643 requests in 29.99s, 2.86GB read
Requests/sec: 120788.29
Transfer/sec: 97.79MB
RES MEM ~ 22MB
CASE2: NGINX-1.4.2
- disabled charset, ssi, userid, autoindex, rewrite, limit_req, limit_conn
- workers = 16
- access_log off
- Handler '/' => html/index.html
/ngx/sbin/nginx -V
nginx version: nginx/1.4.2
built by gcc 4.4.6 20120305 (Red Hat 4.4.6-4) (GCC)
configure arguments: --prefix=/root/ngx --without-http_charset_module --without-http_ssi_module --without-http_userid_module --without-http_autoindex_module --without-http_rewrite_module --without-http_limit_req_module --without-http_limit_conn_mod
Results:Running 30s test
16 threads and 400 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 3.38ms 3.92ms 18.32ms 85.78%
Req/Sec 7.96k 1.38k 15.00k 68.95%
3622161 requests in 29.99s, 2.86GB read
Requests/sec: 120784.78
Transfer/sec: 97.79MB
RES MEM ~ 23KB
CASE3: NXWEB-3.2.0-dev
Results:Running 30s test
16 threads and 400 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 2.37ms 174.19us 13.86ms 97.89%
Req/Sec 11.09k 580.27 13.00k 58.13%
5039484 requests in 29.99s, 3.07GB read
Requests/sec: 168026.84
Transfer/sec: 104.80MB
RES MEM ~ 375MB
CASE4: Golang (
http://golang.org/)
Code:package main
import (
"flag"
"net/http"
"runtime"
)
var port = flag.String("port", "80", "Define what TCP port to bind to")
var root = flag.String("root", "/tmp/html", "Define the root filesystem path")
func main() {
runtime.GOMAXPROCS(runtime.NumCPU())
flag.Parse()
panic(http.ListenAndServe(":"+*port, http.FileServer(http.Dir(*root))))
}Results:Running 30s test
16 threads and 400 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 3.33ms 817.59us 12.25ms 77.34%
Req/Sec 7.92k 677.44 10.11k 63.18%
3598502 requests in 29.99s, 2.67GB read
Requests/sec: 119981.11
Transfer/sec: 91.20MB
RES MEM ~ 37KB
---
NXWEB is a clear winner over NGINX in this 'micro-benchmark', even though the golang webserver gives it a run for its money. I have the following question to NXWEB DEV, why 375MB of resident memory? The config is attached, have I miss-configured anything?
Furthermore, what is the baseline difference between NGINX event loop to NXWEB?
Thanks,
Alex