caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Xavier Leroy <Xavier.Leroy@inria.fr>
To: Mattias Waldau <mattias.waldau@abc.se>
Cc: Caml list <caml-list@inria.fr>
Subject: Re: [Caml-list] Will Ocaml use a  4-way SMP box without splitting the program into separate processes?
Date: Sun, 15 Jul 2001 13:32:50 +0200	[thread overview]
Message-ID: <20010715133250.B4478@pauillac.inria.fr> (raw)
In-Reply-To: <AAEBJHFJOIPMMIILCEPBCEOKCNAA.mattias.waldau@abc.se>; from mattias.waldau@abc.se on Fri, Jul 13, 2001 at 09:59:39PM +0200

> 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


  reply	other threads:[~2001-07-15 11:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-13 19:59 Mattias Waldau
2001-07-15 11:32 ` Xavier Leroy [this message]
2001-07-15 12:15   ` William Chesters
2001-07-17  1:59   ` Alexander V. Voinov
2001-07-20 14:01     ` Xavier Leroy

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=20010715133250.B4478@pauillac.inria.fr \
    --to=xavier.leroy@inria.fr \
    --cc=caml-list@inria.fr \
    --cc=mattias.waldau@abc.se \
    /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;
as well as URLs for NNTP newsgroup(s).