From: Andre Nathan <andre@sneakymustard.com>
To: caml-list@yquem.inria.fr
Subject: Nethttpd_plex performance question
Date: Mon, 11 Feb 2008 22:20:20 -0200 [thread overview]
Message-ID: <1202775620.5316.7.camel@homesick> (raw)
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;
};
Also, even though I'm using Netplex_mp.mp (multiple processes, instead of
multiple threads), compiling with -thread gives me a performance gain
(the numbers above are for a compilation with the -thread flag). Is that
expected?
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.
Thanks in advance,
Andre
next reply other threads:[~2008-02-12 0:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-12 0:20 Andre Nathan [this message]
2008-02-12 0:43 ` [Caml-list] " Karl Zilles
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1202775620.5316.7.camel@homesick \
--to=andre@sneakymustard.com \
--cc=caml-list@yquem.inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox