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 UAA16385; Thu, 1 May 2003 20:24:45 +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 UAA16570 for ; Thu, 1 May 2003 20:24:44 +0200 (MET DST) Received: from mail.eecs.harvard.edu (bowser.eecs.harvard.edu [140.247.60.24]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h41IOhH29941 for ; Thu, 1 May 2003 20:24:43 +0200 (MET DST) Received: by mail.eecs.harvard.edu (Postfix, from userid 32018) id 1264A54C4A2; Thu, 1 May 2003 14:24:41 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.eecs.harvard.edu (Postfix) with ESMTP id 0DDC254C49B for ; Thu, 1 May 2003 14:24:41 -0400 (EDT) Date: Thu, 1 May 2003 14:24:40 -0400 (EDT) From: Lex Stein To: Ocaml Mailing List Subject: Re: [Caml-list] comparison with C performance In-Reply-To: <1051811713.25152.1.camel@car.pixar.com> Message-ID: References: <1051811713.25152.1.camel@car.pixar.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam: no; 0.00; stein:01 caml-list:01 yacht:99 bike:99 bdbfs:01 milliseconds:01 db-:01 realised:01 filesystems:01 egan:01 slower:01 slowness:01 advisor:99 ocaml:01 bytecode:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Yes, there will be additional context switch costs for a user-land implementation. However, where a disk I/O costs a luxury yacht a context switch might cost a used bicycle. So I think filesystem designers are in the position of not worrying about the old bike because it's best to focus negotiating efforts on the yacht. So I guess the question on our mind was; is OCaml another luxury yacht? (With the NFS metadata operations in BDBFS there were synchronous I/O operations on the path. These will make a context switch insignificant. Consider the milliseconds required for an I/O.) To narrow the experiment to isolating the language cost, I eliminated the synchronous I/O by placing the DB->put()s outside of a transaction, with no commit. As I'm sure you realised, all of the C and OCaml Native and Bytecode experiments were run in user-land so all had additional context switches above a kernel-level implementation. However, given I/O costs in filesystems, context switch costs are insignificant. Lex On Thu, 1 May 2003, Miles Egan wrote: > On Thu, 2003-05-01 at 10:29, Lex Stein wrote: > > Hi, > > > > A while ago I built an NFS server in OCaml (BDBFS) and the performance > > stunk. It was 10x slower than the BSD in-kernel NFS server for metadata > > operations. There was some speculation about what was causing this > > slowness. It could have been a number of things. So in order for my > > Advisor to let me continue programming in OCaml, I set out to show that it > > wasn't due to the choice of OCaml. > > Wouldn't you expect any userspace nfs server to be much slower than the > kernel-based implementation due to the overhead of all the extra > context-switching? > > -- > Miles Egan > ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners