4 ms·
Is it 256 mb for the entire app server or is it multiplied by each Unicorn/Puma process?
by joelbluminator 5y ago
Is it 256 mb for the entire app server or is it multiplied by each Unicorn/Puma process?
- byroot 5y agoEach process, a small part of it might make it into CoW during boot, but that won't make a big difference. If you don't have the free RAM for it and you app is small enough, you can try lower values. Also note that currently YJIT fully initialize that memory to make it easier to debug, so it's not even virtual. That's another thing that is on the roadmap to be improved soon, and ultimately you'll only pay for the part that YJIT really use even if 250MB is allocated. But overall all JITs trade increased memory usage for faster execution, you have to store that generated code and metadata somewhere.
- joelbluminator 5y agoDo u guys expect it to be on by default eventually, at least for Rails apps?
- byroot 5y agoYes. Basically the main reason it isn't the default now is the still rough executable memory management. Other than that it's been rock solid and offers decent speedup across a wild range of benchmarks and real world applications. So my personal expectation is for it to be enabled by default in 3.2, but I might be wrong.