Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] OT: Java Performance
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Lex Stein <stein@e...>
Subject: Re: [Caml-list] comparison with C performance

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.


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 Archives:
Bug reports: FAQ:
Beginner's list: