On Sat, Jun 8, 2019 at 3:01 PM Wojciech S. Czarnecki <o...@fairbe.org> wrote: > > On Sat, 8 Jun 2019 09:56:05 -0400 > Tong Sun <suntong...@gmail.com> wrote: > > > Agree that it was not an apples to apples comparison. So please check > > out my 2nd blog: > > > > https://dev.to/suntong/simple-web-server-in-perl-and-go-revisit-5d82 > > > > Trying to make sense of your measures... > > ...Still apples to oranges due to testing on a loopback interface. Both ab > and perl are wired up to the kernel short paths > so in fact their packets were exchanged via a simple ownership change (of the > block of memory). > AFAIK bytes from packets destined to go server were copied as go does not > link to glibc for net support > (it does it only for nslookup services). > > Try to benchmark **over real wire**. > > Also use more tools: https://github.com/httperf/httperf, even old Siege. > Read > https://www.nginx.com/blog/testing-the-performance-of-nginx-and-nginx-plus-web-servers/ > how their tests were done.
Thanks. So I benchmarked over real wire, using httperf. But seems to me httperf is not reporting much, right? At least not to the level you refered as "how their tests were done". Anyway, apart from the following, what else can I get out of httperf? $ httperf --server 192.168.0.11 --port 8888 --uri / --num-conns 1500 --hog httperf --hog --client=0/1 --server=192.168.0.11 --port=8888 --uri=/ --send-buffer=4096 --recv-buffer=16384 --num-conns=1500 --num-calls=1 httperf: warning: open file limit > FD_SETSIZE; limiting max. # of open files to FD_SETSIZE Maximum connect burst length: 1 Total: connections 1500 requests 1500 replies 1500 test-duration 1.325 s Connection rate: 1132.2 conn/s (0.9 ms/conn, <=1 concurrent connections) Connection time [ms]: min 0.4 avg 0.9 max 3.5 median 0.5 stddev 0.2 Connection time [ms]: connect 0.4 Connection length [replies/conn]: 1.000 Request rate: 1132.2 req/s (0.9 ms/req) Request size [B]: 65.0 Reply rate [replies/s]: min 0.0 avg 0.0 max 0.0 stddev 0.0 (0 samples) Reply time [ms]: response 0.4 transfer 0.1 Reply size [B]: header 136.0 content 43.0 footer 0.0 (total 179.0) Reply status: 1xx=0 2xx=1500 3xx=0 4xx=0 5xx=0 CPU time [s]: user 0.32 system 1.00 (user 24.4% system 75.5% total 99.8%) Net I/O: 269.8 KB/s (2.2*10^6 bps) Errors: total 0 client-timo 0 socket-timo 0 connrefused 0 The above is Go. The following is Perl. $ httperf --server 192.168.0.10 --uri / --num-conns 1500 --hog httperf --hog --client=0/1 --server=192.168.0.10 --port=80 --uri=/ --send-buffer=4096 --recv-buffer=16384 --num-conns=1500 --num-calls=1 httperf: warning: open file limit > FD_SETSIZE; limiting max. # of open files to FD_SETSIZE Maximum connect burst length: 1 Total: connections 1500 requests 1500 replies 1500 test-duration 1.285 s Connection rate: 1167.6 conn/s (0.9 ms/conn, <=1 concurrent connections) Connection time [ms]: min 0.3 avg 0.9 max 1.8 median 0.5 stddev 0.2 Connection time [ms]: connect 0.4 Connection length [replies/conn]: 1.000 Request rate: 1167.6 req/s (0.9 ms/req) Request size [B]: 65.0 Reply rate [replies/s]: min 0.0 avg 0.0 max 0.0 stddev 0.0 (0 samples) Reply time [ms]: response 0.4 transfer 0.1 Reply size [B]: header 124.0 content 43.0 footer 0.0 (total 167.0) Reply status: 1xx=0 2xx=1500 3xx=0 4xx=0 5xx=0 CPU time [s]: user 0.34 system 0.94 (user 26.7% system 73.2% total 99.9%) Net I/O: 264.5 KB/s (2.2*10^6 bps) Errors: total 0 client-timo 0 socket-timo 0 connrefused 0 connreset 0 Errors: fd-unavail 0 addrunavail 0 ftab-full 0 other 0 I.e., I can't even figure out what the end-to-end response time is. I presume it is *not* the connection time. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAMmz1OeOzq2AxjWknLxzGLOY1rJDHcjwV1dMFokc3S5%2BtxympA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.