cr0t

cr0t

I have a small web application here – Lexin Mobi (https://lexin.mobi, GitHub - cr0t/lexin: Swedish Dictionary App · GitHub) – which I deploy via Docker images. There are a couple of scripts (and Dockerfiles) that help me do that. Basically, I run mix release when building a new image – the approach almost identical to the one from Phoenix documentation.

After yesterday’s release of Elixir, I tried to build it using it and the latest Erlang. The resulting image size surprised me: 127 MB vs. usual ~35 MB. At glance, it appears that the files inside the /app/erts-15.0/bin directory are unusually big (6 MB vs. kilobytes in the previous version).

Here is a screenshot that summaries my findings:

The only thing I changed – versions of Elixir and Erlang – even Alpine’s base image version is the same.

I couldn’t find any related notes in Erlang/OTP’s changelog. Plus, the files seem to have almost the same content, so something is wrong with the file system… I copied erlc from both containers to see what’s the difference, and the one from erts-15.0 contains loads of space inside:

What could be wrong with this? Do you have any ideas where to look? Maybe there are some new default behavior in Erlang/OTP 27? Thanks!

Showing Posts 1 to 6

03juan

03juan

Definitely an issue that should be reported in the Erlang repo!

fmn

fmn

Erlang repo or perhaps downstream packager, depending who’s build you are consuming (asdf or/and kerl?). as a curiosity, this stuff is compiled from the sources:

$ du -sh /opt/erlang/27.0/lib/erlang/erts-15.0/bin/*
43M	/opt/erlang/27.0/lib/erlang/erts-15.0/bin/beam.smp
120K	/opt/erlang/27.0/lib/erlang/erts-15.0/bin/ct_run
116K	/opt/erlang/27.0/lib/erlang/erts-15.0/bin/dialyzer
40K	/opt/erlang/27.0/lib/erlang/erts-15.0/bin/dyn_erl
208K	/opt/erlang/27.0/lib/erlang/erts-15.0/bin/epmd
4.0K	/opt/erlang/27.0/lib/erlang/erts-15.0/bin/erl
500K	/opt/erlang/27.0/lib/erlang/erts-15.0/bin/erlc
444K	/opt/erlang/27.0/lib/erlang/erts-15.0/bin/erl_call
68K	/opt/erlang/27.0/lib/erlang/erts-15.0/bin/erl_child_setup
172K	/opt/erlang/27.0/lib/erlang/erts-15.0/bin/erlexec
4.0K	/opt/erlang/27.0/lib/erlang/erts-15.0/bin/erl.src
124K	/opt/erlang/27.0/lib/erlang/erts-15.0/bin/escript
40K	/opt/erlang/27.0/lib/erlang/erts-15.0/bin/heart
184K	/opt/erlang/27.0/lib/erlang/erts-15.0/bin/inet_gethost
84K	/opt/erlang/27.0/lib/erlang/erts-15.0/bin/run_erl
4.0K	/opt/erlang/27.0/lib/erlang/erts-15.0/bin/start
4.0K	/opt/erlang/27.0/lib/erlang/erts-15.0/bin/start_erl.src
4.0K	/opt/erlang/27.0/lib/erlang/erts-15.0/bin/start.src
44K	/opt/erlang/27.0/lib/erlang/erts-15.0/bin/to_erl
116K	/opt/erlang/27.0/lib/erlang/erts-15.0/bin/typer
1012K	/opt/erlang/27.0/lib/erlang/erts-15.0/bin/yielding_c_fun
steffend

steffend

Phoenix Core Team

Can also be seen in the hexpm/elixir images:

docker run --rm -it hexpm/elixir:1.16.2-erlang-26.2.5-debian-bookworm-20240513 ls -lah /usr/local/lib/erlang/erts-14.2.5/bin/

vs.

docker run --rm -it hexpm/elixir:1.17.0-erlang-27.0-debian-bookworm-20240513 ls -lah /usr/local/lib/erlang/erts-15.0/bin/

My local asdf install of 27.0 is not affected (macOS).

cr0t

cr0t OP

Submitted this issue to the Erlang/OTP repository.

cr0t

cr0t OP

A status update: the previously linked issue landed at the right place. It has been fixed in the Erlang/OTP codebase.

However, we will need to wait for the release of Erlang/OTP 27.0.1 – this fix will be included there.

Debrief: the root cause of the issue is the LDFLAGS option for compiler that sneaked in the place they didn’t want it to be in, and it makes the compiler pad binaries with zeros in some areas.

10
Post #5
D4no0

D4no0

honestly taking in consideration how many targets OTP can be built on this is no news, kudos to OTP team for their amazing responsiveness.

— All posts loaded —

Where Next? Top

Trending in Questions Top

stjefim
Hello! Suppose you are building workflow (order / task / payment) processing system with the following requirements: Each workflow con...
New
jonnycharles
I’m in search of an Elixir library that offers PDF generation capabilities similar to Ruby’s Prawn. While there have been discussions abo...
New
spammy
I’m looking to build a personal workflow to quickly deploy web applications written in elixir/phoenix, for local consumption (ie not on t...
New
dli
Before I dive in myself, did anyone successfully sprinkle Hologram into their existing LiveView app? Looking for hints regarding: Addi...
New
roeland
Kia ora, We have been using elixir-google-api to connect to Google Drive. However, with the updates to Tesla due to CVEs this is now bro...
New
bottlenecked
Hi all, I wanted to ask how the community is dealing with post-release steps. Today we have Ecto migrations, which make sure that the db...
New
rahultumpala
Hello, I have an Elixir backend that implements a custom protocol over TCP. I want to load test the backend and assess the performance o...
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
ausimian
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews