Mnesia Query Performance
Rob Harrop
rob@REDACTED
Thu Mar 10 16:02:43 CET 2011
Hi,
I've been doing a bit of tuning on our use of mnesia in RabbitMQ and I'm
a bit puzzled by the fact that read performance in transactions appears
to be quadratic (or worse).
I ran a test in which I do only reads (no writes, no matching) on both
set and ordered_set tables. From the results, it is clear that
transaction execution time does not increase linearly:
[{ordered_set,500,11},
{ordered_set,1000,34},
{ordered_set,2000,120},
{ordered_set,4000,418},
{ordered_set,8000,1800},
{ordered_set,16000,9981},
{set,500,11},
{set,1000,35},
{set,2000,115},
{set,4000,406},
{set,8000,1808},
{set,16000,9804}]
Here the second slot in each tuple is the number of reads and the third
slot is tx execution time in milliseconds.
I have attached the test code.
Am I doing something horribly wrong, or is this expected behaviour? If
this is expected behaviour are there are known/accepted workarounds?
Kind Regards,
Rob Harrop
RabbitMQ
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mtest.erl
Type: text/x-erlang
Size: 1059 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20110310/a3e674b7/attachment.bin>
More information about the erlang-questions
mailing list