Erlang Mailing Lists

Author Message

<  Erlang questions mailing list  ~  How fast is Mnesia ?

gandalf at rohan.control.
Posted: Fri Apr 16, 1999 8:11 pm Reply with quote
Guest
Hello folks.

Newbie question #2. Did somebody measure Mnesia efficiency ? What will happens
if I will need to store 10.000.000 records like this:
NNN.NNN.NNN.NNN NNNNNNNNNN N N N N, where N is some number.
and about 2.000.000 like this
XXXXXXXXXX X X X

And I don't know how much like this:
XXX.XXX.XXX.XXX AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
where A are some ASCII .

Are the Mnesia supports "soft realtime" for the data retrival ? How the tables
on disk organized ? May be you will suggest to use external database ?

Thanks.
Vladimir


--
=======================================================
Vladimir I. Ulogov (gandalf_at_control.att.com)
tel: 973-236-6464 or 6463
fax: 973-236-2090
"Where lands meets water. Where earth meets air. Where body meets
mind. Where space meets time. We like to be on one side, and look
at the other." D.Adams "Mostly harmless"




Post generated using Mail2Forum (http://m2f.sourceforge.net)
hakan at erix.ericsson.se
Posted: Mon Apr 19, 1999 8:33 am Reply with quote
Guest
On Fri, 16 Apr 1999, Vladimir Ulogov wrote:

Vladimir> Newbie question #2. Did somebody measure Mnesia efficiency ? What will happens
Vladimir> if I will need to store 10.000.000 records like this:
Vladimir> NNN.NNN.NNN.NNN NNNNNNNNNN N N N N, where N is some number.
Vladimir> and about 2.000.000 like this
Vladimir> XXXXXXXXXX X X X
Vladimir>
Vladimir> And I don't know how much like this:
Vladimir> XXX.XXX.XXX.XXX AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Vladimir> where A are some ASCII .
Vladimir>
Vladimir> Are the Mnesia supports "soft realtime" for the data retrival ? How the tables
Vladimir> on disk organized ? May be you will suggest to use external database ?

Both disk and ram resident tables in Mnesia are hash tables, utilizing
the linear hashing algorithm. The lookup time should be almost
constant and not dependent of the number of records in the table.

Matching operations in Mnesia normally requires a linear search of the
entire table and for large tables it may lead to unacceptable response
times, if there are no secondandary indecies associated with the table.

If the performance of Mnesia is enough for your application is hard to
say. The best thing is if you can come up with some benchmark that
tries to simulate important database aspects of your application. Try
to figure out things like data volumes, record sizes, storage types,
access patterns, need for replication etc. etc. and try to implement a
prototype which you can measure.

Since your tables seems to be rather large it is probably worth to
take a look at Mnesia's new support for fragmented tables. The concept
of table fragmentation has been introduced in Mnesia 3.7 in order to
cope with very large tables. The idea is to split a table into several
more manageable fragments. Each fragment is implemented as a first
class Mnesia table and may be replicated, have indecies etc. as any
other table.

The dets module which implements the disk resident tables in Mnesia is
currently a bottleneck. But this will improve in some future release,
when the Erlang machine supports segmented binaries and the new
bitsyntax.

Best Regards

H

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum