Allan Wind:
> On 2005-05-29T11:51:27-0400, John Ruttenberg wrote:
> Content-Description: message body text
> > I have a benchmark program that demonstrates significant performace
> > degradation over time.  Here is what this benchmark does:
> > 
> >     1. Create a table with a primary integer key and a blob value.
> >     2. Populate the table with 1M rows.  In all cases the blobs are strings
> >        with random lengths between 1 and 1k bytes.
> 
> Does your random generator run in constant time?
> 

I timed it.  It takes just under a second for 1M calls to rand().  This didn't
change over thousands of repetitions.


> >     3. Loop foreer, making passes.  A pass does 1M operations each of which
> >        is randomly selected and can be either:
> >         a. an insert of an existing row, chosen at random, or
> 
> You mean an update?  How do you select a random row?  In particular is
> that a constant (in time) operation?
> 

No, sorry.  I meant a *delete* of an existing row.  The choice takes almost no
time.


> >         b. an assert of a new row as in 2.
> 
> Not sure what that means.  If you select a random number, then test for
> pre-existence of the row, then the chance of conflict with go up with
> time.
> 

Again, sorry.  I posted too fast.  I meant an insert of a new row.


> > Here are plots of time for each pass on a modern linux machine (fc3, >3GHz
> > processor, ide drives), and a modern XP machine (similar hardware).
> 
> You need to label the axis and include dimension.
> 
> 

The plots show iteration number on the x axis and number of secons on the y
axis.  So the first iteration takes about 50 seconds on linux and by the 300th
iteration, it's taking more than 600 seconds.

Reply via email to