From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id 571A7BC6D for ; Tue, 12 Feb 2008 01:29:57 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAABp3sEfIuX5Bh2dsb2JhbACLXIRgAQEBCAopmgw X-IronPort-AV: E=Sophos;i="4.25,335,1199660400"; d="scan'208";a="22508591" Received: from mta18.f3.k8.com.br ([200.185.126.65]) by mail4-smtp-sop.national.inria.fr with ESMTP; 12 Feb 2008 01:29:56 +0100 Received: from localhost (localhost [127.0.0.1]) by smtpa.f3.k8.com.br (Postfix) with ESMTP id DD5F52800191 for ; Mon, 11 Feb 2008 22:29:53 -0200 (BRST) X-Virus-Scanned: amavisd-new at k8.com.br Received: from smtpa.f3.k8.com.br ([127.0.0.1]) by localhost (mta18.f3.k8.com.br [127.0.0.1]) (amavisd-new, port 10024) with LMTP id DCOkuiWXfqjp for ; Mon, 11 Feb 2008 22:29:53 -0200 (BRST) Received: from [201.8.247.135] (201008247135.user.veloxzone.com.br [201.8.247.135]) by smtpa.f3.k8.com.br (Postfix) with ESMTP id 98B3B280017F for ; Mon, 11 Feb 2008 22:29:53 -0200 (BRST) Subject: Nethttpd_plex performance question From: Andre Nathan To: caml-list@yquem.inria.fr Content-Type: text/plain Date: Mon, 11 Feb 2008 22:20:20 -0200 Message-Id: <1202775620.5316.7.camel@homesick> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 Content-Transfer-Encoding: 7bit X-Spam: no; 0.01; ocamlnet:01 model:01 workload:01 workload:01 -thread:01 compilation:01 -thread:01 plex:98 nathan:98 plex:98 1,000:98 1,000:98 req:98 req:98 threads:01 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