Mastodon has recently gained popularity amongst tech-savvy users after Elon Musk has bought Twitter. With November’s wave of new Mastodon users, many servers experienced mayor problems with their performance - so did metalhead.club, the Mastodon instance that I’m hosting myself. Here’s how I tackled performance issues on metalhead.club.
If you’re running your on Mastodon instance you probably might not have jemalloc active on your Ruby setup. Jemalloc changes the way Ruby
allocates memory and saves up RAM. On my 140 users instance RAM usage dropped by 300 MB just by using jemalloc.