Hello,
We are working in a pretty big Elixir application (at the moment of writing, 1 minute of compilation in an i5 processor and ~930 modules) and we have recently moved from Distillery to new Mix releases.
The issue we are having is that we are experiencing a 300% extra boot time in the application, which is causing some problems on our deployments (but we can fix that, the deployment is not the issue).
We have made a comparision of booting times with a release made by Distillery and a release made by new Mix release command, and we are seeing:
- Distillery: ~2 seconds until Phoenix is up, inluding checking for pending migrations
- Mix: ~9 seconds until Phoenix is up, without any migration-related process.
both measurements are on the same machine (which is the same I have made the build, so no cross-platform issue)
I have tries removing all runtime configurations, which make irt a bit better (1 or 2 seconds less) but not even near Distillery times.
Also, I noticed that during Mix release boot there is only one BEAM process taking 150% of CPU for that ~9 seconds, when with Distillery one dont get to that usage (or it goes so faster that top
doesn’t measure it).
Our mix.exs release config:
def project do
[
...
releases: [
my_release: [
include_executables_for: [:unix],
path: "rel/build/my_release"
]
],
default_release: :my_release,
...
]
end
vm.args.eex
is like the default one and the env.sh.eex
just set the distribution to name
and sets the node name according to the pod IP when deployed on kubernetes (that was also made on Distillery releases).
Note that we are doing all this benchmarks on local, not even deploying to Kubernetes (which quotas configuratiuons can also affect).
Any idea what is happening?