Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

long-shot feature request: elixir OTP 25 builds with JIT disabled #149

Closed
sbe-arg opened this issue Mar 5, 2023 · 9 comments
Closed

long-shot feature request: elixir OTP 25 builds with JIT disabled #149

sbe-arg opened this issue Mar 5, 2023 · 9 comments

Comments

@sbe-arg
Copy link

sbe-arg commented Mar 5, 2023

something on the line of:

  • 1.14.2-erlang-24.3.4.9-debian-bullseye-20230202-slim-nojit
  • x.x.x-erlang-25.x.x-distro-something-somethingelse-nojit
@ericmj
Copy link
Member

ericmj commented Mar 5, 2023

What's the use case for this?

@sbe-arg
Copy link
Author

sbe-arg commented Mar 5, 2023

Been running dockerfiles with

ENV ERL_COMPILER_OPTIONS="[{d,'JIT_INFO',false}]"

to avoid segmentation faults in arm64 builds but would be ideal to have it image specific instead of dockerfile tuned.

@ericmj
Copy link
Member

ericmj commented Mar 5, 2023

You can select a different emulator with -emu_flavor. https://www.erlang.org/doc/man/erl.html

Since there are options to disable the JIT I don't feel like separate images are needed since it would double the amount we have to build.

@ericmj ericmj closed this as not planned Won't fix, can't repro, duplicate, stale Mar 5, 2023
@sbe-arg
Copy link
Author

sbe-arg commented Mar 5, 2023

Makes sense, thanks for clarifying.

@wojtekmach
Copy link
Member

wojtekmach commented Mar 6, 2023

From aforementioned docs:

(The emulator with this flavor must be built. You can build a specific flavor by doing make FLAVOR=$FLAVOR in the Erlang/OTP source repository.)

are we building our images with make FLAVOR=? If not then -emu_flavour flag will only be useful with the default value, smp. If we aren't I think maybe we should, I'm not aware of downsides of doing so.

@josevalim
Copy link
Member

The downside is larger images. The beam flavor is slower and likely only to get slower with time, I would avoid it the most we can.

@ruslandoga
Copy link

ruslandoga commented Apr 26, 2023

Sorry to post in a closed issue but what is the recommended way to disable JIT in the current hexpm images?

I've tried the following options:

  • ENV ERL_FLAGS="+JPperf true" doesn't disable JIT but the build works
  • ENV ERL_COMPILER_OPTIONS="[{d,'JIT_INFO',false}]" doesn't work
  • ENV ERL_FLAGS="-emu_flavor smp" doesn't work
  • ENV ELIXIR_ERL_OPTIONS="-emu_flavor smp" doesn't work

Reference build: ruslandoga/plausible#93

@josevalim
Copy link
Member

No, it is not possible. The VM is compiled with the JIT in.

@ruslandoga
Copy link

I see. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants