Pharo and Magma

Chris Muller asqueaker at gmail.com
Wed Oct 7 15:13:08 UTC 2009


Hi Andy, Sadly, *adding* objects to a MagmaCollection is quite slow, period.

But you should start by running the MagmaBenchmarker in Pharo, which
will report your real performance benchmarks for this and other
various operations.  See the swiki for details about how to do this.
You might be interested in comparing the benchmarks report with a 3.10
run to corroborate your claim..

Interpreting the Benchmark report
================

It is importatant to note, these benchmarks report the fastest a
single client can go (NOT the fastest a single server can handle
requests).  On my 3-year old laptop, the time in which one-thousand
simple objects can be read and materialized from the server is about
one-tenth of one second.

Given this performance measurement, if 1000 objects is enough to
populate most reasonable UI "screens", then up to 10 users of a
single-server Magma system could expect sub-second response time all
the time (one second if they all happened to request 1000 objects
simultaneously).

However, the key to maintaining that rate, particularly as the scale
increases (both in number of clients and size and depth of the
repository) is to employ the performance tools provided by Magma to
ensure that, indeed, only the 1000 *useful* objects that are needed
are actually read.  ReadStrategy's are a fine scalpel that allow the
application to maintain the performance reported by the benchmarker.

Beyond that, read scale is increased by adding more servers, courtesy
of the HA function.

Magma is written in 100% Smalltalk.  Like a tank, it is not the
fastest db, but with care it can massively scale while mostly
maintaining its plodding pace.

 - Chris

On Tue, Oct 6, 2009 at 3:02 PM, Andy Kellens <akellens at vub.ac.be> wrote:
> Hello,
>
> To start, I must say that I am new to this mailing list, that I started
> using Magma about a month ago and that I definitely am impressed by it's
> features and easy-of-use.
> For a project that we recently started (a Seaside app), we are thinking of
> using Magma as the database backend.
> While I skimmed through the archives of this list and realize that there
> already was quite some discussion about the relation of Magma and Pharo, I
> am a bit confused about the current status of running Magma on Pharo.
> For instance, the wiki (http://wiki.squeak.org/squeak/2665) mentions that
> Pharo is supported, however I keep running into a number of problems.
>
> 1. One of my first attempts in using Magma involved loading r42final and
> trying out a client/server setup.
> While I had no problems starting the server in one Pharo image, it is
> impossible to connect to the repository using the client.
> I always get an error stating the Socket supposedly timed-out and no
> connection could be made (although it took no where near the 30 second time
> out to give me the error).
> (I verified that my code was correct by also trying it out in a Squeak 3.10
> image, which worked like a charm).
>
> 2. My second attempt involved running the database in a local image.
> I must say that this solution works very well, however I have a feeling that
> the system works incredibly slow.
> To test the system, I created a database containing approximately 30 objects
> stored in 1 Dictionary and 4 MagmaCollections (for which I defined an
> Index).
> While I read somewhere that creating a database session can be quite slow
> (this is not a problem for our application), I was a bit surprised to see
> that adding single objects to the database is also very slow (I tried to
> profile my code and addition of objects took between 800 and 1200 ms).
>
> My first thought was that these problems are due to the differences between
> Pharo and Squeak, but reading the archives gave me the impression that there
> are people out there who got Magma to run successfully on Pharo and I was
> hoping that they might share their experiences or confirm that they
> encountered similar problems.
>
> For completeness: I have tried out the latest 4 releases of Pharo together
> with Magma (all the releases from September and the first one of October) on
> the Squeak 4.2.1 and 4.2.2 VM for Mac OS X.
>
>
> Many thanks.
>
> Kind regards,
>
> Andy
>
> _______________________________________________
> Magma mailing list
> Magma at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/magma
>


More information about the Magma mailing list