From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id NAA04790; Sun, 15 Jul 2001 13:32:53 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id NAA04652 for ; Sun, 15 Jul 2001 13:32:52 +0200 (MET DST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f6FBWof02262; Sun, 15 Jul 2001 13:32:50 +0200 (MET DST) Received: (from xleroy@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id NAA04685; Sun, 15 Jul 2001 13:32:50 +0200 (MET DST) Date: Sun, 15 Jul 2001 13:32:50 +0200 From: Xavier Leroy To: Mattias Waldau Cc: Caml list Subject: Re: [Caml-list] Will Ocaml use a 4-way SMP box without splitting the program into separate processes? Message-ID: <20010715133250.B4478@pauillac.inria.fr> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: ; from mattias.waldau@abc.se on Fri, Jul 13, 2001 at 09:59:39PM +0200 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > As I understand it, Ocaml has one master lock for handling threading. Correct. > Doesn't this mean that a process can never use more than one processor? Yes, if the process is entirely composed of Caml code. Long-running C primitives release the lock, meaning that your 4-processor machine can have 1 processor running Caml code and 3 executing C primitives, e.g. database queries. > And if that is true, following Xavier Leroy idea "Using > separate processes for the HTTP server/servlet container and for the > servlets (but not starting a new servlet process on each request like > CGI does)" is the only scalable way to go. You're correct that a solution based on multiple processes communicating over byte streams (pipes, sockets, etc) is highly scalable, not only to SMP systems but also to clusters. Such an architecture can be made reasonably efficient even on a single machine, see X Windows for evidence. > Because, I don't think a solution that doesn't use a SMP-machine effectively > is a good solution. Perhaps. I don't know how important shared-memory multiprocessing is important for large Web applications. Centralized databases can certainly benefit from large SMP machines, but it was my impression that everything else is equally well done on multiple, inexpensive single-processor PCs. (Cf. Google vs. Altavista.) At any rate, I believe a single-processor PC can handle a fairly high Web traffic, if well programmed. Of course, if you're amazon.com or google.com that will not suffice, but it should be enough for joesbusiness.com :-) - Xavier Leroy ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr