To all mastodon admins:

Hi! I’m Evan Phoenix, the primary author of puma, the ruby webserver that powers mastodon!

Please reply or DM me if you need tuning help! I’ve got no officiation with the mastodon, just want to see you succeed!

(Quick Tip: set WEB_CONCURRENCY to core count * 1.5 and then tune MAX_THREADS. High thread values will see diminishing returns!)

@evanphx had it exactly there and the processes consumed 2Gb RAM each so we quickly run out of memory on the 32Gb RAM system. We had 10 threads per process.
@leah Yeah, the core count vs memory definitely impacts the math. Did you find a happy balance? What was it?
@evanphx currently 10 processes with 10 threads are looking good. But we moved the DB and all the sidekiq workers to other servers already. So at the moment only, redis, streaming and puma are on the same system. otherwise we would have run out of memory a long time ago. I think it depends very much on how your setup look how many resources you can allocate to puma. So maybe there isn't a good and simpel ratio.
@evanphx maybe it is better to look if a puma process consumes 2gb RAM for everyone and if so depend the scaling more on the available RAM than on cores.