Reducing Sidekiq Memory Usage With Jemalloc
Ruby and Rails don’t have a reputation of being memory-friendly. This comes with a trade-off of being a higher level language that tends to be more developer-friendly. For me, it works. I’m content knowing I might have to pay more to scale a large application knowing I can write it in a language I enjoy.
Turns out…Ruby’s not the memory hog I’d previously thought. After some research and experimentation, I’ve found jemalloc
to offer significant memory savings while at least preserving performance, if not improving it as well.