Light-weight operating systems supporting Erlang in production web servers

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
32 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Light-weight operating systems supporting Erlang in production web servers

Lloyd R. Prentice-2

Hi,

Joe Armstrong states in his 2003 Doctor of Technology thesis:

"Our system has very little need of an operating system. We make use of very few operating system services, thus it is relatively easy to port our system to specialised environments such as embedded systems."

As a one-time Forth developer, software bloat offends me. I sigh and use Ubuntu on my development system out laziness and convenience.

But I would like my production servers to be lean and mean.

What light weight open-source off-the shelf operating systems would battle-hardened Erlang gurus recommend?

All the best,

LRP


Sent from my iPad

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

Re: Light-weight operating systems supporting Erlang in production web servers

Roger Lipscombe-2
On 15 September 2017 at 15:20, Lloyd R. Prentice <[hidden email]> wrote:
> What light weight open-source off-the shelf operating systems would
> battle-hardened Erlang gurus recommend?

I can't claim to be battle-hardened, and I can't claim to have any
experience of *this* at all, but how about *no* OS?
http://erlangonxen.org/
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Light-weight operating systems supporting Erlang in production web servers

Felix Gallo-2
In reply to this post by Lloyd R. Prentice-2
FreeBSD and alpine Linux have both served me well. 

F. 

On Sep 15, 2017, at 7:20 AM, Lloyd R. Prentice <[hidden email]> wrote:

Hi,

Joe Armstrong states in his 2003 Doctor of Technology thesis:

"Our system has very little need of an operating system. We make use of very few operating system services, thus it is relatively easy to port our system to specialised environments such as embedded systems."

As a one-time Forth developer, software bloat offends me. I sigh and use Ubuntu on my development system out laziness and convenience.

But I would like my production servers to be lean and mean.

What light weight open-source off-the shelf operating systems would battle-hardened Erlang gurus recommend?

All the best,

LRP


Sent from my iPad
_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: Light-weight operating systems supporting Erlang in production web servers

Heinz Nikolaus Gies-2
In reply to this post by Lloyd R. Prentice-2
SmartOS (or other Illumos’s) they run Erlang very well, Illumos is one of the most stable systems in existence, and SmartOS it a pure in memory OS that doesn’t even take any disk space Boots either from USB or PXE


On 15. Sep 2017, at 16:20, Lloyd R. Prentice <[hidden email]> wrote:

Hi,

Joe Armstrong states in his 2003 Doctor of Technology thesis:

"Our system has very little need of an operating system. We make use of very few operating system services, thus it is relatively easy to port our system to specialised environments such as embedded systems."

As a one-time Forth developer, software bloat offends me. I sigh and use Ubuntu on my development system out laziness and convenience.

But I would like my production servers to be lean and mean.

What light weight open-source off-the shelf operating systems would battle-hardened Erlang gurus recommend?

All the best,

LRP


Sent from my iPad
_______________________________________________
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

signature.asc (817 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Light-weight operating systems supporting Erlang in production web servers

Phillip Toland
In reply to this post by Felix Gallo-2
I second the vote for Alpine Linux. My application is a mix of Erlang and Elixir and runs in Docker containers. I use Alpine as the base and I get reasonably sized containers that don't have anything I don't need.

As a side note, it isn't just about providing the necessary support to run the BEAM VM. I also want enough of a familiar environment (ls, ps, top, nslookup/dig, netstat) to troubleshoot issues. Alpine provides that without the other stuff that you don't need.

~phil


On September 15, 2017 at 9:47:00 AM, [hidden email] ([hidden email]) wrote:

FreeBSD and alpine Linux have both served me well. 

F. 

On Sep 15, 2017, at 7:20 AM, Lloyd R. Prentice <[hidden email]> wrote:

Hi,

Joe Armstrong states in his 2003 Doctor of Technology thesis:

"Our system has very little need of an operating system. We make use of very few operating system services, thus it is relatively easy to port our system to specialised environments such as embedded systems."

As a one-time Forth developer, software bloat offends me. I sigh and use Ubuntu on my development system out laziness and convenience.

But I would like my production servers to be lean and mean.

What light weight open-source off-the shelf operating systems would battle-hardened Erlang gurus recommend?

All the best,

LRP


Sent from my iPad
_______________________________________________
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

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

Re: Light-weight operating systems supporting Erlang in production web servers

Tristan Sloughter-4
Same, and I have an example multi-stage docker file for building the image on Alpine for an example project: https://github.com/SpaceTime-IoT/presence-sample/blob/master/Dockerfile It also uses all the options relx supports to shrink the size of the tarball https://github.com/SpaceTime-IoT/presence-sample/blob/master/rebar.config#L26-L34

One feature relx doesn't yet support that may help a little with size of the unpacked release would be compressed applications (.ez). Pretty sure that is what reltool would do by default? Not sure how much it saves.
 
Also, it is possible to use docker scratch* to have no real base image, but with Alpine being so small I don't think it saves enough to be worth it -- esp considering everything you then don't have, as Phil mentioned.

* And some hacks, copying over libs and a linker. Or a statically linked Erlang? Never done it with a statically linked Erlang, would that work with SSL?

--
  Tristan Sloughter
  "I am not a crackpot" - Abe Simpson


On Fri, Sep 15, 2017, at 10:14 AM, Phil Toland wrote:
I second the vote for Alpine Linux. My application is a mix of Erlang and Elixir and runs in Docker containers. I use Alpine as the base and I get reasonably sized containers that don't have anything I don't need.

As a side note, it isn't just about providing the necessary support to run the BEAM VM. I also want enough of a familiar environment (ls, ps, top, nslookup/dig, netstat) to troubleshoot issues. Alpine provides that without the other stuff that you don't need.

~phil



On September 15, 2017 at 9:47:00 AM, [hidden email] ([hidden email]) wrote:




FreeBSD and alpine Linux have both served me well. 

F. 

On Sep 15, 2017, at 7:20 AM, Lloyd R. Prentice <[hidden email]> wrote:

Hi,

Joe Armstrong states in his 2003 Doctor of Technology thesis:

"Our system has very little need of an operating system. We make use of very few operating system services, thus it is relatively easy to port our system to specialised environments such as embedded systems."

As a one-time Forth developer, software bloat offends me. I sigh and use Ubuntu on my development system out laziness and convenience.

But I would like my production servers to be lean and mean.

What light weight open-source off-the shelf operating systems would battle-hardened Erlang gurus recommend?

All the best,

LRP


Sent from my iPad
_______________________________________________
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

_______________________________________________
erlang-questions mailing list


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

Re: Light-weight operating systems supporting Erlang in production web servers

Lloyd R. Prentice-2
Thanks, all.

Good ideas to pursue.

All the best,

Lloyd

-----Original Message-----
From: "Tristan Sloughter" <[hidden email]>
Sent: Friday, September 15, 2017 4:48pm
To: [hidden email]
Subject: Re: [erlang-questions] Light-weight operating systems supporting Erlang in production web servers

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Same, and I have an example multi-stage docker file for building the
image on Alpine for an example project:
https://github.com/SpaceTime-IoT/presence-sample/blob/master/Dockerfile
It also uses all the options relx supports to shrink the size of the
tarball
https://github.com/SpaceTime-IoT/presence-sample/blob/master/rebar.config#L26-L34
One feature relx doesn't yet support that may help a little with size of
the unpacked release would be compressed applications (.ez). Pretty sure
that is what reltool would do by default? Not sure how much it saves.
Also, it is possible to use docker scratch*  to have no real base image,
but with Alpine being so small I don't think it saves enough to be worth
it -- esp considering everything you then don't have, as Phil mentioned.
* And some hacks, copying over libs and a linker. Or a statically
  linked Erlang? Never done it with a statically linked Erlang, would
  that work with SSL?
--
  Tristan Sloughter
  "I am not a crackpot" - Abe Simpson
  [hidden email]


On Fri, Sep 15, 2017, at 10:14 AM, Phil Toland wrote:

> I second the vote for Alpine Linux. My application is a mix of Erlang
> and Elixir and runs in Docker containers. I use Alpine as the base
> and I get reasonably sized containers that don't have anything I
> don't need.>
> As a side note, it isn't just about providing the necessary support to
> run the BEAM VM. I also want enough of a familiar environment (ls, ps,
> top, nslookup/dig, netstat) to troubleshoot issues. Alpine provides
> that without the other stuff that you don't need.>
> ~phil
>
>
>
> On September 15, 2017 at 9:47:00 AM, [hidden email]
> ([hidden email]) wrote:>>
>>
>>
>> FreeBSD and alpine Linux have both served me well.
>>
>> F.
>>
>> On Sep 15, 2017, at 7:20 AM, Lloyd R. Prentice
>> <[hidden email]> wrote:>>> Hi,


>>> Joe Armstrong states in his 2003 Doctor of Technology thesis:


>>> "Our system has very little need of an operating system. We make use
>>> of very few operating system services, thus it is relatively easy to
>>> port our system to specialised environments such as embedded
>>> systems.">>> As a one-time Forth developer, software bloat offends me. I sigh and
>>> use Ubuntu on my development system out laziness and convenience.>>> But I would like my production servers to be lean and mean.


>>> What light weight open-source off-the shelf operating systems would
>>> battle-hardened Erlang gurus recommend?>>> All the best,


>>> LRP


>>>
>>> Sent from my iPad
>>> _______________________________________________
>>> 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>>
> _________________________________________________
> 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
Reply | Threaded
Open this post in threaded view
|

Re: Light-weight operating systems supporting Erlang in production web servers

zxq9-2
In reply to this post by Lloyd R. Prentice-2
On 2017年09月15日 金曜日 10:20:15 Lloyd R. Prentice wrote:
> As a one-time Forth developer, software bloat offends me. I sigh and use Ubuntu on my development system out laziness and convenience.
>
> But I would like my production servers to be lean and mean.
>
> What light weight open-source off-the shelf operating systems would battle-hardened Erlang gurus recommend?

I've found success getting very lean, highly efficient systems using Gentoo. It is about halfway between being "off-the-shelf" and a prepackaged system like the others. Gentoo is a meta distribution, not really a distribution, so you choose exactly what you want your custom distro to look like and have it built that way.

For systems where I've chosen the hardware (or virtual host environment) and I'm going to run Erlang only that means:
- The kernel modules necessary to drive the hardware
- The basics: coreutils, bash, vim
- Erlang dependencies: enough of gcc, openssl, etc. to build Erlang properly
- Extra utilities the system might depend on: Postgres, Mercury, a graph db, etc.

Beyond that, as long as I write everything else in Erlang (independent services like Postgres aside) then my from source system retrieves and runs the latest version of everything. As long as I stick to the same hardware I have the Gentoo profile continue to build up to date binaries whenever something changes and distribute those to the service hosts.

I've found this to be a really good fit for situations where you have 1-5 systems or >100 systems. With just a few systems you can have the systems rebuild themselves, maintaining it occasionally is not a hassle, and setting up a binary repo isn't worth it. With hundreds or thousands of hosts you will have a sysop who can keep an eye on things, setting up a binary repo is totally worth it, and everything just sort of works in a way that operations and development don't have to be intimate (host maintenance takes very little time for the systems guys in this case once things are set up). Where Gentoo really doesn't fit is that fuzzy space where you have just enough systems to maintain that it is a painful and distracting task but not enough to make having dedicated sysop support necessary. Unfortunately, most projects fit into that uncomfortable middle size, and so we see a proliferation of wonky partial solutions to handle that semi-scaled space.

In my experience there is no reasonable way to discuss how lean the system is going to be without addressing how lean the support structure for that system is going to be. In the end we have to write our systems to handle human problems, and that means also addressing human concerns on the back end. Sometimes being lazy and just tossing Debian or Ubuntu out there is really the right solution -- to the point that I favor VMs over containers because nobody has to learn or keep up with any quirks and that's usually the biggest time sink, not execution efficiency. Take care to write your system in a way that you don't wind up marrying a particular flavor of hose unless you have to (and sometimes you have to, at least on the client side). I've found so far that if I write the core system in pure Erlang (avoiding native code) I have zero problems changing the host later -- and that gives me quite a lot of freedom.

It has been very rare that a performance issue was so crushingly problematic that I needed NIFs or port drivers -- usually I need a system written in something totally different that I can talk to over the wire. Using the network socket as your universal abstraction is immensely powerful in this regard, allowing you to experiment with whatever platform whims you come up with in the future.

My 2 bucks.

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

Re: Light-weight operating systems supporting Erlang in production web servers

Joe Armstrong-2
In reply to this post by Tristan Sloughter-4
Old timer here :-)

Just out of interest how large is Apline? (in MB?)

Just out of interest the last time I made a minimal erlang is ended up
at 4.7 MB -
with the following files (and sizes)

> /Dropbox/experiments/erlang_embedded/tiny_erl_19.1 > tree -s

├── [      11859]  COPYRIGHT
├── [        238]  bin
│   ├── [    2827272]  beam.smp
│   ├── [      22580]  erl_child_setup
│   ├── [      53548]  erlexec
│   ├── [       5479]  start.boot
│   └── [       6459]  start.script
├── [        896]  erl
└── [        204]  lib
    ├── [     429496]  compiler-7.0.2.ez
    ├── [     387430]  kernel-5.1.ez
    ├── [     109322]  sasl-3.0.1.ez
    └── [     806013]  stdlib-3.1.ez

The biggest file is beam.smp -- I guess with a little static analysis
many of the files
in stdlib and kernel could be removed.

In the 'old days' the size to beat was 1.44 MB (ie a floppy disk) - we
did actually have
an entire OS + Erlang that fitted onto a single floppy disk.

I also recall a time when linux kernels were so small that a
knowledgeable person knew what every file in the system did.

I also believe that "small is fast and secure"
loading/storing/cacheing MBs of *anything* is
a thousand times faster than loading/storing/caching GBs.

Security is possible (though difficult) with MBs of code - and I guess
impossible with GB

Cheers

/Joe


On Fri, Sep 15, 2017 at 10:48 PM, Tristan Sloughter <[hidden email]> wrote:

> Same, and I have an example multi-stage docker file for building the image
> on Alpine for an example project:
> https://github.com/SpaceTime-IoT/presence-sample/blob/master/Dockerfile It
> also uses all the options relx supports to shrink the size of the tarball
> https://github.com/SpaceTime-IoT/presence-sample/blob/master/rebar.config#L26-L34
>
> One feature relx doesn't yet support that may help a little with size of the
> unpacked release would be compressed applications (.ez). Pretty sure that is
> what reltool would do by default? Not sure how much it saves.
>
> Also, it is possible to use docker scratch* to have no real base image, but
> with Alpine being so small I don't think it saves enough to be worth it --
> esp considering everything you then don't have, as Phil mentioned.
>
> * And some hacks, copying over libs and a linker. Or a statically linked
> Erlang? Never done it with a statically linked Erlang, would that work with
> SSL?
>
> --
>   Tristan Sloughter
>   "I am not a crackpot" - Abe Simpson
>   [hidden email]
>
>
> On Fri, Sep 15, 2017, at 10:14 AM, Phil Toland wrote:
>
> I second the vote for Alpine Linux. My application is a mix of Erlang and
> Elixir and runs in Docker containers. I use Alpine as the base and I get
> reasonably sized containers that don't have anything I don't need.
>
> As a side note, it isn't just about providing the necessary support to run
> the BEAM VM. I also want enough of a familiar environment (ls, ps, top,
> nslookup/dig, netstat) to troubleshoot issues. Alpine provides that without
> the other stuff that you don't need.
>
> ~phil
>
>
>
> On September 15, 2017 at 9:47:00 AM, [hidden email]
> ([hidden email]) wrote:
>
>
>
>
> FreeBSD and alpine Linux have both served me well.
>
> F.
>
> On Sep 15, 2017, at 7:20 AM, Lloyd R. Prentice <[hidden email]>
> wrote:
>
> Hi,
>
> Joe Armstrong states in his 2003 Doctor of Technology thesis:
>
> "Our system has very little need of an operating system. We make use of very
> few operating system services, thus it is relatively easy to port our system
> to specialised environments such as embedded systems."
>
> As a one-time Forth developer, software bloat offends me. I sigh and use
> Ubuntu on my development system out laziness and convenience.
>
> But I would like my production servers to be lean and mean.
>
> What light weight open-source off-the shelf operating systems would
> battle-hardened Erlang gurus recommend?
>
> All the best,
>
> LRP
>
>
> Sent from my iPad
>
> _______________________________________________
> 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
>
> _______________________________________________
> 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
>
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Light-weight operating systems supporting Erlang in production web servers

Tristan Sloughter-4
Alpine is 4-5MB (no kernel).

And yea, in a target system much of the space is taken up by beam.smp.
On a default install that is like 19M.

I've never tried building a smaller beam.smp :)

--
  Tristan Sloughter
  "I am not a crackpot" - Abe Simpson
  [hidden email]

On Sat, Sep 16, 2017, at 02:29 AM, Joe Armstrong wrote:

> Old timer here :-)
>
> Just out of interest how large is Apline? (in MB?)
>
> Just out of interest the last time I made a minimal erlang is ended up
> at 4.7 MB -
> with the following files (and sizes)
>
> > /Dropbox/experiments/erlang_embedded/tiny_erl_19.1 > tree -s
>
> ├── [      11859]  COPYRIGHT
> ├── [        238]  bin
> │   ├── [    2827272]  beam.smp
> │   ├── [      22580]  erl_child_setup
> │   ├── [      53548]  erlexec
> │   ├── [       5479]  start.boot
> │   └── [       6459]  start.script
> ├── [        896]  erl
> └── [        204]  lib
>     ├── [     429496]  compiler-7.0.2.ez
>     ├── [     387430]  kernel-5.1.ez
>     ├── [     109322]  sasl-3.0.1.ez
>     └── [     806013]  stdlib-3.1.ez
>
> The biggest file is beam.smp -- I guess with a little static analysis
> many of the files
> in stdlib and kernel could be removed.
>
> In the 'old days' the size to beat was 1.44 MB (ie a floppy disk) - we
> did actually have
> an entire OS + Erlang that fitted onto a single floppy disk.
>
> I also recall a time when linux kernels were so small that a
> knowledgeable person knew what every file in the system did.
>
> I also believe that "small is fast and secure"
> loading/storing/cacheing MBs of *anything* is
> a thousand times faster than loading/storing/caching GBs.
>
> Security is possible (though difficult) with MBs of code - and I guess
> impossible with GB
>
> Cheers
>
> /Joe
>
>
> On Fri, Sep 15, 2017 at 10:48 PM, Tristan Sloughter <[hidden email]>
> wrote:
> > Same, and I have an example multi-stage docker file for building the image
> > on Alpine for an example project:
> > https://github.com/SpaceTime-IoT/presence-sample/blob/master/Dockerfile It
> > also uses all the options relx supports to shrink the size of the tarball
> > https://github.com/SpaceTime-IoT/presence-sample/blob/master/rebar.config#L26-L34
> >
> > One feature relx doesn't yet support that may help a little with size of the
> > unpacked release would be compressed applications (.ez). Pretty sure that is
> > what reltool would do by default? Not sure how much it saves.
> >
> > Also, it is possible to use docker scratch* to have no real base image, but
> > with Alpine being so small I don't think it saves enough to be worth it --
> > esp considering everything you then don't have, as Phil mentioned.
> >
> > * And some hacks, copying over libs and a linker. Or a statically linked
> > Erlang? Never done it with a statically linked Erlang, would that work with
> > SSL?
> >
> > --
> >   Tristan Sloughter
> >   "I am not a crackpot" - Abe Simpson
> >   [hidden email]
> >
> >
> > On Fri, Sep 15, 2017, at 10:14 AM, Phil Toland wrote:
> >
> > I second the vote for Alpine Linux. My application is a mix of Erlang and
> > Elixir and runs in Docker containers. I use Alpine as the base and I get
> > reasonably sized containers that don't have anything I don't need.
> >
> > As a side note, it isn't just about providing the necessary support to run
> > the BEAM VM. I also want enough of a familiar environment (ls, ps, top,
> > nslookup/dig, netstat) to troubleshoot issues. Alpine provides that without
> > the other stuff that you don't need.
> >
> > ~phil
> >
> >
> >
> > On September 15, 2017 at 9:47:00 AM, [hidden email]
> > ([hidden email]) wrote:
> >
> >
> >
> >
> > FreeBSD and alpine Linux have both served me well.
> >
> > F.
> >
> > On Sep 15, 2017, at 7:20 AM, Lloyd R. Prentice <[hidden email]>
> > wrote:
> >
> > Hi,
> >
> > Joe Armstrong states in his 2003 Doctor of Technology thesis:
> >
> > "Our system has very little need of an operating system. We make use of very
> > few operating system services, thus it is relatively easy to port our system
> > to specialised environments such as embedded systems."
> >
> > As a one-time Forth developer, software bloat offends me. I sigh and use
> > Ubuntu on my development system out laziness and convenience.
> >
> > But I would like my production servers to be lean and mean.
> >
> > What light weight open-source off-the shelf operating systems would
> > battle-hardened Erlang gurus recommend?
> >
> > All the best,
> >
> > LRP
> >
> >
> > Sent from my iPad
> >
> > _______________________________________________
> > 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
> >
> > _______________________________________________
> > 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
> >
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Light-weight operating systems supporting Erlang in production web servers

scott ribe
In reply to this post by Phillip Toland
On Sep 15, 2017, at 11:14 AM, Phil Toland <[hidden email]> wrote:
>
> I second the vote for Alpine Linux. My application is a mix of Erlang and Elixir and runs in Docker containers. I use Alpine as the base and I get reasonably sized containers that don't have anything I don't need.
>
> As a side note, it isn't just about providing the necessary support to run the BEAM VM. I also want enough of a familiar environment (ls, ps, top, nslookup/dig, netstat) to troubleshoot issues. Alpine provides that without the other stuff that you don't need.
>
> ~phil

When I looked at Alpine, the Erlang in their repo was too old for me. Do you guys build the releases yourselves, or live with older versions?

--
Scott Ribe
[hidden email]
(303) 722-0567

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

Re: Light-weight operating systems supporting Erlang in production web servers

Tristan Sloughter-4
The docker images keep up to date for the latest alpine and Erlang:
https://store.docker.com/images/erlang

The dockerfile I linked to
https://github.com/SpaceTime-IoT/presence-sample/blob/master/Dockerfile
currently uses my own base image, but I'll be moving to the official
image, and then creates a second image based only on Alpine 3.3.6 (no
Erlang) to copy the release to.

--
  Tristan Sloughter
  "I am not a crackpot" - Abe Simpson
  [hidden email]

On Sat, Sep 16, 2017, at 02:25 PM, scott ribe wrote:

> On Sep 15, 2017, at 11:14 AM, Phil Toland <[hidden email]> wrote:
> >
> > I second the vote for Alpine Linux. My application is a mix of Erlang and Elixir and runs in Docker containers. I use Alpine as the base and I get reasonably sized containers that don't have anything I don't need.
> >
> > As a side note, it isn't just about providing the necessary support to run the BEAM VM. I also want enough of a familiar environment (ls, ps, top, nslookup/dig, netstat) to troubleshoot issues. Alpine provides that without the other stuff that you don't need.
> >
> > ~phil
>
> When I looked at Alpine, the Erlang in their repo was too old for me. Do
> you guys build the releases yourselves, or live with older versions?
>
> --
> Scott Ribe
> [hidden email]
> (303) 722-0567
>
> _______________________________________________
> 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
Reply | Threaded
Open this post in threaded view
|

Re: Light-weight operating systems supporting Erlang in production web servers

scott ribe
Ah thanks, I never thought to look for Erlang-created images. I started with Alpine's base image, and looked at what Alpine keeps in their repo.

--
Scott Ribe
[hidden email]
(303) 722-0567

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

Re: Light-weight operating systems supporting Erlang in production web servers

Richard A. O'Keefe-2
In reply to this post by Joe Armstrong-2

On 16/09/17 9:29 PM, Joe Armstrong wrote:
> Old timer here :-)
>
> Just out of interest how large is Apline? (in MB?)

For what it's worth, TinyCore-8.0.iso is just under 17 MB.
Installed in VirtualBox and running, complete with GUI,
it's 21.7MB.  That doesn't include development tools.
I note that just the
"OTP 20.0 HTML Documentation File (33,948,386)"
is bigger than this and
"OTP 20.0 Windows 32-bit Binary File (96,337,114)"
is a lot bigger.

http://distro.ibiblio.org/tinycorelinux/intro.html
http://distro.ibiblio.org/tinycorelinux/downloads.html
The current Core (TinyCore minus GUI &c) is 11 MB.

Bringing in clang and its dependencies blows the system
out from 21.7 to 145.8 MB (+ 124.1 MB).
Adding gettext brought it to 148.0 MB (+ 2.2 MB).
Adding the manual pages and related tools brought
it up to 152.4 MB (+ 4.4 MB).  Add a couple of text
editors (NOT including emacs, which I actually like)
and it's 161.4 MB (+ 9.0 MB).

So the actual TinyCore distribution is about 1/8th of
a fairly minimal development environment.  I used to
run a full SunOS 3 environment on a 100 MB disc, and
40 MB of that was left over for my files.  How times change.

I suspect that TinyCore plus enough to *run* Erlang could
be quite small by today's standards.  Certainly you could
carry around TinyCore Linux + C development environment +
full Erlang distribution and run it comfortably from an
elderly memory stick.
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Light-weight operating systems supporting Erlang in production web servers

Lloyd R. Prentice-2
Hi Richard,

So, on a server,  it sounds like we're talking about:

11 MB for the OS
5 MB for stripped down Erlang based on Joe's work,
plus our application code.

Thanks to all for these numbers. 

My question came out of a conversation with a friend re: how far we could push Erlang on a Raspberry Pi or Odroid C2 SBC.

It's interesting to look at the numbers for TinyCore on ARM:


Compressed, they seem to run in the 25MB range. Raspian zipped is some 4GB. So, on an RP server TinyCore seems to offer much.

This makes me think that a cluster of $5.00 RP Zeros would be viable and a great platform for exploring and teaching distributed Erlang.

All the best,

Lloyd


Sent from my iPad

On Sep 17, 2017, at 9:55 PM, Richard A. O'Keefe <[hidden email]> wrote:


On 16/09/17 9:29 PM, Joe Armstrong wrote:
Old timer here :-)

Just out of interest how large is Apline? (in MB?)

For what it's worth, TinyCore-8.0.iso is just under 17 MB.
Installed in VirtualBox and running, complete with GUI,
it's 21.7MB.  That doesn't include development tools.
I note that just the
"OTP 20.0 HTML Documentation File (33,948,386)"
is bigger than this and
"OTP 20.0 Windows 32-bit Binary File (96,337,114)"
is a lot bigger.

http://distro.ibiblio.org/tinycorelinux/intro.html
http://distro.ibiblio.org/tinycorelinux/downloads.html
The current Core (TinyCore minus GUI &c) is 11 MB.

Bringing in clang and its dependencies blows the system
out from 21.7 to 145.8 MB (+ 124.1 MB).
Adding gettext brought it to 148.0 MB (+ 2.2 MB).
Adding the manual pages and related tools brought
it up to 152.4 MB (+ 4.4 MB).  Add a couple of text
editors (NOT including emacs, which I actually like)
and it's 161.4 MB (+ 9.0 MB).

So the actual TinyCore distribution is about 1/8th of
a fairly minimal development environment.  I used to
run a full SunOS 3 environment on a 100 MB disc, and
40 MB of that was left over for my files.  How times change.

I suspect that TinyCore plus enough to *run* Erlang could
be quite small by today's standards.  Certainly you could
carry around TinyCore Linux + C development environment +
full Erlang distribution and run it comfortably from an
elderly memory stick.
_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: Light-weight operating systems supporting Erlang in production web servers

scott ribe
Oh, well, in that case there's one way to get it onto a Raspberry in 12MB:

http://nerves-project.org

;-)

> On Sep 17, 2017, at 10:28 PM, Lloyd R. Prentice <[hidden email]> wrote:
>
> Hi Richard,
>
> So, on a server,  it sounds like we're talking about:
>
> 11 MB for the OS
> 5 MB for stripped down Erlang based on Joe's work,
> plus our application code.
>
> Thanks to all for these numbers.
>
> My question came out of a conversation with a friend re: how far we could push Erlang on a Raspberry Pi or Odroid C2 SBC.
>
> It's interesting to look at the numbers for TinyCore on ARM:
>
> http://mirror.epn.edu.ec/tinycorelinux/arm.html
>
> Compressed, they seem to run in the 25MB range. Raspian zipped is some 4GB. So, on an RP server TinyCore seems to offer much.
>
> This makes me think that a cluster of $5.00 RP Zeros would be viable and a great platform for exploring and teaching distributed Erlang.
>
> All the best,
>
> Lloyd
>
>
> Sent from my iPad
>
> On Sep 17, 2017, at 9:55 PM, Richard A. O'Keefe <[hidden email]> wrote:
>
>>
>> On 16/09/17 9:29 PM, Joe Armstrong wrote:
>>> Old timer here :-)
>>>
>>> Just out of interest how large is Apline? (in MB?)
>>
>> For what it's worth, TinyCore-8.0.iso is just under 17 MB.
>> Installed in VirtualBox and running, complete with GUI,
>> it's 21.7MB.  That doesn't include development tools.
>> I note that just the
>> "OTP 20.0 HTML Documentation File (33,948,386)"
>> is bigger than this and
>> "OTP 20.0 Windows 32-bit Binary File (96,337,114)"
>> is a lot bigger.
>>
>> http://distro.ibiblio.org/tinycorelinux/intro.html
>> http://distro.ibiblio.org/tinycorelinux/downloads.html
>> The current Core (TinyCore minus GUI &c) is 11 MB.
>>
>> Bringing in clang and its dependencies blows the system
>> out from 21.7 to 145.8 MB (+ 124.1 MB).
>> Adding gettext brought it to 148.0 MB (+ 2.2 MB).
>> Adding the manual pages and related tools brought
>> it up to 152.4 MB (+ 4.4 MB).  Add a couple of text
>> editors (NOT including emacs, which I actually like)
>> and it's 161.4 MB (+ 9.0 MB).
>>
>> So the actual TinyCore distribution is about 1/8th of
>> a fairly minimal development environment.  I used to
>> run a full SunOS 3 environment on a 100 MB disc, and
>> 40 MB of that was left over for my files.  How times change.
>>
>> I suspect that TinyCore plus enough to *run* Erlang could
>> be quite small by today's standards.  Certainly you could
>> carry around TinyCore Linux + C development environment +
>> full Erlang distribution and run it comfortably from an
>> elderly memory stick.
>> _______________________________________________
>> 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

--
Scott Ribe
[hidden email]
(303) 722-0567

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

Re: Light-weight operating systems supporting Erlang in production web servers

Phillip Toland
In reply to this post by scott ribe
We build the releases. The Erlang and Elixir releases are built in separate base images so that I don't have to rebuild the whole thing when a new Elixir release comes out. However, I may switch to the official images once we get our application onto Erlang 20 and Elixir 1.5.

~p


On September 16, 2017 at 4:26:00 PM, scott ribe ([hidden email]) wrote:

On Sep 15, 2017, at 11:14 AM, Phil Toland <[hidden email]> wrote:
>
> I second the vote for Alpine Linux. My application is a mix of Erlang and Elixir and runs in Docker containers. I use Alpine as the base and I get reasonably sized containers that don't have anything I don't need.
>
> As a side note, it isn't just about providing the necessary support to run the BEAM VM. I also want enough of a familiar environment (ls, ps, top, nslookup/dig, netstat) to troubleshoot issues. Alpine provides that without the other stuff that you don't need.
>
> ~phil

When I looked at Alpine, the Erlang in their repo was too old for me. Do you guys build the releases yourselves, or live with older versions?

--
Scott Ribe
[hidden email]
(303) 722-0567

_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: Light-weight operating systems supporting Erlang in production web servers

João Henrique Freitas
In reply to this post by Lloyd R. Prentice-2
Hi,

If you know a bit about Yocto Project you could try this https://github.com/joaohf/meta-erlang

I am planning to do a tutorial about it soon.

Thanks

On Mon, Sep 18, 2017 at 1:28 AM, Lloyd R. Prentice <[hidden email]> wrote:
Hi Richard,

So, on a server,  it sounds like we're talking about:

11 MB for the OS
5 MB for stripped down Erlang based on Joe's work,
plus our application code.

Thanks to all for these numbers. 

My question came out of a conversation with a friend re: how far we could push Erlang on a Raspberry Pi or Odroid C2 SBC.

It's interesting to look at the numbers for TinyCore on ARM:


Compressed, they seem to run in the 25MB range. Raspian zipped is some 4GB. So, on an RP server TinyCore seems to offer much.

This makes me think that a cluster of $5.00 RP Zeros would be viable and a great platform for exploring and teaching distributed Erlang.

All the best,

Lloyd


Sent from my iPad

On Sep 17, 2017, at 9:55 PM, Richard A. O'Keefe <[hidden email]> wrote:


On 16/09/17 9:29 PM, Joe Armstrong wrote:
Old timer here :-)

Just out of interest how large is Apline? (in MB?)

For what it's worth, TinyCore-8.0.iso is just under 17 MB.
Installed in VirtualBox and running, complete with GUI,
it's 21.7MB.  That doesn't include development tools.
I note that just the
"OTP 20.0 HTML Documentation File (33,948,386)"
is bigger than this and
"OTP 20.0 Windows 32-bit Binary File (96,337,114)"
is a lot bigger.

http://distro.ibiblio.org/tinycorelinux/intro.html
http://distro.ibiblio.org/tinycorelinux/downloads.html
The current Core (TinyCore minus GUI &c) is 11 MB.

Bringing in clang and its dependencies blows the system
out from 21.7 to 145.8 MB (+ 124.1 MB).
Adding gettext brought it to 148.0 MB (+ 2.2 MB).
Adding the manual pages and related tools brought
it up to 152.4 MB (+ 4.4 MB).  Add a couple of text
editors (NOT including emacs, which I actually like)
and it's 161.4 MB (+ 9.0 MB).

So the actual TinyCore distribution is about 1/8th of
a fairly minimal development environment.  I used to
run a full SunOS 3 environment on a 100 MB disc, and
40 MB of that was left over for my files.  How times change.

I suspect that TinyCore plus enough to *run* Erlang could
be quite small by today's standards.  Certainly you could
carry around TinyCore Linux + C development environment +
full Erlang distribution and run it comfortably from an
elderly memory stick.
_______________________________________________
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




--
João Henrique Ferreira de Freitas - joaohf_at_gmail.com
Campinas-SP-Brasil

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

Re: Light-weight operating systems supporting Erlang in production web servers

Lloyd R. Prentice-2
Hi João,

I eagerly look forward to your tutorial.

My focus has been on web applications. But a dear friend, who has made his living for many years developing embedded systems using 1980's technology, has been asking me about Erlang as a way of opening his systems up to the wider world.

I may be whistling in the dark, but I think there's great potential for the RPs and Odroids in the right applications. The new Odroid HC1 looks particularly interesting. And I do wonder what could be squeezed out of the $5.00 RP Zero.

https://ameridroid.com/

Best wishes,

Lloyd





-----Original Message-----
From: "João Henrique Freitas" <[hidden email]>
Sent: Monday, September 18, 2017 6:52pm
To: "Lloyd R. Prentice" <[hidden email]>
Cc: "Richard A. O'Keefe" <[hidden email]>, "Erlang" <[hidden email]>
Subject: Re: [erlang-questions] Light-weight operating systems supporting Erlang in production web servers

Hi,

If you know a bit about Yocto Project you could try this
https://github.com/joaohf/meta-erlang

I am planning to do a tutorial about it soon.

Thanks

On Mon, Sep 18, 2017 at 1:28 AM, Lloyd R. Prentice <[hidden email]>
wrote:

> Hi Richard,
>
> So, on a server,  it sounds like we're talking about:
>
> 11 MB for the OS
> 5 MB for stripped down Erlang based on Joe's work,
> plus our application code.
>
> Thanks to all for these numbers.
>
> My question came out of a conversation with a friend re: how far we could
> push Erlang on a Raspberry Pi or Odroid C2 SBC.
>
> It's interesting to look at the numbers for TinyCore on ARM:
>
> http://mirror.epn.edu.ec/tinycorelinux/arm.html
>
> Compressed, they seem to run in the 25MB range. Raspian zipped is some
> 4GB. So, on an RP server TinyCore seems to offer much.
>
> This makes me think that a cluster of $5.00 RP Zeros would be viable and a
> great platform for exploring and teaching distributed Erlang.
>
> All the best,
>
> Lloyd
>
>
> Sent from my iPad
>
> On Sep 17, 2017, at 9:55 PM, Richard A. O'Keefe <[hidden email]> wrote:
>
>
> On 16/09/17 9:29 PM, Joe Armstrong wrote:
>
> Old timer here :-)
>
>
> Just out of interest how large is Apline? (in MB?)
>
>
> For what it's worth, TinyCore-8.0.iso is just under 17 MB.
> Installed in VirtualBox and running, complete with GUI,
> it's 21.7MB.  That doesn't include development tools.
> I note that just the
> "OTP 20.0 HTML Documentation File (33,948,386)"
> is bigger than this and
> "OTP 20.0 Windows 32-bit Binary File (96,337,114)"
> is a lot bigger.
>
> http://distro.ibiblio.org/tinycorelinux/intro.html
> http://distro.ibiblio.org/tinycorelinux/downloads.html
> The current Core (TinyCore minus GUI &c) is 11 MB.
>
> Bringing in clang and its dependencies blows the system
> out from 21.7 to 145.8 MB (+ 124.1 MB).
> Adding gettext brought it to 148.0 MB (+ 2.2 MB).
> Adding the manual pages and related tools brought
> it up to 152.4 MB (+ 4.4 MB).  Add a couple of text
> editors (NOT including emacs, which I actually like)
> and it's 161.4 MB (+ 9.0 MB).
>
> So the actual TinyCore distribution is about 1/8th of
> a fairly minimal development environment.  I used to
> run a full SunOS 3 environment on a 100 MB disc, and
> 40 MB of that was left over for my files.  How times change.
>
> I suspect that TinyCore plus enough to *run* Erlang could
> be quite small by today's standards.  Certainly you could
> carry around TinyCore Linux + C development environment +
> full Erlang distribution and run it comfortably from an
> elderly memory stick.
> _______________________________________________
> 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
>
>


--
João Henrique Ferreira de Freitas - joaohf_at_gmail.com
Campinas-SP-Brasil


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

Re: Light-weight operating systems supporting Erlang in production web servers

Adam Lindberg-7
In reply to this post by Lloyd R. Prentice-2
Perhaps it's not relevant for you right now, but for an interesting use-case of what is possible: https://www.grisp.org

We're successfully running Erlang bare metal on an ARM Cortex M7 without any kernel (the VM is the kernel!). All our software is open source and available at https://github.com/grisp

Let me know if you have any questions.

Cheers,
Adam

> On 18 Sep 2017, at 06:28, Lloyd R. Prentice <[hidden email]> wrote:
>
> Hi Richard,
>
> So, on a server,  it sounds like we're talking about:
>
> 11 MB for the OS
> 5 MB for stripped down Erlang based on Joe's work,
> plus our application code.
>
> Thanks to all for these numbers.
>
> My question came out of a conversation with a friend re: how far we could push Erlang on a Raspberry Pi or Odroid C2 SBC.
>
> It's interesting to look at the numbers for TinyCore on ARM:
>
> http://mirror.epn.edu.ec/tinycorelinux/arm.html
>
> Compressed, they seem to run in the 25MB range. Raspian zipped is some 4GB. So, on an RP server TinyCore seems to offer much.
>
> This makes me think that a cluster of $5.00 RP Zeros would be viable and a great platform for exploring and teaching distributed Erlang.
>
> All the best,
>
> Lloyd
>
>
> Sent from my iPad
>
> On Sep 17, 2017, at 9:55 PM, Richard A. O'Keefe <[hidden email]> wrote:
>
>>
>> On 16/09/17 9:29 PM, Joe Armstrong wrote:
>>> Old timer here :-)
>>>
>>> Just out of interest how large is Apline? (in MB?)
>>
>> For what it's worth, TinyCore-8.0.iso is just under 17 MB.
>> Installed in VirtualBox and running, complete with GUI,
>> it's 21.7MB.  That doesn't include development tools.
>> I note that just the
>> "OTP 20.0 HTML Documentation File (33,948,386)"
>> is bigger than this and
>> "OTP 20.0 Windows 32-bit Binary File (96,337,114)"
>> is a lot bigger.
>>
>> http://distro.ibiblio.org/tinycorelinux/intro.html
>> http://distro.ibiblio.org/tinycorelinux/downloads.html
>> The current Core (TinyCore minus GUI &c) is 11 MB.
>>
>> Bringing in clang and its dependencies blows the system
>> out from 21.7 to 145.8 MB (+ 124.1 MB).
>> Adding gettext brought it to 148.0 MB (+ 2.2 MB).
>> Adding the manual pages and related tools brought
>> it up to 152.4 MB (+ 4.4 MB).  Add a couple of text
>> editors (NOT including emacs, which I actually like)
>> and it's 161.4 MB (+ 9.0 MB).
>>
>> So the actual TinyCore distribution is about 1/8th of
>> a fairly minimal development environment.  I used to
>> run a full SunOS 3 environment on a 100 MB disc, and
>> 40 MB of that was left over for my files.  How times change.
>>
>> I suspect that TinyCore plus enough to *run* Erlang could
>> be quite small by today's standards.  Certainly you could
>> carry around TinyCore Linux + C development environment +
>> full Erlang distribution and run it comfortably from an
>> elderly memory stick.
>> _______________________________________________
>> 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

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