Nethttpd_plex performance question

Andre Nathan <[email protected]> Mon, 11 Feb 2008 10:22:42 -0200
Newsgroups gmane.comp.lang.ocaml.lib.net.devel
Message-ID <[email protected]>
Hello

I'm trying to write a simple webserver using Nethttpd_plex from the
ocamlnet package. I did a simple benchmark using the examples provided
in the distribution (easy_daemon.ml and netplex.ml). Both examples
create static pages, but the netplex version shows worse performance,
which I think is odd because it uses a multi-process model, while
easy_damon is a single process handling all requests.

I'm running "ab" (apache's benchmark tool), doing 1,000 connections, 100
concurrently. Here are the results:

- easy_daemon:
Requests per second:    1699.87 [#/sec] (mean)

- netplex:
Requests per second:    591.22 [#/sec] (mean)

[netplex's results actually vary a lot, sometimes reaching about 1,000
req/s but sometimes also being as low as 300 req/s. On average it seems
to be around 600 req/s]

I'm using the following configuration for netplex's workload_manager:

    workload_manager {
      type = "dynamic";
      max_jobs_per_thread = 1;
      min_free_jobs_capacity = 30;
      max_free_jobs_capacity = 50;
      max_threads = 256;
    };

Does anyone have any tips for improving netplex's performance? I believe
that with the right settings it should be able to outperform the simpler
daemon easily, since it's using multiple processes.

I hope this question is appropriate for the list.

Thanks in advance,
Andre


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/