[erlang-questions] Erlang on ARM

Frank Hunleth fhunleth@REDACTED
Mon Feb 13 15:55:04 CET 2012

On Mon, Feb 13, 2012 at 12:55 AM, Richard O'Keefe <ok@REDACTED> wrote:
> I should also mention that my colleague doing IR on an Android phone
> has fallen foul of Linux memory management:  by default the OS will
> overcommit virtual memory.  So his program ask for memory, is told
> it has been given it, and then some random service gets shut down
> because there isn't that much.  If I recall correctly, it was sshd
> that got killed the first time.  While it was an Android _phone_,
> I think it was some other Linux he'd installed on it; I remember
> he and a student had the dickens of a job getting gdb to work on it.

Right. Linux is usually set up to overcommit memory by default. Take a
look at /proc/sys/vm/overcommit_memory to change this. I thought that
Android also had a more sophisticated low memory handling policy, but
I do not know for sure. At least with "regular" Linux, when a low
memory situation occurs, the OOM killer runs a heuristic that will
pick the sacrificial process to shut down.

> Overcommitment must be a problem for other people running Erlang on
> Linux.  What, other that a few incantations as root, do you/can you
> do about it?

I have had problems with the OOM killer, but not with Erlang. I'm new
to the Erlang world, though. I most recently ran into the problem with
a Javascript interpreter that was embedded in a low memory device. It
was possible to limit the amount of memory allocated by the
interpreter and that addressed the issue. Of course, some Javascript
apps needed to be rewritten, but they never would have worked well on
the device anyway. I don't know if Erlang has an option to limit the
amount of memory used, but that seems like a route to explore. My
guess is that Erlang applications are more equipped to handle out of
memory conditions than anything else running on the hardware.

Also, since you mentioned that you were looking into running on the
Beaglebone, I have been running Erlang on that board as well. I've
made a small SD card image (code on GitHub) that may help get you past
the cross-compiling and other challenges of running on the board. I
have some instructions here:


The image is made using Buildroot which is fairly bare bones if you're
used to Ubuntu or Angstrom. It may be easier to tweak should you need
more memory or other resources, though. I have not looked into
enabling HiPE, but I'm encouraged by the other responses to your


More information about the erlang-questions mailing list