OODB Storage Options and Performance

Daniel Salama dsalama at user.net
Thu Apr 14 18:37:17 UTC 2005


> This is somewhat surprising to me actually, and a little disappointing 
> because
> I want the Mac to be faster..  I'm wondering if there's some software
> configuration that's responsible for this.  Have you tried Squeak 3.7?

I am running Squeak 3.7-5989

> No.  Magma only supports one server per repository.  This helps keep 
> it smaller
> and simpler to use (seriously, don't laugh).  Therefore, users can 
> employ
> peer-to-peer sharing of their personal domain models.  They can start 
> a server
> normally via MagmaServerConsole new open: 'filename' processOn: 
> somePort.  They
> can then create a local connection for concurrent, thread-safe access 
> with
> their peers:
>
>   mySession := MagmaSession repositoryController: myConsole controller
>
> This session will have the fastest access because its a local 
> connection,
> remote peer connections must go through serialization and network 
> transport.

Is this going to be faster, equal, or slower than simply using 
#openLocal?

> Be sure to turn on WriteBarrier.  And remember that bulk-loads in 
> particular
> require careful consideration to achieve optimal performance.

I re-evaluated the code I ran on April 2. Back then, the bulk load of 
8784 records took 4380 seconds. After some modifications to the script, 
using MagmaOrderedCollection, #openLocal, and turning on WriteBarrier, 
the time now was 1580 seconds. That's almost 3.5 times faster, which is 
pretty good, considering it's a bulk load process.

I then changed MagmaOrderedCollection to MagmaArray and the time 
improved slightly to 1490 seconds. I then tried to access by index 
element 6666 of the repository and it took 28 seconds. That was 
terribly slow.

Finally, I ran the exact same copy of code using MagmaArray, except 
that I changed MagmaArray to BTree. The result was a disappointing 
execution time of 3810 seconds. However, accessing the 6666th element 
now only took 10 seconds.

In my opinion, 10 seconds is still slow for directly accessing an 
object by its index (key in the BTree case). I don't know if the access 
time will be linear. What will happen when I need to access the 
1,034,768th customer? Today, it only takes me fractions of a second to 
do so in MySQL!

Am I using the wrong collections?

Comments?

Thanks,
Daniel




More information about the Squeak-dev mailing list