File sharing software

Richard A. O'Keefe ok@REDACTED
Tue May 2 23:34:10 CEST 2006


Yariv Sadan <yariv@REDACTED> wrote:
	Some issues that I didn't find very reassuring, however, were
	mnesia's rather limited table size (2 GB according to
	http://www.erlang.org/doc/doc-5.4.13/lib/
	stdlib-1.13.12/doc/html/index.html)

I presume this is a reference to the following sentence in the
documentation for the 'dets' module:

    The size of Dets files cannot exceed 2 GB.

But what about the very next sentence?

    If larger tables are needed, Mnesia's table fragmentation can be used.

Being a bear of very little brain, I thought this meant that while
*dets* was limited to 2GB for a table, *mnesia* wasn't, and when I
look at the Mnesia manual, section 1.5.3 seems to say that very thing:

    1.5.3 Table Fragmentation

    The Concept

    A concept of table fragmentation has been introduced 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 indices etc.
    as any other table.  But the tables may neither have local content
    nor have the snmp connection activated.  ...

I must be getting senile.  Try as I might, I cannot make this mean anything
other than "mnesia can handle logical tables bigger than 2GB".

	Clearly, the size of the Erlang runtime made Erlang too heavy for the  
	client, which needed to be as light as possible. I would have only  
	considered Erlang if the runtime were no more than a few hundred KB.  

These days, that's a really strict limitation.
To take a few examples lying around on my disc:

    The Freely Distributable Math Library (fdlibm) compiles to a
    binary (libm.a) that is 189 kB.

    /usr/lib/libc.a is 1.84 MB (so this would apparently rule out using C...)

    The Perl-Compatible Regular Expression library (PCRE)
    has a /usr/local/lib/libpcre.a that is 172 kB, and that's
    *without* the "90kB" of extra tables needed to support Unicode
    character properties (I decided I didn't want that yet).
    *With* that, we'd be looking at 260 kB.

    The GNU character encoding library, /usr/local/lib/libiconv.so,
    is 1.28 MB

    Can we think of a nice small language?  How about a language that has
    _very_ similar data structures to Erlang, but is a much smaller language.
    Scheme!  That's it!  Well, /usr/local/lib/libgambc.so.1.1 is 1.46MB.

    One thing Scheme and Erlang share is arbitrary precision integers.
    So how big is the GNU mp library?  267 kB.

If efficient bignum support is 267 kB, and if trig functions &c take
189 kB, and Erlang has bignums and trig functions (which it does),
then there is NO WAY that an Erlang runtime can fit in "no more than
a few hundred kB".




More information about the erlang-questions mailing list