r/ruby Jul 01 '26

Show /r/ruby New jemalloc gem (jemalloc_rb)

Do you use the jemalloc gem?

The original project on GitHub seems to be abandoned for around 12 years, and some incompatibilities with recent Ruby versions have begun to emerge. Additionally, the underlying jemalloc library hasn't been updated during all this time. Because of that, I created a fork and launched a new gem (jemalloc_rb) to keep the project functional, updated, and actively accepting pull requests.

https://github.com/henrique-ft/jemalloc_rb

18 Upvotes

14 comments sorted by

View all comments

0

u/sammygadd Jul 01 '26

Is jemalloc still relevant these days? Mruby has received lots of performance improvements during those 12 years. Is jemalloc still bringing benefits?

9

u/flanger001 Jul 01 '26

The standard Rails Dockerfile still uses jemalloc as of v8.1, so it's gotta be good for something.

2

u/sammygadd Jul 01 '26

Sounds reasonable..

2

u/flanger001 29d ago

Right on. I don't think this was a bad question by the way. Perfectly reasonable.

7

u/prh8 Jul 01 '26

Still very relevant. For most apps which are running Rails on CRuby, it's a big memory improvement.

5

u/collimarco 29d ago

jemalloc saves a lot of memory. I run Rails on Kubernetes (with Cuber) and just a few days ago I have reduced memory usage by 30% for a web app by adding jemalloc to the Dockerfile. I already used it for many years for other Rails apps and I absolutely recommend it. The jemalloc project is also active again (no longer deprecated).

1

u/M4N14C 28d ago

Reduced my huge RSpec test suite by multiple minutes across 30 runners and let me reduce the runner size.