db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Raymond Raymond" <raymond_de...@hotmail.com>
Subject Re: Re: Anyone knows how long (in byte) is a log record in derby?
Date Tue, 28 Feb 2006 00:22:39 GMT
I am trying to do some statistics to estimate recovery speed.
I can get how many log records the recovery process scaned
during the recovery and how long the recovery takes.The recovery
speed I got so far is something like

X log records/second

But, to use the recovery speed to schedule the checkpoint,
I need it likes

X KB/second

I looked into the org.apache.derby.impl.store.raw.log.LogToFile.java .
The checkpoint is trigger in the flush(long fileNumber, long wherePosition)
function. The condition to trigger a checkpoint is :

if ((logWrittenFromLastCheckPoint + potentialLastFlush) > checkpointInterval 
   checkpointDaemon != null &&	!checkpointDaemonCalled && !inLogSwitch)

logWrittenFromLastCheckPoint, potentialLastFlush and  checkpointInterval
are in size (X bytes), so, I need the revovery speed in size (e.g. X 
In another word, I want to know how much (KB) log the recovery process
scaned during recovery. I refered to
it says the log record wrapper keeps the length of the log record.
I checked the source code and found the length of the log record
is only used in the getNextRecordBackward() and getNextRecordForward()
functions in org.apache.derby.impl.store.raw.log.Scan.java. I can't
get it outside those functions. Anyone can give me some suggestions to
solve the problem?



>From: Mike Matrigali <mikem_app@sbcglobal.net>
>I don't know off hand, but you should note that log record
>size is most dependent on the size of the data that is affected.
>For instance an insert log record will have the part of the row
>on that page in that log record.
>Raymond Raymond wrote:
>>Hi, anyone knows how long is a log records in derby?
>>I need to caculate something like how many log records
>>are in 1M log. I refered to
>>but it does not tell me the answer. Anyone happens
>>to know that?
>>Powerful Parental Controls Let your child discover the best the Internet 
>>has to offer.  

>>  Start enjoying all the benefits of MSN?Premium right now and get the 
>>first two months FREE*.

MSNŽ Calendar keeps you organized and takes the effort out of scheduling 

  Start enjoying all the benefits of MSNŽ Premium right now and get the 
first two months FREE*.

View raw message