[erlang-questions] Re: mnesia memory usage on 32 and 64 bits machines
Mon Jan 24 16:01:40 CET 2011
The 32 bit vs 64 bit dilemma is pretty old now. You can see 64bit taking
generally more memory pretty much everywhere. I remember testing ubuntu 32
bit vs 64 bit and the 64 bit version used a good 1.5-1.7 times more memory
on a vanilla install (1year ago).
But as mentioned in the thread before, this can be mitigated to some extent
if you manage the types properly at runtime, incurring the extra cost only
on pointers and the extra alignment/padding required by them.
Since my server is a fairly old amd 64bit with only 1.5gb ram, the extra
memory I save from running in 32bit helps quite a bit. With 2gb+ ram, the
line gets blurry and it isn't really usefull to stick with 32bit. Obviously,
with 4gb+ you need 64 bit...
Your choice should depend on your hardware and on the applications you run
on it. Simple as that, profile and see. Depending on your data layout and
what you do with it, you might or might not see a noticeable performance
difference (by that I mean +- 5%). I believe, generally, 64bit to be a bit
slower due to the extra memory cost generating more cache misses.
On Fri, Jan 21, 2011 at 7:06 AM, Hynek Vychodil <> wrote:
> If I remember right There was announced nice optimization of Erlang
> process heap using 32 "pointers" on 64-bit architecture on SFO Erlang
> Factory last year and I believe it is included in R14B version. Anyway
> I'm not sure and didn't verify.
> On Fri, Jan 21, 2011 at 10:52 AM, franz <> wrote:
> > I admit I was tempted by the 32-bits architecture. As I'm developing a
> > mnesia-centric distributed application I thought that using 32-bits
> > would have reduced the ram consumption and the access speed. So I
> > some tests to be run on two identical servers, one running a 32-bits
> > and erlang, the other 64-bits.
> > And everything went fine, until I bumped into the "maximum heap size for
> > 32-bit machines", which I was unaware of: when a mnesia table exceeds 3GB
> > erlang crashes saying <<erlang eheap_alloc: Cannot allocate xxx bytes of
> > memory (of type "heap")>>.
> > In conclusion, for anyone wondering, I think I'm going 64.
> > Regards,
> > franz
> > ________________________________________________________________
> > erlang-questions (at) erlang.org mailing list.
> > See http://www.erlang.org/faq.html
> > To unsubscribe; mailto:
> --Hynek (Pichi) Vychodil
> Analyze your data in minutes. Share your insights instantly. Thrill
> your boss. Be a data hero!
> Try GoodData now for free: www.gooddata.com
> erlang-questions (at) erlang.org mailing list.
> See http://www.erlang.org/faq.html
> To unsubscribe; mailto:
More information about the erlang-questions