[erlang-questions] Mnesia

Valentin Micic <>
Thu Oct 15 08:45:03 CEST 2015


Well, one can always use table fragmentation -- individual dets files are still going to be limited to 32-bits but table can go beyond that.
We have used this approach in the past (fragmented a very big table across 512 dets files), and it worked reasonably well…
There were a few performance problems mnesia had on a specific OS platforms (SOLARIS in particular) with a very poor file I/O caching.
But the one thing that was missing from mnesia, that actually made us abandon it for projects that required huge data volumes was a lack of flexibility regarding storage mechanism used.

And before you start thinking that I used more pot than usual, let me clarify:

Yes, once may chose between RAM, DISK or combination of the two. However, if you want to control the amount of RAM used by mensia, you are left with only once choice: disc only copy, which puts some performance constraints. 
Thankfully, Erlang lends itself very nicely to "roll-your-own" approach and we managed to do just that with a relative ease.

 Thus, if I were to suggest an improvement for mnesia, I'd say that having a disc_only_copy with a flexible caching may do the trick (well, this what we had to do to make our lives good again -- we did not use mnesia but a combination of ets and dets files with custom dets fragmentation).

Kind reagards

V/


On 15 Oct 2015, at 8:00 AM, Dan Gudmundsson wrote:

> You are right in that you are wrong, and so is the documentation then, 
> disc_copies tables is no longer using dets files as their backend storage.
> That restriction have been removed (a long time ago).
> 
> Tough, disc_only_copies are still using dets files and have the 32bits limit.
> 
> A pointer (or a patch) to the documentation would be nice.
> 
> 
> On Thu, Oct 15, 2015 at 7:25 AM <> wrote:
> According to http://www.erlang.org/faq/mnesia.html
> "Dets uses 32 bit integers for file offsets,
> so the largest possible mnesia table (for now) is 4Gb".
> There is nothing there about the limits being different
> for in memory vs on disc.
> Poke around a bit more and you will find explicit claims
> that this limit applies both to disc only and to disc copies,
> e.g., "disc_copies tables are limited by their dets backend".
> You will also find the figures of 2GB and 3GB floating around.
> 
> One thing that would be really nice would have to have
> accurate current limits prominently signposted (not necessarily
> *displayed*, just pointed to will do) near the beginning of the
> Mnesia manual.
> 
> I've had serious problems with the Mnesia documentation in the
> past, so I'm quite prepared to believe that I have my facts
> totally wrong.
> 
> 
> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions
> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20151015/df8e059d/attachment.html>


More information about the erlang-questions mailing list