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

Enable yjit #3039

Closed
just1602 opened this issue Jan 19, 2023 · 7 comments
Closed

Enable yjit #3039

just1602 opened this issue Jan 19, 2023 · 7 comments
Assignees

Comments

@just1602
Copy link
Collaborator

just1602 commented Jan 19, 2023

Before we merge #3038, we should add one of the following environment variable to production : RUBY_YJIT_ENABLE=1 or RUBYOPT="--yjit", so ruby is gonna run with yjit enabled, which is supposed to make our application faster and reduce some resources' consumption over time.

veganstraightedge added a commit that referenced this issue Apr 9, 2023
Check #3039  first.

---------

Co-authored-by: Shane Becker <[email protected]>
@veganstraightedge
Copy link
Contributor

✅ I have set RUBY_YJIT_ENABLE=1 in both staging and production

Thanks @just1602!

@veganstraightedge
Copy link
Contributor

I've reverted this change because we're now seeing too much memory usage in production.

I'll leave this issue open to re-investigate in the future.

image

@just1602
Copy link
Collaborator Author

What are our options here? Can we increase our manage the quantity of memory every dyno have?

This is possible, I think the JIT compiler have a bigger memory footprint.

@veganstraightedge
Copy link
Contributor

I have re-enabled YJIT in staging and production

@veganstraightedge
Copy link
Contributor

What are our options here? Can we increase our manage the quantity of memory every dyno have?

This is possible, I think the JIT compiler have a bigger memory footprint.

The WEB_CONCURRENCY ENV var was set to 4 in production.
For now, I've set down to 3

@bensheldon
Copy link
Contributor

I noticed you're using the jemalloc build pack. Have you set a MALLOC_CONF?

You likely want to set:

MALLOC_CONF="dirty_decay_ms:1000,narenas:2,background_thread:true"

https://gist.github.com/jjb/9ff0d3f622c8bbe904fe7a82e35152fc

@veganstraightedge
Copy link
Contributor

thank you @bensheldon! i just set that in production.

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

3 participants