[Nethttpd-plex] Poor performance on FreeBSD 8.2

Matías Giovannini <[email protected]> Mon, 4 Jul 2011 12:16:09 -0300
Newsgroups gmane.comp.lang.ocaml.lib.net.devel
Message-ID <CALzEXo-9-6ZH3T3fUzhKqCEFrF1AoPQJM7cPw9dNNs6jd04w0w@mail.gmail.com>
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