Re: [Nethttpd-plex] Poor performance on FreeBSD 8.2

Stéphane Legrand <[email protected]> Mon, 04 Jul 2011 22:56:59 +0200
Newsgroups gmane.comp.lang.ocaml.lib.net.devel
Message-ID <[email protected]>
Hello,

I did the following tests on my configuration : 

  FreeBSD 8.2-STABLE
  Intel Celeron D CPU 3.33GHz (32 bits)
  1 GB


- Native netplex with output in gnome terminal, 127.0.0.1 :

siege -c 1 -t 60S -b 'http://127.0.0.1:4444/'

Transactions:		       14752 hits
Availability:		      100.00 %
Elapsed time:		       59.13 secs
Data transferred:	       31.40 MB
Response time:		        0.00 secs
Transaction rate:	      249.47 trans/sec
Throughput:		        0.53 MB/sec
Concurrency:		        0.78
Successful transactions:       14752
Failed transactions:	           0
Longest transaction:	        0.15
Shortest transaction:	        0.00


- Native netplex with output in gnome terminal, localhost :

siege -c 1 -t 60S -b 'http://localhost:4444/' 

Transactions:		       10554 hits
Availability:		      100.00 %
Elapsed time:		       59.67 secs
Data transferred:	       22.47 MB
Response time:		        0.00 secs
Transaction rate:	      176.87 trans/sec
Throughput:		        0.38 MB/sec
Concurrency:		        0.85
Successful transactions:       10554
Failed transactions:	           0
Longest transaction:	        0.09
Shortest transaction:	        0.00


- Bytecode netplex with output in gnome terminal, 127.0.0.1 :

siege -c 1 -t 60S -b 'http://127.0.0.1:4444/' 

Transactions:		        6343 hits
Availability:		      100.00 %
Elapsed time:		       59.72 secs
Data transferred:	       13.50 MB
Response time:		        0.01 secs
Transaction rate:	      106.21 trans/sec
Throughput:		        0.23 MB/sec
Concurrency:		        0.99
Successful transactions:        6343
Failed transactions:	           0
Longest transaction:	        0.15
Shortest transaction:	        0.00


- Bytecode netplex with output in gnome terminal, localhost :

siege -c 1 -t 60S -b 'http://localhost:4444/' 

Transactions:		        6204 hits
Availability:		      100.00 %
Elapsed time:		       59.56 secs
Data transferred:	       13.21 MB
Response time:		        0.01 secs
Transaction rate:	      104.16 trans/sec
Throughput:		        0.22 MB/sec
Concurrency:		        0.99
Successful transactions:        6204
Failed transactions:	           0
Longest transaction:	        0.14
Shortest transaction:	        0.00


As you can see, the minimum is 104 req/sec. Can you please specify your
test where you get 10 req/sec ? If i can, i will try to run it on my
computer.

And here is my output of configure. POSIX semaphores are found, i do
have the sem kernel module loaded before to run configure. I don't know
if it could explain the slowness you see ?
 

Welcome to Ocamlnet version 3.3.3
Checking operating system... FreeBSD

*** Note that you might need to load the 'sem' kernel
*** module to make semaphores work: kldload sem

Checking for findlib... found
Checking multi-threading support... posix (ok)
Checking word size... 32 bit
Checking endianess... little
Checking for GPROF... found
Checking for PCRE... found
Checking whether Ocaml has Printexc.register_printer... found
Checking whether Ocaml has fancy page tables... found
Checking for POSIX shared memory... found
Checking for POSIX semaphores... found
Checking for POSIX fadvise... not found
Checking for POSIX fallocate... not found
Checking for POSIX memalign... found
Checking for POSIX pthread... found
Checking for syslog... found
Checking for POSIX functions like openat... found
Checking for fchdir... found
Checking for fdopendir... found
Checking for GPROF... found
Checking for win32... no
Checking for cryptokit... found



Regards,
Stéphane.

Le lundi 04 juillet 2011 à 12:16 -0300, Matías Giovannini a écrit :
> Hello,
> 
> 
> I'm stymied about a huge discrepancy in performance for Nethttpd-plex
> on FreeBSD 8.2, compared to Mac OS X 10.6.8.
> 
> 
> Testing with a OCaml-cURL client making purely sequential GET requests
> on the loopback interface in a loop against
> examples/nethttpd/netplex.ml I get > 900 req/sec on Mac OS X 10.6.8
> (MacBook, Intel Core 2 Duo 2.0 GHz, 2 GB RAM) compared to aprox. 10
> req/sec on FreeBSD 8.2 (Quad-core amd64, 8 GB RAM).
> 
> 
> Looking at the configuration results, I tried manually disabled POSIX
> semaphores and *at functions on FreeBSD to see if that had any impact,
> to no avail.
> 
> 
> Testing against a very simple HTTP/1.0 "server" that just accepts and
> prints a zero-length 200 OK response I get double throughput on
> FreeBSD compared to Mac OS X (6800 req/s vs. 3300 req/s), so I can
> rule out networking stack differences.
> 
> 
> I'd really appreciate any guidance on this issue.
> 
> 
> The output of configure on FreeBSD is as follows:
> 
> 
> Welcome to Ocamlnet version 3.3.3
> Checking operating system... FreeBSD
> 
> 
> *** Note that you might need to load the 'sem' kernel
> *** module to make semaphores work: kldload sem
> 
> 
> Checking for findlib... found
> Checking multi-threading support... posix (ok)
> Checking word size... 64 bit
> Checking endianess... little
> Checking for GPROF... found
> Checking for PCRE... found
> Checking whether Ocaml has Printexc.register_printer... found
> Checking whether Ocaml has fancy page tables... found
> Checking for POSIX shared memory... found
> Checking for POSIX semaphores... not found
> Checking for POSIX fadvise... not found
> Checking for POSIX fallocate... not found
> Checking for POSIX memalign... found
> Checking for POSIX pthread... found
> Checking for syslog... found
> Checking for POSIX functions like openat... not found (or incomplete)
> Checking for fchdir... found
> Checking for fdopendir... found
> Checking for GPROF... found
> Checking for win32... no
> Checking for camlzip... found
> 
> 
> Effective options:
>     -enable-pcre
>     -disable-gtk
>     -disable-gtk2
>     -disable-tcl
>     -disable-ssl
>     -enable-zip
>     -disable-crypto
>     -disable-apache
>     -with-nethttpd
>     -without-rpc-auth-dh
>     -bindir /usr/local/bin
>     -datadir /usr/local/lib/ocaml/site-lib/netstring
> 
> 
> Writing Makefile.conf





------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Ocamlnet-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ocamlnet-devel