embedded systems erlang?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

embedded systems erlang?

Raoul Duke
hi,

I see many google hits for things people have done with Erlang
targeting "embedded" resource constrained systems. But I'm not sure if
there's like an official build or something for it? Does everybody
hack up their own thing? What's the state of the art or mainstream way
to go here?

I'm looking at like 256 K RAM (!)
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: embedded systems erlang?

Matthias Lang
On Monday, December 15, Raoul Duke wrote:

> I see many google hits for things people have done with Erlang
> targeting "embedded" resource constrained systems. But I'm not sure if
> there's like an official build or something for it?

There is no "official" build for "resource constrained" erlang.

But cross compilation, which is a hurdle for many embedded systems, has
been part of the official build for years now (it's definitely in R14B03,
probably appeared around R12 or R13)

> Does everybody hack up their own thing?

Yes, because different people's embedded systems are quite different.

> I'm looking at like 256 K RAM (!)

There's no way you'll get normal Erlang to run in that.

Just starting the shell on R14B03 on a 32 bit ARM CPU uses about 10 MB.
Older versions of Erlang, e.g. R7, were a bit less hungry, maybe 6 MB.
But 256 K is totally out of reach.

Here's erlang:memory() on an ARM, for a newly started emulator which
hasn't done anything other than start the shell:

Erlang R14B03 (erts-5.8.4) [source] [rq:1] [async-threads:0] [kernel-poll:false]

Eshell V5.8.4  (abort with ^G)
1> erlang:memory().
[{total,3488376},
 {processes,679792},
 {processes_used,673232},
 {system,2808584},
 {atom,300553},
 {atom_used,272023},
 {binary,17688},
 {code,1745473},
 {ets,86156}]

the values are in bytes. (The memory use according to the OS is 10 MB for
that emulator)

Matt
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: embedded systems erlang?

Max Lapshin-2
We are making our own firmware for IP camera and struggling from low memory: 64 MB for everything.

I'm a bit afraid to launch erlang there.

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: embedded systems erlang?

dmkolesnikov
In reply to this post by Matthias Lang
Hello,

Erlang demands some memory on embedded system but you can run decent applications on some HW platforms.
I think the lowest grade HW is Raspberry PI B Model with 512MB RAM (I’ve not touched HW with lower memory).
I am successfully running OTP 17.3 with web server that proxies requests to serial port. This is not a faster solution available on the globe but it address my immediate needs as fault tolerant HW controller.  

I’ve made some benchmark for you with 8 concurrent load source that sends HTTP POST request to web server over Wi-Fi, the payload is 1KB. The server handles 75 RPS on average, the memory consumption peaks to 24MB. Mean response latency is 250ms but 95th percentile goes to 500ms. However, the single load source with same traffic pattern shows different results. The benchmark driver generates about 50 RPS on average, mean response latency is less then 100ms, 99 percent of requests is responded within 250ms.

Just starting the shell on 17.3 on Raspberry PI B Model uses about 7 MB but you can reduce it to 4MB with some VM restrictions on number of processes, stack sizes, etc.

root@raspberrypi:/home/pi# erl
Eshell V6.2  (abort with ^G)
1> erlang:memory().
[{total,6596552},
 {processes,2404276},
 {processes_used,2404216},
 {system,4192276},
 {atom,146321},
 {atom_used,127004},
 {binary,344536},
 {code,2185825},
 {ets,118956}]
2>

- Dmitry



> On 17 Dec 2014, at 10:40, Matthias Lang <[hidden email]> wrote:
>
> On Monday, December 15, Raoul Duke wrote:
>
>> I see many google hits for things people have done with Erlang
>> targeting "embedded" resource constrained systems. But I'm not sure if
>> there's like an official build or something for it?
>
> There is no "official" build for "resource constrained" erlang.
>
> But cross compilation, which is a hurdle for many embedded systems, has
> been part of the official build for years now (it's definitely in R14B03,
> probably appeared around R12 or R13)
>
>> Does everybody hack up their own thing?
>
> Yes, because different people's embedded systems are quite different.
>
>> I'm looking at like 256 K RAM (!)
>
> There's no way you'll get normal Erlang to run in that.
>
> Just starting the shell on R14B03 on a 32 bit ARM CPU uses about 10 MB.
> Older versions of Erlang, e.g. R7, were a bit less hungry, maybe 6 MB.
> But 256 K is totally out of reach.
>
> Here's erlang:memory() on an ARM, for a newly started emulator which
> hasn't done anything other than start the shell:
>
> Erlang R14B03 (erts-5.8.4) [source] [rq:1] [async-threads:0] [kernel-poll:false]
>
> Eshell V5.8.4  (abort with ^G)
> 1> erlang:memory().
> [{total,3488376},
> {processes,679792},
> {processes_used,673232},
> {system,2808584},
> {atom,300553},
> {atom_used,272023},
> {binary,17688},
> {code,1745473},
> {ets,86156}]
>
> the values are in bytes. (The memory use according to the OS is 10 MB for
> that emulator)
>
> Matt
> _______________________________________________
> erlang-questions mailing list
> [hidden email]
> http://erlang.org/mailman/listinfo/erlang-questions

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions