db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joseph Grace <oc...@serv.net>
Subject Re: FAQ language (was: Unable to run 10.0.2 GA on Mac OS X 10.3.5/VM 1.4.2_05)
Date Sun, 10 Oct 2004 17:49:18 GMT


On Oct 10, 2004, at 8:38 AM, Daniel John Debrunner wrote:
> Suresh's test case is in this message.
>
> http://nagoya.apache.org/eyebrowse/ReadMsg?listName=derby- 
> dev@db.apache.org&msgNo=232

Got it.

> Maybe the bug description and pointer to the test case should be added
> to the comments in DERBY-1.

Nice.

> While I agree with the general concern about wording of FAQ messages,  
> in
> this specific case, given the simple test case from Suresh, isn't this  
> a
> clear case of a bug in Apple's JVM?

To distill my previous postings...

Take my view with a grain of salt since I'm 1. new to db's, and 2. new  
to "rws"/"rwd" issues.  That said, I did a bunch of internet research  
(google'ing), and posted my findings.  Noone contradicted my research  
so I still take it as informative (if not authoritative), and it goes  
something like the following.

"rws"/"rwd" make an issue of metadata.  Metadata is not fully defined  
(anywhere I found).  Metadata can include things like  
file-modified-times (incidental to the file contents/data) or  
additional inodes for storing additional data (essential to the file  
contents/data).  "rws" saves it all, performance be darned.  "rwd" is  
more selective;  it just saves the data (as usual) and only the  
metadata essential to safe recovery of the data;  this is essentially a  
trivial two-times speed up on many writes (since "rwd" skips writing to  
the directory entry for the data file --- just to update, e.g., the  
file-modified-time).

> Joesph, I couldn't see anything in your posts that would indicate
> otherwise, but I may have missed it as the discussion also included the
> performance issue which is not strictly relevant here.

I agree correctness takes priority over performance.  However, at a  
certain point and for certain applications, performance *is* a  
correctness issue, especially when talking about a factor of 2x  
difference.  The "rw" versus "rwd" can have that effect on performance.  
  If Derby wants to compete on a level playing field with other  
industrial strength databases, then this issue will (perhaps not now  
but eventually) need to be addressed.

Also, I believe the issue we're seeing is a result of Cloudscape trying  
to optimize the performance of creating log files by using "rw" by  
default, but using "rws" where supported.  However, Cloudscape had the  
luxury of declaring which platforms were supported.  Derby has no such  
luxury (as far as I know), so OS X is fair game.  On OS X, the "rws"  
optimization does not work.  So we have Suresh's workaround in  
configuration, and my workaround in code:  "rws" --> "rwd" for OS X.  I  
think Mike Matrigali might have described the situation best in his  
post from 2004-09-02  
(http://nagoya.apache.org/eyebrowse/ReadMsg?listName=derby- 
dev@db.apache.org&msgNo=200):

> It is unfortunate that the jvm documentation is so bad in this area, as
> you say the behaviour in this situation is undocumented.  From
> documentation we can't even tell what "metadata" is being discussed  
> when
> using the "rws" and "rwd" modes.

As a sidenote, this issue may be an example where what works for  
Cloudscape, does not necessarily work for Derby.  By that I mean that  
Cloudscape had the luxury of restricting which platforms it supported,  
and consequently could take shortcuts since it could exhaustively test  
for just the supported platforms.  Derby has no such luxury as  
platforms are shifting all the time, so we depend on the correctness of  
JVM's and of completeness of documentation to guarantee behavior (with  
some testing thrown in as well :-).  In any case, I think Cloudscape  
benefited from restricting platforms, whereas Derby must make do with a  
less controlled environment.  In that context of a less forgiving Derby  
platform environment, perhaps the "rws" optimization from the  
Cloudscape code is not appropriate for Derby.  Again, Mike Matrigali  
might have put it best  
(http://nagoya.apache.org/eyebrowse/ReadMsg?listName=derby- 
dev@db.apache.org&msgNo=201):

> It would be nice if a work around can be found to get this up and
> running in the OSX environment but not have to pay the extra  
> performance
> cost across all the other JVM's.

IOW, for the long-term, I wonder whether "rwd" is a more correct (level  
playing field performance desires included) than "rws", and whether  
it's an appropriate choice for all platforms (or at least a better  
choice than "rwd";  perhaps the hierarchy goes "rwd" >> "rws" >> "rw"  
in desirability)?

In the meantime, the configuration file workaround is a good  
workaround, and we can probe this issue further until we figure it out  
in the context of Derby.

Cheers,

= Joe =


Mime
View raw message